I've managed to get my Arduino hooked up a router, flashed with OpenWrt, via its USB port. Everything is hunky-dory, and I can interface via ser2net, and upload new hexes remotely using AVRDude. So far, so good.
However, I'm having a devil of a time stopping the blasted thing resetting on me when I initiate serial contact. I can't keep the serial port open (it's a remotely hosted ruby-on-rails website which pings the board every hour or so). For some reason, the resistor from ground to 5v or 3v trick isn't working for me (any clues on this? Its an Arduino Mega).
My web sleuthing has uncovered that I maybe need to disable hupcl (dtr?), but I'm having no luck with that either. Ser2Net has the following settings:
33:raw:600:/dev/ttyACM0:115200 NONE 1STOPBIT 8DATABITS -XONXOFF -LOCAL -RTSCTS
And the service is started as follows with /etc/init.d/ser2net :
stty -F /dev/ttyACM0 -hupcl
stty -F /dev/ttyACM0 hupcl
What I want to be able to do, here, is autostart ser2net without hupcl for usual processing. Then, when I occassionally want to update the firmware, I should be able to shut ser2net down (and re-engage hupcl) and then do an upload with avrdude.
But I'm still getting an autoreset on initiation of serial. Bah. Any clues?