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 issues. #2507

Open
kareltucek opened this issue Jan 24, 2025 · 4 comments
Open

Flashing issues. #2507

kareltucek opened this issue Jan 24, 2025 · 4 comments

Comments

@kareltucek
Copy link
Contributor

kareltucek commented Jan 24, 2025

(This is tested at 8031f0e)

Bugs:

  • Agent says flashing was successful, yet shows every half on a different tag (attachment 1). According to uart log, left half wasn't flashed at all.
  • (Note: I don't see any message about matching checksums in the agent UI.) Upon closer inspection I see it in the flash log.
  • Dongle needs better support. Not seeing its version on the firmware tab is definitely a problem.

Another try with ...

Evidence: (attachment 3)

  • left firmware wasn't flashed
  • right half Error: Left checksum differs from the expected! Expected '6182ba0ca098e48548ac30a441 26fdd7', got 'be9c3aaaf3c3bb42a37f65caf5bd21c2'!
    (6182 is correct according to package.json)
    (this is incorrect as be9c is uhk60 left module checksum, not uhk80 lef half. This is my bug to fix. Will fix it shortly.)
  • over usb left reports:
$ ./cmd.sh left 0 8
executing /opt/agent/packages/usb/send-command.ts --vid=0x37a8 --pid=7 0 8
Byte result:
0 48 100 102 53 98 49 48 50 51 49 97 97 99 99 100 56 101 102 99 99 98 56 48 57 53 100 102 49 101 101 53 52 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

String result:
0df5b10231aaccd8efccb8095df1ee54

(Note that this checksum isn't contained in the package.json at all, so left half firmware should have been flashed by Agent.)

Attachment1:
Image
Attachment3:

Image

Requests:

  • It has to be clear that a device is up to date but was not flashed.
  • When flashing for the second time around (i.e., user has not switched from the firmware tab since last flashingor something like that), Agent has to flash everything irrespectively of the checksums, as this is not the first time we have a trouble with incorrect checksums.

(This is for reference only. I will follow up with further specification.)

@kareltucek
Copy link
Contributor Author

Sorry for taking so long. Anyways, here is a new reference firmware:

uhk-firmware-12.3.1-uart-fixes-v5.2.tar.gz

introduced changes (uart-fixes-v5.2):

  • Renaming:
    • DevicePropertyId_FirmwareChecksum -> DevicePropertyId_BuiltFirmwareChecksumByModuleId
    • ModulePropertyId_FirmwareChecksum -> ModulePropertyId_RemoteFirmwareChecksumBySlotId
  • I have added ModuleId_Dongle = 254
  • I have added UsbStatusCode_GetDeviceProperty_InvalidArgument = 3
  • Uhk80 left uhk80 right and uhk dongle now report their checksums according to their module ids. E.g.,
    • you can retrieve dongle checksum by 0 8 254 from any of the three devices.
    • 0 8 0 against dongle will now return right half's firmware checksum.
  • bumped the fix device protocol version to 4.14.1

Fixes:

  • asking uhk80 right for left half firmware checksum (0 8 1) now returns uhk80 left half built checksum instead uhk 60's.

Robert would you do a review for the commit itself - UltimateHackingKeyboard/firmware@dbbe7d7.

Needed Agent changes:

  • (Rename things so that codebases are in sync)
  • Requesting uhk80 left half and dongle built-firmware checksums now needs their module ids instead of ModuleId_RightHalf

UI proposals:

  • show check mark left of the firmware line when the firmware upgrade has been successfull
  • show tilde when firmware upgrade is not needed
  • on mouseover, show details of the last upgrade - exact reason it has been or not been updated, including specific checksums.

Dongle... ...needs to be handled better by both firmware and Agent, but that is for later.

@mondalaci
Copy link
Member

Image

show check mark left of the firmware line when the firmware upgrade has been successful

The checkmark is already present. Do you mean another icon?

show tilde when firmware upgrade is not needed

Where should it be shown? At the same place as the checkmarks? If so, I recommend the https://fontawesome.com/icons/empty-set?f=classic&s=regular icon.

on mouseover, show details of the last upgrade - exact reason it has been or not been updated, including specific checksums.

mouseover over what UI element?

@kareltucek
Copy link
Contributor Author

The checkmark is already present. Do you mean another icon?

I mean exactly these checkmarks. Based on the testing in the first post, the checkmarks are shown even when the firmware was not flashed (when checksums matched).

show tilde when firmware upgrade is not needed

Where should it be shown? At the same place as the checkmarks?

Yes, instead of the checkmark when the firmware was not flashed

If so, I recommend the https://fontawesome.com/icons/empty-set?f=classic&s=regular icon.

(I am not sure about that as a crossed thing evokes a failure.)

But indeed the only functional requirement is that it has to be different from a checkmark :-).

mouseover over what UI element?

over the checkmark, tilde, cross, ..., discussed above

@mondalaci
Copy link
Member

Let's use the https://fontawesome.com/icons/circle-exclamation?f=classic&s=solid icon to indicate failure.

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

No branches or pull requests

2 participants