On Mon, June 23, 2008 9:20 am, Tosoni wrote: >> the right direction to be able to read the temperature from command line? >> Josh >> > Reading a serial device from the commannd line is not easy. > First because each command you type closes the port after running and so it > flushes buffers. > > I would suggest using shell parenthesis to group the commands > Use stty to set the port to raw mode etc. > Use 'echo' and 'dd' which is like 'cat' but much more configurable for buffer sizes > something like: > ( stty 9600 raw; echo 'request'; dd bs=1 count=10 >response.out) </dev/serialusb >&0 > > Unfortunately it doesn't seem to work. This is the general output (I tried several tty speeds): osmosis:/home/josh# ( stty 9600 raw; echo 'request'; dd bs=1 count=10 >response.out) < /dev/ttyUSB0 >&0 bash: echo: write error: Bad file descriptor 0+0 records in 0+0 records out 0 bytes (0 B) copied, 32.3506 s, 0.0 kB/s -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html