So basically it's simple to get around this auto reset behavior by just removing the cap the connects to the Arduino reset pin.
Yes, It's actually two signal lines on the RS-232 that are activated when a port is opened, DTR and RTS. The process of opening a comm port (at least on windows) cause DTR/RTS to be turned on. There might be away to defeat this action in the device driver, but I'm not sure. Nor do I know how the Linux and Mac behave when opening a comm port.
#!/bin/bashstty -F /dev/ttyUSB0 cs8 115200 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts -clocal # sets up serialdate > /root/arduinonew # saves date to filecat /dev/ttyUSB0|head -n 8|tail -n 4 >> /root/arduinonew # appends arduino output to file
toptions.c_cflag &= ~HUPCL; // disable hang up on close (toggling DTR) This is the modified bit
/* FIXME: HUPCL: generate modem disconnect when all has closed or exited */
One thing that can be done is clear this bit early before starting any application. Should work, I'll have selfonlypath test it as soon as possible.
stty -f /dev/tty.usbserial.* (Replace * with correct name)stty -f /dev/tty.usbserial.* -hupcl