Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

reconnecting to arduino? #1

lwille opened this Issue Feb 27, 2012 · 7 comments


None yet
4 participants

lwille commented Feb 27, 2012

When I restart my node process (i.e. hit ctrl+c or let node.dev kill and restart it), it's not possible to reconnect to the arduino. THe connection is only working when pulling the USB plug before re-running the process. Sometimes waiting about one minute also helps, but this is not reproducible.

Am I alone with this issue or is there a workaround?

$ uname -a
Darwin leos-imac.fritz.box 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64
$ node -v

FTDI Driver v2.2.16

jgautier commented Feb 29, 2012

I also have had this problem. I usually just disconnect and reconnect the usb like you suggested. However I think using the signal events http://nodejs.org/docs/latest/api/process.html#signal_Events it would be possible to capture the processes closing and close the serial port connection. Hopefully this would fix the issue. I will try to implement this over the next couple days.

paultag commented Mar 30, 2012

FYI, hitting reset on the 'duino works as well

lwille commented Mar 30, 2012

Yeah, but how do I press a reset button in Switzerland when I am in Germany? :)

paultag commented Mar 30, 2012

Hey, I'm not putting it out there as fixed, just trying to save someone some time if they come across this bug :)


jgautier commented Apr 2, 2012

I attempted to put in a fix by closing the serial port when the process exits, doesnt seem to have worked though. I think maybe something needs to happen in the firmata sketch to make it close correctly I will keep you guys posted if i make any progress.

rwaldron added a commit to rwaldron/firmata that referenced this issue Apr 10, 2012

Close serial on process SIGINT. Fixes #1
Sorry, but my editor removes all trailing whitespace, so there are a number of lines in the diff where trailing WS was auto-removed.

Signed-off-by: Rick Waldron waldron.rick@gmail.com <waldron.rick@gmail.com>

@jgautier jgautier closed this in b0d000a Apr 13, 2012


rwaldron commented Jul 20, 2012

Request to re-open. I have a reliable fix for this now

@jgautier jgautier reopened this Jul 20, 2012


jgautier commented Jul 20, 2012

awesome! pull request away!

@jgautier jgautier closed this in 4bcceb6 Jul 28, 2012

jgautier added a commit that referenced this issue Jul 28, 2012

Merge pull request #12 from rwldrn/1
Force reset firmware to its default state. Fixes #1

jgautier added a commit that referenced this issue Aug 6, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment