Hi, everybody,
Does anyone know how to read data from a serial port (RS232)?
A tried to use open and read commands.
It seems that the open command worked well, but the read command always returns -1.
This is how I used them:
fd=open("/dev/ttyS0",O_RDWR | O_NOCTTY | O_NONBLOCK);
result=read(fd,mybuffer,mysize);
I'm trying to test this with a serial barcode scanner.
If there is anyone who can help me, I'd be very grateful.
Thanks,
Vanessa