it seems that I accidentally found a way to make my two Arduino nano clones run without resetting on serial connection close/reconnect. On one hand, this behavior is much closer to the desired behavior and on the other hand it feels hackish, because I don't know the cause yet.
The devices are still able to be flashed with new firmware
I assume that it has to do with the usage of socat
as proxy for the devices in question. The described behavior was first observed after playing with socat
. The command that finally worked for me:
/usr/bin/socat -s -d /dev/ttyACM3,b115200,cs8,parenb=0,cstopb=0,clocal=0,raw,echo=0,setlk,flock-ex-nb,nonblock=1 PTY,link=~/.pyduin/ttyACM3.tty,b115200,cs8,parenb=0,cstopb=0,clocal=0,raw,echo=0,setlk,flock-ex-nb,nonblock=1
An Arduino Uno with the exact same firmware/treatment does not show the same bahavior.
Any ideas what had gone wrong? And how to restore the default FTDI behavior?
1 Answer 1
What you have done is to disable the "HUPCL" signal that is sent when the port is opened/closed.
You can turn the signal back on with:
$ stty -F /dev/ttyACM3 hupcl
And you can turn it off again with:
$ stty -F /dev/ttyACM3 -hupcl
HUPCL means "HangUP on CLose".
-
Yes, that was the cause. Thanks. Btw, is it safe to use it as a proxish feature? I mean the arduino does not reset on reconnect and there are tons of guys in the internet asking for that feature.moestly– moestly2018年03月25日 13:54:34 +00:00Commented Mar 25, 2018 at 13:54