UltimateHackingKeyboard / agent

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

UHK-agent does not find uhk board and freezes in windows 10 after update to latest agent and firmware version (UHK board not usable) #2245

Closed huxendupsel closed 2 months ago

huxendupsel commented 2 months ago

User-Agent-Folder Log-File:C:\Users\huxendupsel\AppData\Roaming\uhk-agent User-Agent-Folder Start-File:C:\Users\huxendupsel\AppData\Local\Programs\uhk-agent Agent-Version:4.0.2 Windows Version: 22H2 (Build 19045.4291)

I can provide the uhk-agent.log if you give me an e-mail address where to send it to.

Maybe interesting part in the log:

Current state:

Expected:

The Agent should start and find the UHK Keyboard almost immediately, as it was the case in the prior version. The uhk board should work as expected.

Steps that lead to the current state:

I recently started the UHK-Agent. It started normally, found the uhk and stated that a new version of the agent was available. It has had problems to download it, so I did it manually (Downloaded the installer UHK.Agent-4.0.2-win.exe from the website and install the agent). First start of the agent was normal it detects the uhk board and states that a new firmware is available and that I should flash the board with this new firmware. So I exported my settings and start the firmware update process. At the end of the process I got an error message in the window (see line 11035 in the log) that indicates that the update did not finished successfully. Therefore I tried to google a bit around to find any hint as to what might have gone wrong and how to fix it. I found https://github.com/UltimateHackingKeyboard/agent/issues/1903 that I could not quite understand, but which for me points out a valid starting vector in rebooting the system. Starting the UHK-Agent after the restart reveals the first problem, the agent did not detect the uhk-board. The window is not responsive only a wait cursor is running. I also can not bring the window into the foreground using alt+tab.

Found a hint in https://github.com/UltimateHackingKeyboard/agent/issues/2215 to start the uhk-agent with option '-- --print-usb-devices' which I did. But I could not see anything suspicious (obviously since I actually don't know what I am doing :-D) Interestingly the UHK board still worked after flashing the new firmware but the agent did not.

At some point - unfortunately I don not know when exactly (I plugged the device out and back in, I let the uhk-agent run in the background until it found the UHK board eventually, but the agent window does not unfreeze)- the keyboard stopped working . As mentioned above the lights and the layer switching seems to work but the keystrokes do not result in any reaction on the screen. So for me this is the worst part, since currently I can not use the uhk board, which is my main input device.

The current status of the board is as follows: the UHK is connected directly to the PC and when I start the PC, the UHK board only lights up very briefly and displays FTY, after which the board switches off immediately. If I plug the device in and out several times (on the same usb port) or if I switch to another port (here i only need one out/in event) it eventually enters a state in which the board remains switched on. The keystrokes have no effect, so i can not type anything. I hope some of you guys have an idea what happend and how I can fix the current state.

ert78gb commented 2 months ago

Hi @huxendupsel

Found a hint in https://github.com/UltimateHackingKeyboard/agent/issues/2215 to start the uhk-agent with option '-- --print-usb-devices' which I did. But I could not see anything suspicious (obviously since I actually don't know what I am doing :-D)

is it mean the UHK keyboard listed?

kareltucek commented 2 months ago

If your config contained smart macros, then https://github.com/UltimateHackingKeyboard/firmware/pull/763 might be relevant. In that case updating to 11.0.2 (which I suspect is not packed with any Agent yet and so you have to download it manually from https://github.com/UltimateHackingKeyboard/firmware/releases ) should help.

kareltucek commented 2 months ago

(@mondalaci irrespectively of the cause of this issue, I think it would be a good idea to release an Agent with 11.0.2 firmware since https://github.com/UltimateHackingKeyboard/firmware/pull/763 while not occuring very often, it definitely is quite a hurdle for those that do encounter it.)

mondalaci commented 2 months ago

I wanted to make a release yesterday but couldn't because of an unrelated Agent issue, which I want to get resolved. I plan to make a release this month.

huxendupsel commented 2 months ago

Hello, thank you for you input so far. Regarding @ert78gb request

Hi @huxendupsel

Found a hint in #2215 to start the uhk-agent with option '-- --print-usb-devices' which I did. But I could not see anything suspicious (obviously since I actually don't know what I am doing :-D)

is it mean the UHK keyboard listed?

I have to correct / concretize my original statement. As I mentioned in my long error description there was a period in which the firmware was updated and the uhk board still worked. In this time the board was found by the -- --print-usb-devices. I remember that I saw multiple entries regarding uhk. Currently - keystrokes have no effect, connect to usb is weired - running the command do not list the uhk at all. Gathering the data also seems to be much faster than back then.

So I guess my problem level increased since I am not able to communicate with the uhk board anymore and therefor I am not able to update to a newer firmware? Again I can mail the uhk-agent.log (approx. 12000 lines) if this helps to understand what has happened.

I run a test by connecting the uhk board to a windows 11 laptop that it had never been connected to before. The uhk board is the only usb device connected to that laptop. Doing this the uhk board is not recognized at all. The lights only flashing once, the display shows FTY and the board immediately turns off.

Can you tell me what I can do next to revive the uhk? I just have noticed an hint to a reset button on the back of the board. Could this may be a possible solution. I am a bit cautious about my next steps, don't want to make things worse, although I do not think It could get any worse.

kareltucek commented 2 months ago

Well, following the unbricking procedure should work: https://ultimatehackingkeyboard.com/repair/unbricking-the-right-keyboard-half

Ideally please use older agent (e.g., 3.3.0 from https://github.com/UltimateHackingKeyboard/agent/releases; you may need to disable auto update in agent), and then after unbricking flash straight to 11.0.2.

huxendupsel commented 2 months ago

I did, but unfortunately the board is still not recognized by the uhk-agent. If I short the reset pads the lights of the board only flashing once and FTY is displayed, then the board turns off. The agent does not change at all it always displays no device detected. If I plug the board into a usb port wouldn't the normal behavior be that windows starts spinning and after a short time a message is displayed that uhk board is available? This does not happen in first place when I connected the board to the laptop it was never been connected to before.

mondalaci commented 2 months ago

Please use the newest Agent version because some older versions had problems with unbricking and then retry shorting the pads.

huxendupsel commented 2 months ago

Ok, thanks for the hint. So I used the uhk-agent 4.0.2 latest version from Mar 5th. Started it from terminal to see some log outputs. The terminal constantly logs: 22:27:59.308 > [UhkHidDevice] Available devices unchanged 22:27:59.580 > [UhkHidDevice] Devices before checking permission:

So I guess the logic is constantly checking to eventually detect the board. I then pluged in the board and short the reset pads. Unfortuneatly the uhk-agent does not recognize the board. The log keeps spamming the two mentioned outputs.

The behavior remains the same, the lights turn on briefly while the display shows FTY after this the board turns off.

mondalaci commented 2 months ago

Can you reproduce this issue with other computers?

huxendupsel commented 2 months ago

yes I have two Laptops. One with windows 11 and the other linux mint. I have the same behavior on both.

mondalaci commented 2 months ago

Please contact us, and we'll recall your UHK.