arduino / arduino/Arduino

Leonardo 32U4: Injecting extracurricular delays caused by outside influences unbeknownst to the Arduino IDE suffers timeout.

Open
#9,353 0 comments 0 reactions 0 assignees View on GitHub
Component: Uploading Type: Bug
Dominant language
Java
Stars
14.6k
Forks
7k
PR merge metrics
No merged PRs in 30d

Description

Running Arduino IDE on Linux is not an issue, everything seems to work good there.

It's pretty much similar to the issue here: https://github.com/arduino/Arduino/issues/3495 except with the addition of extracurricular delays caused by outside influences unbeknownst to the Arduino IDE causing a timeout.

I've yet to test a regular Arduino with the 2 methods here: http://nonasuomy.github.io/Arduino-Remote-Upload/

The 32u4 with it's special case of the delay way it connects to serial with the IDE seems to be the issue.

Maybe having definable delays as an option. If you know it takes X time for USB/IP and Services to reconnect. Instead of hardcoded wait timeouts.

I tried to recompile the IDE by manually changing the delays set, but then hit another error about the butterfly programmer failing as I wasn't really sure what I was doing to begin with... trial and error.

It found the port again though after massively increasing the hardcoded delays to 20000 maybe I increased another delay that dealt with how it picks up the butterfly programmer.

I edited these three values to 20,000 leagues under the sea.

https://github.com/arduino/Arduino/blob/master/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java#L213

https://github.com/arduino/Arduino/blob/master/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java#L232

https://github.com/arduino/Arduino/blob/master/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java#L269

Any suggestions in getting USBIP https://wiki.archlinux.org/index.php/USB/IP and or QEMU/Libvirt working with the Leonardo 32U4 are welcome!

_Originally posted by @NonaSuomy in https://github.com/arduino/Arduino/issues/3495#issuecomment-546397239_

Contributor guide

Open the contributing guide

Research direction

Start in arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java at the reported lines 213, 232, and 269, and inspect how the Leonardo 32U4 upload waits for serial reconnection. Reproduce the Linux USB/IP or QEMU/libvirt setup if possible and compare it with the reported 20,000 ms delay changes; done means uploads no longer time out during reconnection without breaking normal uploads.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, linux
Domain
operating-systems, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.