Using open(... to process binary data over ttyS0
Hello everyone!
I am using the old "open" function to access the serial port to try and read some incoming data. The problem is when I receive beyond the standard ascii characters, 0x80 and above, when I do a read I get 0xffff(msb)(lsb). I'm assuming that these f's are getting tacked on because I'm doing a read - and it's expecting ascii chars. How do I get around this? It goes something like this... Code:
int fd; Code:
int raw_rx_data; 2. Is there a way to use the open function with a binary flag (searched and couldn't find one)? 3. Is there a way to use the fopen function with the serial port? I don't think fopen supports the noctty / ndelay flags. Thanks! I realized I posted this in the wrong area.. will repost in non *nix programming. Sorry! |
|
All times are GMT -5. The time now is 01:39 AM. |