Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

reconnecting to arduino? #1

Closed
lwille opened this Issue · 7 comments

4 participants

@lwille

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
v0.6.11

FTDI Driver v2.2.16
@jgautier
Owner

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

FYI, hitting reset on the 'duino works as well

@lwille
@paultag

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

@jgautier
Owner

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 rwaldron referenced this issue from a commit in rwaldron/firmata
@rwaldron rwaldron 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>
d48a948
@jgautier jgautier closed this in b0d000a
@rwaldron
Collaborator

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

@jgautier jgautier reopened this
@jgautier
Owner

awesome! pull request away!

@jgautier jgautier closed this issue from a commit
@rwaldron rwaldron Force reset firmware to its default state. Fixes #1
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
4bcceb6
@jgautier jgautier closed this in 4bcceb6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.