-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Increase wait for upload port timeout to 5s on all platforms #4515
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
Increase wait for upload port timeout to 5s on all platforms #4515
Conversation
@Breidenbach thanks for taking the time to try out this patch and provide feedback. I would not expect any difference in behaviour compared to the latest hourly build with an Arduino Uno board. The I tried it out with an Uno on my OS X 10.11.3 laptop and no issues:
|
e86fd39
to
7ed0cb1
Compare
@tigoe if you have some time, could you please try out the latest build with a SAMD based board (on native USB) with and without a USB hub on your Mac. I noticed OS X would report "Resource Busy" if a |
Just the latest nightly? Will try next time I hit a network with my laptop Tom Igoesent on the go. please forgive any terseness or typos
|
Tried 2 times with blink to Leonardo, 1 time with another sketch using serial output, none ran, but none disabled bluetooth keyboard or mouse. Did get attached report but about excessive wake-ups. Hal
|
@tigoe sorry, this build specifically: http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-4515-BUILD-515-macosx.zip (from #4515 (comment)) The changes are not in master yet. |
@Breidenbach thanks for trying. I have no issues loading the blink example onto my Leonardo. How does the behaviour you are seeing compare to the latest hourly build? |
The same. I haven’t tried the hourly builds for a while, since they wiped out bluetooth to the keyboard and mouse and I had to keep rebooting to get them back. I notice that the device is listed at the bottom of the screen, and the compile messages look good. As I’m writing this, I see that the device is listed as bluetooth. (screen shot 1) I ran it again with the leonardo device (screen shot 2) and lost the keyboard and mouse. On the second try the L light pulsed 14 times, the the RX light pulsed twice, then nothing. Running Yosemite Hal
|
@sandeepmistry, I tried with a MKR1000 and it worked great, uploaded perfectly every time. Even when the serial monitor was open. I also tried unplugging the board with the serial monitor open then plugging it back in and uploading, and it worked perfectly. Tried the same thing with a 101 board, and the upload worked fine there as well. If I had the serial monitor was open and I unplugged the board, I got "board is not available" after a few seconds, but upload continues to work fine. I also have a Feather M0 on me, and wanted to test with that, since I had a terrible time with the Feathers yesterday in a workshop. Sometimes I had to hit upload ten times, using 1.6.7. I don't know what's different about their bootloader from the standard M0 bootloader, but there is definitely a difference. But when I opened the PR4515 build 515 version, the Feather board definitions disappeared, and I couldn't install them via the boards manager. As a matter of fact, all my third party boards had disappeared. I didn't test too far on that, though. It seems like it's only looking at the arduino-beta folder in Arduino15/packages, and none of the other folders in packages/. Is that the case? I have no hub with me right now, sorry, and no boards other than the three I mentioned. |
@Breidenbach thanks for the info. I suggest you create a forum post about your issues. As they are outside the scope of this pull request. (Btw, when you reply via email Github does not show any of your attachments). |
@tigoe great, thanks for trying! We'll hold off merging this until we get feedback on behaviour with a USB hub. Both with and without a hub, are reliable for me. I'll look into why the other board manager boards aren't visible with this IDE build. It's based on an hourly build from yesterday. I'm curious to see if it improves sketch uploads to the Feather M0 on a Mac. |
@tigoe I had no issues with seeing the Feather M0 board when adding via the board manager and this IDE build: Could you please try the latest hourly build, to see if it has the same issue. |
Once i eliminated the arduino-beta folder I was able to see it fine as well. With the Feather M0, I’m still getting No device found on cu.usbmodem1421 about every other upload. FWIW, I’m also getting this: Warning: platform.txt from core 'Adafruit SAMD Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core. Could that be related to the upload issue? Maybe there’s something in their version of the M0 board definition that needs updating?
|
The warning is unrelated to the uploading in this care.
I suspect there is something up with the bootloader, the Zero/MKR1000 bootloader seems slower than the Leonardo's for USB CDC to initialize. The Adafruit bootloader appears to be even more slower at this. In my latest change, I added a 250ms delay after the The "No device found on cu.usbmodem1421" error message from I'm not too keen on bumping the delay now, having the IDE try to open the port until it is non-busy might be a better option. |
Hi @sandeepmistry , |
The second part, instead, looks really good 😄 |
OS X 10.11 seems to be slower, increasing timeout to 5s on all platforms to keep things simple.
…source busy" errors on open
7ed0cb1
to
7cb1399
Compare
@facchinm thanks for reviewing! I've applied your suggestion from #4515 (comment) in sandeepmistry@7cb1399. Unfortunately #4482 still fails every second sketch upload with the MKR1000 + USB, with the following
|
✅ Build completed. Please test this code using one of the following: ⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-4515-BUILD-522-linux32.tar.xz ℹ️ The |
This fixes timeout problems for me on OS X 10.10.5 with MKR-1000. |
OS X 10.11 seems to be slower (with Arduino Zero native port), increasing timeout to 5s on all platforms to keep things simple.
This helps address arduino/ArduinoCore-samd#62.