<div dir="ltr">Jake, That's a great idea. We need to figure out what the name of the device for the arduino keypad controller is and use that instead of the "try them all in a loop" code we have now.<div><br>
</div><div style>But really need to go to the root source of the problem, which is why is the port going away in the first place. Is the Arduino crashing and resetting itself? Is something on the RaspPi messing with the port? If we can solve that problem, then things will get much more stable.</div>
<div style><br></div><div style>Thoughts:</div><div style><br></div><div style>- Arduino might crash randomly if power over USB is marginal. We tried to run it off of a powered USB hub instead of directly off the RaspPi USB, but that made things worse, I think because the hub we used is ancient and not very good. It might be good to try a different powered up?</div>
<div style><br></div><div style>- Arduino code might have a software bug? I looked at the code, but didn't see anything obvious like a divide by zero or indexing an array out of bounds, but more eyes on that code might turn something up.</div>
<div style><br></div><div style>- If a second process on the RaspPi did an open() on the serial port already opened by the baron.py process, would that cause the Arduino to reset? Is there a way to check for this? Are calls to open() logged by the system someplace?</div>
<div style><br></div><div style>-steve</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 4, 2013 at 5:00 AM, Jake <span dir="ltr"><<a href="mailto:jake@spaz.org" target="_blank">jake@spaz.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">a really neat thing about linux these days - i don't know if this will work on the pi but when i want to script something involving a USB webcam or a USB serial port, instead of referring to it by /dev/ttyACM0 or whatever, i look for<br>

/dev/serial/by-id/usb-Keyspan_<u></u>_a_division_of_InnoSys_Inc._<u></u>Keyspan_USA-19H-if00-port0<br>
<br>
you can put that into your thing instead of /dev/ttyUSB0 or whatever, and it will always work - no matter what order the serial ports come up in.<br>
<br>
i mean not that you took my advice last time...<br>
<br>
-jake<div><div class="h5"><br>
<br>
max klein wrote:<br>
keypad update: with new self-healing improvements has just set record<br>
uptime at 30 hours. i am monitoring this. the problem is that rpi sometimes<br>
chokes and the arduino comes up as a different usb device. so i constantly<br>
scan and to find the right usb device. an issue is that the rfid needs to<br>
be usb0 so it has to grab that first, and normally does in every instance<br>
ive seen it (unless the pyshical usb order gets switched).<br></div></div>
______________________________<u></u>_________________<br>
sudo-discuss mailing list<br>
<a href="mailto:sudo-discuss@lists.sudoroom.org" target="_blank">sudo-discuss@lists.sudoroom.<u></u>org</a><br>
<a href="http://lists.sudoroom.org/listinfo/sudo-discuss" target="_blank">http://lists.sudoroom.org/<u></u>listinfo/sudo-discuss</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>-steve
</div>