We're using the read()
method from unistd.h
to receive data from the serial port in a Linux environment. To read data from /dev/ttys1
specifically.
Part of the data we're receiving include the characters 0x0A
(line feed) and 0x0B
(vertical tab), but the library seems to ignore them.
I mean, we use an unsigned char[]
to store the data obtained from the port, and the array contains all the data except those characters.
ttys? Are you sure to put the terminal driver in the correct state to pass out those characters? (See tcgetattr and tcsetattr). Depending on your precise setting, you can play interactively with those settings with the stty program.