Skip to content

Prevent firmware version checks during firmware upgrade #2733

@kareltucek

Description

@kareltucek

These days, once UHK80 right establishes connection with left, it checks that both sides are on the same version. If not, it logs an error. The timeline may be as follows:

  • right is flashed
  • right reboots, connects with left and notices non-matching firmware and logs
  • left is flashed

In order to combat this, we have initially introduced a minute or so long timer since the reconnection to the version check, however, people tend to let the firmware upgrade procedure unattended, and so it often stalls on waiting for the user to reconnect the usb cable from right to left, which means that after the timer runs out, left is still alive and still on the old version.

UltimateHackingKeyboard/firmware#1348 implements a new usb variable, 0x09, which allows Agent to disable the check.

Please amend the firmware upgrade procedure so that:

  • after right is flashed, this variable is set to false.
  • when left half is flashed or the upgrade procedure finishes, or is terminated for any reason, set it to true again.

It is not tested, so don't hesitate to bump me if it behaves in a non-intuitive manner. E.g., if it takes left half a while to boot, I can increase the check timer (which is currently 1 second from the moment the variable is set to true again) so that left half has enough time to boot and etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions