-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Rework serial ports handling #4792
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
Conversation
Disable Compile/Run buttons as they get press, and reenable only on function exit. The launched upload process has now a 2minutes timeout before being terminated forcefully. 10 second after pressing "Upload" the button comes pressable again, but this time the previous upload command gets killed explicitely
This commit introduces the concept of stateful board list (vs. original stateless) and board serial number. The board is now an "entity" composed by the triplet port/vid/pid. These informations come from libListSerial "light" function. When the board list changes, it triggers a request for the additional infos to libListSerial. These information contains the serial number of the boards. These brings a lighter and faster scanning process. Some logic has been introduced to handle a board with the S/N only exposed in the bootloader (like 32u4). In this case the disappearing port acquires the bootloader's S/N A menu (under Ports menu) shows the currently connected port info and can be used for bugreporting
No joke? This build seems to crash for me shortly after showing the splash screen. If I run arduino_debug I get the following:
|
@TMRh20, on Windows10 and Windows 7 x86_64 it's running correctly, can you post your pc specs? |
Please post also the content of: |
Well its not a new system: Windows 7 Home Premium
|
I've updated the jni lib with an extra safety check, jenkins is producing the build and it should post it here in a couple of minutes. |
✅ Build completed. Please test this code using one of the following: ⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-4792-BUILD-538-linux32.tar.xz ℹ️ The |
@facchinm No prob, but unfortunately I am getting much the same. I tried replacing the file and then grabbed the full build. I hope its not just my PC, but 1.6.7 is working.
|
I'm relaying the test results of a forum user from http://forum.arduino.cc/index.php?topic=390855. Using Windows:
|
Just tested PR-4792-BUILD-538-windows.zip (twice - as I walked away the first time and though I mustn't have actually run it until I saw the log file), and got nothing other than the splash screen and a error log (attached). I also noticed another behaviour about PR-4482-BUILD-531-windows - it stopped doing the resets after I had uploaded a sketch - until I opened and closed the serial monitor. (Let me know if you prefer in-line logs in future to zipped ones) |
I have also just tested the arduino-PR-4792-BUILD-538-windows.zip on Windows 10 64-bit and just like the others, it crashed after the splash screen. These is the content of my log file.
|
67bc1ac
to
62398f9
Compare
@TMRh20 @per1234 @pfeerick @waiweng83 a new build is ongoing, in the meantime you can test using http://downloads.arduino.cc/liblistSerials/liblistSerials-1.1.0.zip |
✅ Build completed. Please test this code using one of the following: ⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-4792-BUILD-547-linux32.tar.xz ℹ️ The |
Tested the arduino-PR-4792-BUILD-547-windows.zip on Windows 10 64-bit and it's working perfectly now. Thanks :) |
@facchinm Tested arduino-PR-4792-BUILD-538 with the substituted liblistSerials-1.1.0.zip file on Windows 10 with my two Sparkfun RedBoards and a just arrived FTDI nerO board (don't have any ordinary Arudino's on hand at the moment). Works perfect now for me - no constant reboot cycle, no constant flashing and no IDE crash on startup ;) |
arduino-PR-4792-BUILD-547-windows.zip looks good to me. No problems so far! |
Tested w/arduino-PR-4792-BUILD-538 + liblistSerials1.1.0 & all working with Due clone, Mega2560, Pro Minis etc! |
b6dd9e8
to
bf11c7f
Compare
Merging to give it some testing in the wild |
✅ Build completed. Please test this code using one of the following: ⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-4792-BUILD-550-linux32.tar.xz ℹ️ The |
Running the "Arduino 1.6.9 2016/04/06 07:33" on Windows 10, no issues at all with resets or upload with an Arduino Uno, Arduino Mega, Sparkfun RedBoard or FTDI NerO. Checking a bit further since I had these four boards out, and on 1.6.8, neither the Arduino Uno or Arduino Mega were having issues. It seems (as far as I can tell from this sample) that the FTDI UART boards were the ones having issues with resets - the Atmega16U2 UARTs seemed just fine. :( |
Yep, the "reset" issue was for FTDI devices only (16u2 devices could have randomly experienced the "PORT is in use" issue which has been solved by pausing polling during upload |
Great! I half wonder if it is may actually be a flaw in the driver, as I noticed another behaviour sometimes when the Arduino IDE wasn't running was that if you disconnected another (either the Uno/Mega or a FTDI based) device from the hub, both the FTDI boards would immediately reset. It isn't 100% consistent when the IDE is closed, but does seem consistent when it is open. Now I'm wondering what my CH340 UARTs will think of this! xD EDIT: Doesn't look like my super expensive $1.78 CH340 UARTs are affected either :) |
Hourly build "1.6.9 hourly build 2016/04/07 12:33" is looking good, thanks. |
Arduino 1.6.8 and 1.6.9 crashes right after splash screen or when I plug my breakout board mcp2221. This seems to be problem when arduino try list serial ports available.
|
Version liblistSerials-1.1.3 solved my problem! Thanks! MCP2221 working great with Arduino IDE 1.6.8 - 1.6.9. |
This PR should solve #4700 and #4777
The serial polling on Windows now behaves exactly as in 1.6.7 with its pros and cons (3 seconds poll rate, high cpu usage but no problem with port being occupied by the process).
All platform need to be tested since the underlying handling of the ports has been strongly modified.
The libSerialPort 1.0.8 source code is here (for reference https://github.com/arduino/listSerialPortsC/tree/test_usbSearch)
@waiweng83 @steronydh @ElektorLabs @ozligia @TMRh20 @pfeerick please test the build produced by @ArduinoBot and report ANY problem you encounter.
Everyone else, please test this before it gets merged (thanks 😄 )