Hey all,
I wrote a program that reads data from a serial port, from a temperature sensor in specific in linux. It opens a file descriptor to /dev/ttyS0, does a tcflush() and sets the serial port attributes. It works perfectly with my desktop linux machine, reads temperatures correctly and all.
For research, I modified a Linksys WAP54G wireless access point to add a serial port to it. I then hooked up my sensor, and tried running my program, and it seg faults at tcflush()
The WAP54G runs embedded linux, I enabled serial port support in the kernel, and has /dev/tts/0 and /dev/tts/1 ... I tried both device links and both seg fault at tcflush(). If i comment out tcflush(), i get no data... but why is tcflush() segfaulting?
I can try to provide more information if neede, just trying to read data from the serial port. Here is the modification I did:
http://www.rwhitby.net/wrt54gs/serial.html
the WAP54G has the same serial port stuff on the motherboard, so it was the same.
Anyways, any help or suggestions would be greatly appreciated!
George