C Sample code for reading from a serial port

That's what I used for reference on work done 11 years ago. Glad to see it's still there.

It's actually quite good. Emphasizes that posix serial IO is not just open uart, write a byte, read a byte, and close....but that there are other important considerations: cooked vs raw, word length and parity, importance of non-blocking reads, etc.
 
I was never able to get my head around uart programming or even 'c' in general. All I was hoping to do is find why some 'c' code works with Linux (Debian) but the same code does not work with FreeBSD.

The code is here. It is supposed to send data using xmodem to the serial port but in FreeBSD it simply seems to stay in a wait state.

Maybe the problem is due something in the header file which is not FreeBSD compliant....

Wonder if I could use an executable version of xmodem or even kermit (if such things exist) to send the data...
 
Back
Top