Skip to content

fix(ota): EU package host, short-lived refusals, success by reported version - #2

Merged
virtitnerd merged 1 commit into
virtitnerd:pr/firmware-installfrom
AlexanderBabel:fix/ota-a226-eu
Dec 4, 2026
Merged

virtitnerd merged 1 commit into
virtitnerd:pr/firmware-installfrom
AlexanderBabel:fix/ota-a226-eu

Conversation

@AlexanderBabel

Copy link
Copy Markdown

For upstream #255: fixes for the three issues in my test report (Qrevo Edge 2 Pro / a226, EU region, 02.43.62 → 02.45.78 through the iOS Update button). One commit on top of b683974.

What

  1. EU package host. cdn.awsde0.fds.api.mi-img.com is added to PACKAGE_HOSTS. The EU cloud serves the a226 package from there.
  2. A refusal before the robot was told anything is answered for 60 seconds only. _prepare failures (package refused, fetch failed) are marked untouched in the live status. After UNTOUCHED_SECONDS the status poll goes back to the cloud, which brings the Update button back. Before this change the error was replayed for 30 minutes and across restarts, and the app showed "network unavailable". The flag is saved, so a restart keeps it, and it is stripped from what the app gets. Failures after the robot was told keep the 30-minute window.
  3. Success no longer requires every byte. _failure now checks file_fetched instead of package_fully_fetched. The a226 fetched 0-4095, 4096-54715079 and 54718464-291835495 (a 3384-byte gap), then installed and reported 02.45.78. The existing check that the reported version matches the target still decides. package_fully_fetched is still recorded in the result for diagnostics.

Tests

  • test_the_eu_package_address_is_accepted: the real a226 address resolves to its MD5. The parametrized host test picks up the new host too.
  • test_a_package_fetched_with_a_gap_that_installs_the_target_is_a_success, plus test_a_partly_fetched_package_that_leaves_the_old_version_is_not_a_success in place of the old partial-fetch test.
  • test_a_refusal_before_the_robot_was_told_is_shown_briefly_and_survives_a_restart.
  • The brief-disconnect test now expects the new message.

uv run pytest -q: 1058 passed.

On hardware, (1) and the gap from (3) are what happened on the a226. (2) and the new success rule are tested by unit tests only. The install itself succeeded with (1) applied, and the FAILED status from (3) was cleared by hand.

…version

Found installing 02.45.78 on a Qrevo Edge 2 Pro (a226, EU region):

- The EU cloud serves packages from cdn.awsde0.fds.api.mi-img.com, which was
  not in PACKAGE_HOSTS, so the install stopped with "The cloud's package
  address is not in the expected form".
- A refusal before the robot was told anything stayed in the live status for
  30 minutes and across restarts. The app's status poll got it back on every
  visit to the firmware page, showed "network unavailable" and offered no
  Update button. Such a refusal is now answered for 60 seconds only.
- The a226 fetches the package in ranges and skips 3384 bytes
  (0-4095, 4096-54715079, 54718464-291835495), then installs it and reports
  the new version, yet the install was recorded as FAILED. The success rule
  now needs the robot to have fetched the package from this server at all;
  the version it reports afterwards already decides whether it installed.
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