Skip to content
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

Flashing firmware on Android is slow #438

Closed
dlech opened this issue Aug 16, 2021 · 6 comments
Closed

Flashing firmware on Android is slow #438

dlech opened this issue Aug 16, 2021 · 6 comments
Assignees
Labels
hub: cityhub Issues related to the LEGO Powered Up Smart hub (Hub No. 4) hub: technichub Issues related to the LEGO Technic hub (Hub No. 2) OS: Android Issues that only occur on Android software: pybricks-code Issues with https://code.pybricks.com application topic: flashing firmware Issues related to fhe firmware flashing process

Comments

@dlech
Copy link
Member

dlech commented Aug 16, 2021

Describe the bug
Flashing firmware on City Hub and Technic Hub using Android OS takes longer than on other platforms.

To reproduce
Steps to reproduce the behavior:

  1. Get a stopwatch
  2. Time firmware flashing on non-Android
  3. Time firmware on Android

Expected behavior
Times should be reasonably close.

@dlech dlech added hub: cityhub Issues related to the LEGO Powered Up Smart hub (Hub No. 4) hub: technichub Issues related to the LEGO Technic hub (Hub No. 2) OS: Android Issues that only occur on Android software: pybricks-code Issues with https://code.pybricks.com application topic: flashing firmware Issues related to fhe firmware flashing process labels Aug 16, 2021
@dlech
Copy link
Member Author

dlech commented Aug 16, 2021

As discussed in #403 (comment), this is caused by a bug in Chromium where the MTU is negotiated to the minimum value on Android and higher values on other platforms.

Upstream bug is https://crbug.com/1164621. There has been a preliminary patch proposed there, so we just need to get it officially submitted and merged.

@dlech dlech added the blocked: upstream This issue is with a 3rd-party project and is out of scope of Pybricks label Aug 16, 2021
@dlech
Copy link
Member Author

dlech commented Nov 16, 2021

This has been fixed in Chromium 98.

We could modify https://github.com/pybricks/pybricks-code/blob/e7d44ea9a9195bc2a612a22acd84e09dfc048dac/src/firmware/sagas.ts#L382 to check for this version or just wait until most of the world has upgraded and remove the Android check there altogether.

@dlech dlech removed the blocked: upstream This issue is with a 3rd-party project and is out of scope of Pybricks label Nov 16, 2021
@dlech dlech self-assigned this Dec 6, 2022
@dlech
Copy link
Member Author

dlech commented Dec 8, 2022

Fixed in pybricks/pybricks-code@614e0b0

@dlech dlech closed this as completed Dec 8, 2022
@laurensvalk
Copy link
Member

What is the behavior on older phones after this fix? Just slow or broken?

@dlech
Copy link
Member Author

dlech commented Dec 9, 2022

The age of the phone doesn't matter, only the version of Chrome. Firmware will fail to flash versions prior to 98 which was released over a year ago.

@laurensvalk
Copy link
Member

Ah. I was thinking of Android not getting updates on older phones., but indeed Chrome should still be getting updates on those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hub: cityhub Issues related to the LEGO Powered Up Smart hub (Hub No. 4) hub: technichub Issues related to the LEGO Technic hub (Hub No. 2) OS: Android Issues that only occur on Android software: pybricks-code Issues with https://code.pybricks.com application topic: flashing firmware Issues related to fhe firmware flashing process
Projects
None yet
Development

No branches or pull requests

2 participants