2008-01-08 12:22:43 Cannot read from /dev/ttyS0
Richard Chapsworth (UNITED KINGDOM)
Message: 49358 hey
i am trying to read from a serial device connected to the serial port on a BF537. i have disabled the console output on the serial port, /proc/interrupts confirms.
now then, having connected the device to the serial port, i then try cat /dev/ttyS0 to see if i get any data sent, but this is the response:
cat: /dev/ttyS0: No such device or address
any ideas? i also tried /dev/ttyBF0, which gives no error, but does not show any data.
QuoteReplyEditDelete
2008-01-08 12:58:33 Re: Cannot read from /dev/ttyS0
Mike Frysinger (UNITED STATES)
Message: 49359 please review the FAQ about ttyS0 vs ttyBF0:
http://docs.blackfin.uclinux.org/doku.php?id=faq
QuoteReplyEditDelete
2008-01-09 04:26:36 Re: Cannot read from /dev/ttyS0
Richard Chapsworth (UNITED KINGDOM)
Message: 49384 ok, so assuming that /dev/ttyBF0 is the correct device for the serial port, why can i not read data?
the following commands on my desktop will allow me to read from the device:
stty -F /dev/ttyUSB0 1200
cat /dev/ttyUSB0
if i try the same thing on the blackfin with ttyBF0, i receive no data. any ideas?
QuoteReplyEditDelete
2008-01-09 13:37:05 Re: Cannot read from /dev/ttyS0
Mike Frysinger (UNITED STATES)
Message: 49410 if you already have a busybox shell running on the console, you need to make sure the two are not competing for read access
ive tested what you're doing and it works for me ... have the board read from ttyBF0 with no one else and on the development host, disconnect the serial console and write data to its serial device
QuoteReplyEditDelete
2008-01-10 06:02:24 Re: Cannot read from /dev/ttyS0
Richard Chapsworth (UNITED KINGDOM)
Message: 49430 could you elaborate a little please?
i have passed console= as a boot argument, and it appears to prevent busybox loading a console on /dev/ttyBF0, how do i confirm this?
i then set the serial port to 1200 baud and try and read data, but i get nothing. the same does not happen on my development machine, so the serial device itself is functioning.
QuoteReplyEditDelete
2008-01-10 06:19:39 Re: Cannot read from /dev/ttyS0
Mike Frysinger (UNITED STATES)
Message: 49440 you can look at all open files by doing:
ls -l /proc/*/fd/
setting the baud only matters as long as the host and the board are using the same rate
if you booted with console=, then you should be able to telnet into the board, run `stty` on /dev/ttyBF0, and then do something like `cat /dev/ttyBF0`. on your host system, writing into the serial port like `echo foo > /dev/ttyUSB0` should cause the resulting text to show up in the cat.
QuoteReplyEditDelete
2008-01-10 07:11:35 Re: Cannot read from /dev/ttyS0
Richard Chapsworth (UNITED KINGDOM)
Message: 49443 mike, thanks for your help, i have now got the blackfin reading from the serial port from my development machine
QuoteReplyEditDelete
2008-01-10 11:46:48 Re: Cannot read from /dev/ttyS0
Mike Frysinger (UNITED STATES)
Message: 49450 for posterity sake, what was the source of your troubles ?