Skip to content

Stop ModemManager corrupting Arduino uploads #2966

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
Aug 31, 2019

Conversation

pfeerick
Copy link
Contributor

On boards like the Arduino Micro, when in bootloader mode it appears ModemManager interferes with the programming process and result in a catastrophic failure with no end of different errors including, but not limited to:

error: programmer did not respond to command: write block
error: butterfly programmer uses avr_write_page() but does not provide a cmd() method.
error: programmer did not respond to command: set addr

After this, the device could appear to be completely non-functional, refusing to enumerate or appear for programming, but thankfully a double-reset will usually recover it, but the underlying ModemManager issue will still prevent successful programming. Hence the additional rules.

This affects not only PlatformIO, but also the Arduino IDE (on linux).

For my device, I only needed the first of two lines edited, but might as well do both as it will likely cause problems for all the range. I have not tested this outside of my own development box, but ModemManager is the cause of no end of Arduino upload issues on linux.

On boards like the Arduino Micro, when in bootloader mode it appears ModemManager interferes with the programming process and result in a catastrophic failure with no end of different errors including, but not limited to:
```
error: programmer did not respond to command: write block
error: butterfly programmer uses avr_write_page() but does not provide a cmd() method.
error: programmer did not respond to command: set addr
```
After this, the device could appear to be completely non-functional, refusing to enumerate or appear for programming, but thankfully a double-reset will usually recover it, but the underlying ModemManager issue will still prevent successful programming. Hence the additional rules. 

This affects not only PlatformIO, but also the Arduino IDE (on linux).
@ivankravets
Copy link
Member

Should we add this for other rules?

@pfeerick
Copy link
Contributor Author

pfeerick commented Aug 31, 2019

Since ModemManager is only really supposed to interact with...

mobile broadband (2G/3G/4G) devices and connections

... and these are not those... so probably should, as the need for this stems from a change in behaviour in ModemManager that doesn't sound like it's going away. I've just only been making changes when I've encountered problems and hadn't detected any unforeseen side effects.

If you want me to update all the entries, I'll go ahead and update the PR.

@ivankravets ivankravets merged commit bdce78b into platformio:develop Aug 31, 2019
@ivankravets
Copy link
Member

Good, let's wait if someone reports any issues. Thanks!

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.

2 participants