Hi larrykeenan and all,
Thanks for your reply and this driver would do the job but I followed it and I can't talk to my board. For instance by writting 0x81 it should I should get a reply of 0x04. I even wrote 10000001 or 1 0 0 0 0 0 0 1 or 0 0 0 1 1 0 0 0 and no luck.
It says in the example that a special cable was used and I was wondering if this is a big deal as I'm using a normal serial cable where I'm using only the Rx, Tx and Grnd pins.
If you've successfully used this example to communicate with a board please let me know your suggestions as I am stuck! I suspect I should costumize this line and tried few things but no luck. (my baud is 115200)
my_termios.c_cflag = B115200 | CS8 |CREAD | CLOCAL | HUPCL;
I checked the following:
1) from the this output I can tell I my PC serial is using ttyS0
setserial -g /dev/ttyS0
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
2) while the program is running, it shows that I'm txing/rxing crazy number of bytes!
and it stays the same even when I quit the program. Initially, tx:24 and rx:0 but never saw these values again:
cat /proc/tty/driver/serial
serinfo:1.0 driver:5.05c revision:2001-07-08
0: uart:16550A port:3F8 irq:4 baud:115200 tx:300973 rx:271036 fe:8 RTS|DTR
3) I did check my serial port of my board and can successfully to it using a Windows based RS232 sniffer.
4) I changed 2 pcs to make sure that my serial port is working.
greatly appreciate your help,
|