Skip to content

Conversation

@calvinli
Copy link
Contributor

@calvinli calvinli commented Apr 4, 2015

I found that the previous reset code did not work for Leonardo or Micro, nor did any reset code anywhere on the internet.

An examination of the Arduino IDE source code (and the JNI code behind its serial implementation) shows that it holds RTS high and DTR low when doing the 1200 baud open/close. And it turns out that's exactly what's needed!

I found that the previous reset code did not work for Leonardo or Micro, nor did any reset code anywhere on the internet.

An examination of the Arduino IDE source code (and the JNI code behind its serial implementation) shows that it holds RTS high and DTR low when doing the 1200 baud open/close. And it turns out that's exactly what's needed!
@calvinli
Copy link
Contributor Author

calvinli commented Apr 4, 2015

A correction: it is the JSSC source code, not the Arduino source, that contains the RTS/DTR weirdness: https://github.com/scream3r/java-simple-serial-connector/

@sej7278
Copy link
Collaborator

sej7278 commented Apr 4, 2015

@calvinli Brilliant!

This definitely works for me when the old method won't. Tried with 1.0.5 and 1.6.3 with Leonardo and Sparkfun Pro Micro.

I do recall reading in the 1.6 releasenotes that they'd ditched the old reset method in favour of doing it with JSSC (as the 1.6.3 IDE resets fine too now whereas 1.0.5 didn't always) as Debian has only just started packaging it.

@sudar I wouldn't be so bold as to merge an external PR myself, but this looks good to me (needs a note in HISTORY.md)

@sudar sudar closed this in c4089c0 Apr 4, 2015
@sudar
Copy link
Owner

sudar commented Apr 4, 2015

@calvinli

Thanks for the pull request. We have been having this issue with reset for a really long time.

@sej7278

Thanks for testing the patch. Just merged it.

@sudar sudar added this to the 1.5 milestone Apr 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants