Thursday, 15 April 2010

linux - Can't echo to arduino serial port unless Arduino GUI Serial Monitor open -



linux - Can't echo to arduino serial port unless Arduino GUI Serial Monitor open -

i have rather unusual issue. dccduino uno (arduino uno copy) plugged xubuntu box via usb serial interface. using arduino gui serial monitor, can communicate board expected. also, when serial monitor open, can ssh box , run commands echo 1700 > /dev/ttyusb0 fine. however, close serial monitor (even if arduino gui still running) command no longer anything.

i have tried open serial port several combinations of stty arguments including from

stty -f /dev/ttyusb0 9600 cs8 cread clocal

to

stty -f /dev/ttyusb0 cs8 9600 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts

but won't write arduino. doing wrong?

edit:

i managed working using

stty -f /dev/ttyusb0 raw ispeed 9600 ospeed 9600 cs8 -ignpar -cstopb -echo cat < /dev/ttyusb0 > /dev/null & echo "1700" > /dev/ttyusb0

however, works backgrounded cat running. there way working without line?

as far know arduino communicates on serial comm port in way requires connection nowadays before serial commands can sent. think evolved method of preventing atmega chip getting stuck waiting commands. has compatible usb protocol prevents devices operating without connection made.

linux serial-port arduino

No comments:

Post a Comment