Skip to content

Fix auto-reset on Leonardo-derived boards from Linux hosts #2709

New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 16, 2015

Conversation

projectgus
Copy link
Contributor

I noticed auto-reset for catarina/atmega32u4 baords wasn't working in 1.6.0 on my Linux computer, and traced it back to the change from librxtx to JSSC.

Technical details in the commit message. I haven't tested this on other platforms, I expect it would probably not break anything but I guess you can never really tell. :)

Hoping I'm not too late to miss the boat for 1.6.1.

Also renamed the touchPort() function, as it's now unambiguously
single-purpose.

The 1200bps reset from Linux hosts wasn't working with these newer
JSSC-based versions. Adding a step which explicitly sets DTR low (via a
TIOCMSET ioctl clearing DTR) fixes this.

I'm fairly sure the reason why this worked on older Arduino with librxtx
and not with jssc is that librxtx appears to keep HUPCL in the termio
flags, but jssc appears to remove it. If HUPCL ("hangup on close") is
set, it causes DTR to be explicitly pulled low on close.
@ffissore
Copy link
Contributor

@ArduinoBot build this please

@facchinm facchinm self-assigned this Mar 13, 2015
@facchinm
Copy link
Member

Hi @projectgus, very neat patch and complete explanation, thank you!
It works perfectly under Linux, I'll test it in other platforms and merge soon if everything is ok!

facchinm added a commit that referenced this pull request Mar 16, 2015
Fix auto-reset on Leonardo-derived boards from Linux hosts
@facchinm facchinm merged commit 2222e0f into arduino:master Mar 16, 2015
facchinm added a commit to arduino/arduino-create-agent that referenced this pull request Sep 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants