You are not logged in.
Pages: 1
I have serial device /dev/ttyS0 that I need to read the first byte from. Using cat /dev/ttyS0 will not return me to a new line which is what I need. I'm sure there's simple command for it but I can't find it..
EDIT: I believe in perl it went something like
sysread(F2, '/dev/ttyS0', 1)Offline
Use 'dd'?
1000
Offline
dd is what you want.... as a guess
dd if=/dev/ttyS0 count=1hmmm actually that gives me an input/output error... not sure why, but dd should do what you want assuming you can read the node.
Offline
thanks guys
status=$(dd if=/dev/ttyS0 bs=1 count=1 2>/dev/null)worked like a charm ![]()
Offline
Pages: 1