UltimateHackingKeyboard / agent

Ultimate Hacking Keyboard configurator
https://ultimatehackingkeyboard.github.io/agent/
Other
692 stars 77 forks source link

Agent does not recognise keyboard #2284

Closed thegeologician closed 2 weeks ago

thegeologician commented 1 month ago

The UHK Agent recently does not recognise the keyboard any more, it only shows "Searching for your UHK - Hang tight!".

I think I identified the issue (and found a work-around), I just want to report it here:

Opening the Agent, I got above message that it didn't find the keyboard. I auto-updated the Agent as was suggested. Same behaviour. My usual setup has the UHK plugged into a Dell Docking station (WD19TBS). This docking station recently received a firmware update. I had not used the Agent since that update... Plugging the keyboard directly into the Laptop allows the Agent to recognise it, and allowed me to update to the latest firmware version (11.0.0 -> 11.1.0). However, even after updating the UHK to latest, when plugged back into the docking station, the Agent does not recognise it. This does not present a problem as such, as the keyboard still works as intended (it also did before the firmware update), I just wanted to report this here for you to include in future Agent versions.

ert78gb commented 1 month ago

Could you start the Agent from a terminal with -- --print-usb-devices command line arguments? I am curious what are the USB devices that report the docking station.

thegeologician commented 1 month ago

After status messages that look like a normal startup, this is the relevant list:

12:50:37.063 > [DeviceService] start poll UHK Device
12:50:37.275 > [UhkHidDevice] Devices before checking permission:
12:50:37.304 > [UhkHidDevice] Available devices changed.
12:50:37.305 > [UhkHidDevice] Added: {"vendorId":"0x1D50","productId":"0x6124","path":"\\\\?\\HID#VID_1D50&PID_6124&MI_02#c&3787feb3&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}","serialNumber":"","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 60 v2","release":258,"interface":2,"usagePage":12,"usage":1}
12:50:37.305 > [UhkHidDevice] Added: {"vendorId":"0x1D50","productId":"0x6124","path":"\\\\?\\HID#VID_1D50&PID_6124&MI_03#c&27786fa&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}","serialNumber":"","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 60 v2","release":258,"interface":3,"usagePage":1,"usage":128}
12:50:37.306 > [UhkHidDevice] Added: {"vendorId":"0x1D50","productId":"0x6124","path":"\\\\?\\HID#VID_1D50&PID_6124&MI_00#c&1127c637&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\\KBD","serialNumber":"","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 60 v2","release":258,"interface":0,"usagePage":1,"usage":6}
12:50:37.306 > [UhkHidDevice] Added: {"vendorId":"0x1D50","productId":"0x6124","path":"\\\\?\\HID#VID_1D50&PID_6124&MI_01#c&2457e275&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}","serialNumber":"","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 60 v2","release":258,"interface":1,"usagePage":1,"usage":2}
12:50:37.307 > [UhkHidDevice] Added: {"vendorId":"0x1D50","productId":"0x6124","path":"\\\\?\\HID#VID_1D50&PID_6124&MI_04#c&2ae234c3&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}","serialNumber":"","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 60 v2","release":258,"interface":4,"usagePage":65280,"usage":1}
12:50:37.368 > [UhkHidDevice] Available devices unchanged
12:50:37.370 > [UhkHidDevice] Used device: {"vendorId":"0x1D50","productId":"0x6124","path":"\\\\?\\HID#VID_1D50&PID_6124&MI_04#c&2ae234c3&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}","serialNumber":"","manufacturer":"Ultimate Gadget Laboratories","product":"UHK 60 v2","release":258,"interface":4,"usagePage":65280,"usage":1}

After that, it keeps flooding the console with repetitions of:

12:50:37.386 > [DeviceOperation] right module deviceProtocolVersion: 1280.0.0
12:50:37.399 > [DeviceOperation] Read "leftHalf" version information
12:50:37.410 > [DeviceOperation] Read "leftHalf" repo information
12:50:37.425 > [DeviceOperation] Read "leftHalf" firmware checksum
12:50:37.429 > [DeviceService] Device connection state query error TypeError: Cannot read properties of undefined (reading 'slotId')
    at li.getHardwareModules (C:\Users\mr\AppData\Local\Programs\uhk-agent\resources\app.asar\electron-main.js:2:501324)
    at async li.uhkDevicePoller (C:\Users\mr\AppData\Local\Programs\uhk-agent\resources\app.asar\electron-main.js:2:510681)
ert78gb commented 1 month ago

The reason is deviceProtocolVersion is extremely high. If you connect directly to the keyboard then changing the deviceProtocolVersion ? Do you use smart macro?

mondalaci commented 2 weeks ago

Closing due to the lack of replies. Feel free to follow up regardless.

thegeologician commented 2 weeks ago

Hi, sorry, I didn't see the reply. How would I change deviceProtocolVersion, and to what value? I seem not to be able to find that information...

I saw on other issue threads on here, that in some cases, resetting the configuration and re-flashing the firmware was recommended - should I try that?

ert78gb commented 2 weeks ago

please try the https://github.com/UltimateHackingKeyboard/agent/issues/2273#issuecomment-2115211212 instructions.

thegeologician commented 1 week ago

Sorry, late reply again. I'll need to take my UHK home from work for that, to do the compilation on Linux... I'll report once I got around to trying it.