Skip to content

Left half of UHK 80 not working with firmware 18.0.x (CRC-invalid UART message received!) #1622

Description

@lo48576

Context

My UHK 80 works as expected with firmware 17.2.0, but after upgrading to 18.0.0 or 18.0.1, the left half is not working as expected.
The right half seems to work.

Steps to reproduce

Upgrade to 18.0.0 (or 18.0.1).

  1. Flush the right half. This seems to be OK.
  2. Disconnect the USB cable from the right half, and connect to the left half.
  3. Flush the left half.
  4. After the left half flushed, its background LED brightness seems to be reset (in my case, becomes very bright).
  5. Disconnect the USB cable from the left half, and connect to the right half.
  6. Now the left half is not working.

Tried several times and 100% reproducible.

Actual behavior

  • The key backlight brightness of the left half seems to be reset: I set it to 12 when USB-powered, but it becomes super bright after the upgrade.
  • Pressing a key puts the right half LCD Crc-invalid UART message received! Unknown log line.
    • OS doesn't seem to recognize any keys on the left half being typed.
    • The keys on the right half works as usual.
  • Additionally, UHK agent shows some warnings at the bottom of the window.
Warning: Left and right keyboard halves have different firmware versions (Left: 0.0.0, Right: 18.0.1)!
Warning: Left and right keyboard halves have different git tags (Left: , Right: v18.0.1)!
Warning: Left checksum differs from the expected! Expected '73239989ac951ab2724c19ef356e1a4a', got ''!
Warning: Left checksum differs from the expected! Expected '73239989ac951ab2724c19ef356e1a4a', got ''!
    This may happen during firmware upgrade. Please make sure that both halves are flashed to the same version!Warning: Keyboard halves have zero versions! This may happen during firmware upgrade. Please make sure that both halves are fla

Expected behavior

Left half works as usual after upgrading to 18.0.x.

Additional info

Versions

  • Agent 10.1.0 (Linux x86_64 AppImage)
  • UHK 80
  • firmware (working): 17.2.0
  • firmware (not working), 18.0.0, 18.0.1
  • modules: key cluster module (12.3.0), trackball module (12.3.0)
  • OS: Gentoo Linux (amd64), kernel 7.2.4

Logs during firmware upgrade

Start flashing firmware
[DeviceService] stop poll UHK Device
[DeviceService] stopped poll UHK Device
[DeviceService] Operating system: Linux 7.2.4-gentoo x64
[DeviceService] Agent version: 10.1.0
[DeviceService] New firmware version: 18.0.1
[DeviceService] New firmware user config version: 15.0.0
[DeviceOperation] Read "leftHalf" version information
[DeviceOperation] Read "leftHalf" repo information
[DeviceOperation] Read "leftHalf" firmware checksum
[DeviceOperation] Read "leftModule" version information
[DeviceOperation] Read "leftModule" repo information
[DeviceOperation] Read "leftModule" firmware checksum
[DeviceOperation] Read "rightModule" version information
[DeviceOperation] Read "rightModule" repo information
[DeviceOperation] Read "rightModule" firmware checksum
[DeviceService] UHK Device firmware upgrade starts: {"id":4,"asCliArg":"uhk80-right","firmwareUpgradeMethod":"mcuboot","logName":"UHK 80 right","name":"UHK 80","keyboard":[{"vid":14248,"pid":9}],"bootloader":[{"vid":14248,"pid":8}],"buspal":[],"reportId":4}
[DeviceService] Current Device right built firmware checksum: 60377aeadc5fb8815761f8897f0d2459
[DeviceService] New Device right firmware checksum: de8c1e7e9cbddfc5ec505f2fff854886
[UhkOperations] Start flashing device firmware with mcuboot
[UhkOperations] Start flashing UHK 80 right firmware with mcumgr
[UhkOperations] Reenumerate bootloader
[UhkHidDevice] Device communication closing.
[UhkHidDevice] Device communication closed.
[UhkHidDevice] Start reenumeration, mode: Bootloader, timeout: 5000ms
[UhkHidDevice] Available devices unchanged
[UhkHidDevice] Reenumeration error. We hope it would not break the process Error: Cannot write to hid device
    at HIDAsync.<computed> [as write] (/tmp/.mount_uhk-aggGhhJG/resources/app.asar/node_modules/node-hid/nodehid.js:165:54)
    at go.reenumerate (/tmp/.mount_uhk-aggGhhJG/resources/app.asar/electron-main.js:2:707759)
    at async nr.updateFirmwareWithMcuManager (/tmp/.mount_uhk-aggGhhJG/resources/app.asar/electron-main.js:2:738893)
    at async as.updateFirmware (/tmp/.mount_uhk-aggGhhJG/resources/app.asar/electron-main.js:2:809716)
    at async ts.process (/tmp/.mount_uhk-aggGhhJG/resources/app.asar/electron-main.js:2:789384)
[UhkHidDevice] closing normal keyboard after reenumeration
[UhkHidDevice] Available devices changed.
[UhkHidDevice] Removed: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw6","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":0,"usagePage":1,"usage":6}
[UhkHidDevice] Removed: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw7","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":1,"usagePage":1,"usage":2}
[UhkHidDevice] Removed: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw8","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":2,"usagePage":65280,"usage":1}
[UhkHidDevice] Removed: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw9","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":3,"usagePage":12,"usage":1}
[UhkHidDevice] Added: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw8","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","release":0,"interface":-1}
[UhkHidDevice] Could not find reenumerated device: Bootloader. Waiting...
[UhkHidDevice] Available devices changed.
[UhkHidDevice] Removed: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw8","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","release":0,"interface":-1}
[UhkHidDevice] Available devices unchanged
[UhkHidDevice] Could not find reenumerated device: Bootloader. Waiting...
[UhkHidDevice] Available devices changed.
[UhkHidDevice] Added: {"path":"/dev/ttyACM0","manufacturer":"Ultimate Gadget Laboratories","serialNumber":"692D1F81A5BF7BB8","pnpId":"usb-Ultimate_Gadget_Laboratories_UHK_80_right_half_bootloader_692D1F81A5BF7BB8-if00","vendorId":"0x37A8","productId":"0x0008"}
[UhkHidDevice] Device communication closing.
[UhkOperations] Init SerialPeripheral: /dev/ttyACM0
[UhkOperations] Read UHK 80 right firmware from file
[UhkOperations] Write memory with mcumgr
[UhkOperations] Reset mcu bootloader
[UhkOperations] Close mcu communication channels
[UhkOperations] UHK 80 right firmware successfully flashed
[DeviceService] Waiting for keyboard
[DeviceService] Disable firmware version check.
[UhkHidDevice] Available devices changed.
[UhkHidDevice] Removed: {"path":"/dev/ttyACM0","manufacturer":"Ultimate Gadget Laboratories","serialNumber":"692D1F81A5BF7BB8","pnpId":"usb-Ultimate_Gadget_Laboratories_UHK_80_right_half_bootloader_692D1F81A5BF7BB8-if00","vendorId":"0x37A8","productId":"0x0008"}
[UhkHidDevice] Added: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw2","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":0,"usagePage":1,"usage":6}
[UhkHidDevice] Added: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw6","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":1,"usagePage":1,"usage":2}
[UhkHidDevice] Added: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw7","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":2,"usagePage":65280,"usage":1}
[UhkHidDevice] Added: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw8","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":3,"usagePage":12,"usage":1}
[UhkHidDevice] Used device: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw7","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":2,"usagePage":65280,"usage":1}
[UhkHidDevice] productId: 9 protocol versions: {"firmwareVersion":"18.0.1","deviceProtocolVersion":"4.19.0","moduleProtocolVersion":"4.3.0","userConfigVersion":"15.0.0","hardwareConfigVersion":"1.0.0","smartMacrosVersion":"3.15.0"}
[DeviceOperation] Read "rightModule" version information
[DeviceOperation] Read "rightModule" repo information
[DeviceOperation] Read "rightModule" firmware checksum
[DeviceService] User configuration will be saved after right module firmware upgrade
[SmartMacroService] start downloading firmware documentation {"firmwareGitRepo":"UltimateHackingKeyboard/firmware","firmwareGitTag":"v18.0.1"}
[SmartMacroService] firmware documentation downloading
[DeviceOperation] Update userConfig.lastSaveFirmwareTag. UltimateHackingKeyboard/firmware/v17.2.0 => UltimateHackingKeyboard/firmware/v18.0.1
[UhkHidDevice] Device communication closing.
[UhkHidDevice] Device communication closed.
[DeviceService] Left module firmware version:  null
[DeviceService] Left module remote firmware checksum:  null
[DeviceService] Left module built firmware checksum:  73239989ac951ab2724c19ef356e1a4a
[DeviceService] To continue the firmware upgrade, now connect the left half via USB. (You can disconnect the right half or use a second USB cable.)
[SmartMacroService] firmware documentation downloaded
[SmartMacroService] reference manual downloading
[SmartMacroService] reference manual downloaded
[UhkOperations] Start flashing UHK 80 left firmware with mcumgr
[UhkOperations] Reenumerate bootloader
[UhkHidDevice] Device communication closing.
[UhkHidDevice] Start reenumeration, mode: Bootloader, timeout: 5000ms
[UhkHidDevice] Available devices changed.
[UhkHidDevice] Removed: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw2","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":0,"usagePage":1,"usage":6}
[UhkHidDevice] Removed: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw6","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":1,"usagePage":1,"usage":2}
[UhkHidDevice] Removed: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw7","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":2,"usagePage":65280,"usage":1}
[UhkHidDevice] Removed: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw8","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":3,"usagePage":12,"usage":1}
[UhkHidDevice] Added: {"vendorId":"0x37A8","productId":"0x7","path":"/dev/hidraw2","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Left USB","release":1,"interface":0,"usagePage":1,"usage":6}
[UhkHidDevice] Added: {"vendorId":"0x37A8","productId":"0x7","path":"/dev/hidraw6","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Left USB","release":1,"interface":1,"usagePage":1,"usage":2}
[UhkHidDevice] Added: {"vendorId":"0x37A8","productId":"0x7","path":"/dev/hidraw7","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Left USB","release":1,"interface":2,"usagePage":65280,"usage":1}
[UhkHidDevice] Added: {"vendorId":"0x37A8","productId":"0x7","path":"/dev/hidraw8","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Left USB","release":1,"interface":3,"usagePage":12,"usage":1}
[UhkHidDevice] Reenumeration error. We hope it would not break the process Error: Cannot write to hid device
    at HIDAsync.<computed> [as write] (/tmp/.mount_uhk-aggGhhJG/resources/app.asar/node_modules/node-hid/nodehid.js:165:54)
    at go.reenumerate (/tmp/.mount_uhk-aggGhhJG/resources/app.asar/electron-main.js:2:707759)
    at async nr.updateFirmwareWithMcuManager (/tmp/.mount_uhk-aggGhhJG/resources/app.asar/electron-main.js:2:738893)
    at async as.updateFirmware (/tmp/.mount_uhk-aggGhhJG/resources/app.asar/electron-main.js:2:811834)
    at async ts.process (/tmp/.mount_uhk-aggGhhJG/resources/app.asar/electron-main.js:2:789384)
[UhkHidDevice] closing normal keyboard after reenumeration
[UhkHidDevice] Available devices changed.
[UhkHidDevice] Removed: {"vendorId":"0x37A8","productId":"0x7","path":"/dev/hidraw2","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Left USB","release":1,"interface":0,"usagePage":1,"usage":6}
[UhkHidDevice] Removed: {"vendorId":"0x37A8","productId":"0x7","path":"/dev/hidraw6","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Left USB","release":1,"interface":1,"usagePage":1,"usage":2}
[UhkHidDevice] Removed: {"vendorId":"0x37A8","productId":"0x7","path":"/dev/hidraw7","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Left USB","release":1,"interface":2,"usagePage":65280,"usage":1}
[UhkHidDevice] Removed: {"vendorId":"0x37A8","productId":"0x7","path":"/dev/hidraw8","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Left USB","release":1,"interface":3,"usagePage":12,"usage":1}
[UhkHidDevice] Added: {"vendorId":"0x37A8","productId":"0x7","path":"/dev/hidraw6","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","release":0,"interface":-1}
[UhkHidDevice] Could not find reenumerated device: Bootloader. Waiting...
[UhkHidDevice] Available devices changed.
[UhkHidDevice] Removed: {"vendorId":"0x37A8","productId":"0x7","path":"/dev/hidraw6","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","release":0,"interface":-1}
[UhkHidDevice] Available devices unchanged
[UhkHidDevice] Could not find reenumerated device: Bootloader. Waiting...
[UhkHidDevice] Available devices changed.
[UhkHidDevice] Added: {"path":"/dev/ttyACM0","manufacturer":"Ultimate Gadget Laboratories","serialNumber":"2199A3ACC814573A","pnpId":"usb-Ultimate_Gadget_Laboratories_UHK_80_left_half_bootloader_2199A3ACC814573A-if00","vendorId":"0x37A8","productId":"0x0006"}
[UhkHidDevice] Available devices unchanged
[UhkHidDevice] Device communication closing.
[UhkOperations] Init SerialPeripheral: /dev/ttyACM0
[UhkOperations] Read UHK 80 left firmware from file
[UhkOperations] Write memory with mcumgr
[UhkOperations] Reset mcu bootloader
[UhkOperations] Close mcu communication channels
[UhkOperations] UHK 80 left firmware successfully flashed
[DeviceService] To finish the firmware upgrade, now connect the right half via USB. (You can disconnect the left half or use a second USB cable.)
[SmartMacroCopy] start
[SmartMacroCopy] copy {"destination":"/home/nopth/.config/uhk-agent/smart-macro-docs/UltimateHackingKeyboard/firmware/v18.0.1","smartMacroDocFirmwarePath":"/tmp/uhk-ybagv0/doc"}
[SmartMacroCopy] done
[DeviceService] Enable firmware version check.
[UhkHidDevice] Available devices changed.
[UhkHidDevice] Removed: {"path":"/dev/ttyACM0","manufacturer":"Ultimate Gadget Laboratories","serialNumber":"2199A3ACC814573A","pnpId":"usb-Ultimate_Gadget_Laboratories_UHK_80_left_half_bootloader_2199A3ACC814573A-if00","vendorId":"0x37A8","productId":"0x0006"}
[UhkHidDevice] Added: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw2","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":0,"usagePage":1,"usage":6}
[UhkHidDevice] Added: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw6","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":1,"usagePage":1,"usage":2}
[UhkHidDevice] Added: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw7","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":2,"usagePage":65280,"usage":1}
[UhkHidDevice] Added: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw8","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":3,"usagePage":12,"usage":1}
[UhkHidDevice] Used device: {"vendorId":"0x37A8","productId":"0x9","path":"/dev/hidraw7","serialNumber":"3025857206","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 80 Right USB","release":1,"interface":2,"usagePage":65280,"usage":1}
[DeviceService] start poll UHK Device
[ZephyrLogService | UHK Dongle] Enabling
[ZephyrLogService | UHK 80 left] Enabling

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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