-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Device not always detected as HID device #74
Comments
Definitely odd, I've got a ton of devices and never seen this.
|
I have been having the exact same issue. Testing with the rickroll example was working intermittently and at some point the computer I was testing just started detecting the device only as USB JTAG/serial debug unit - this is on Windows 10. My device is also LilyGo T-Dongle S3 Windows 11 PC is detecting it correctly for now. |
|
This seems like USB CDC on boot. When the device hits the boot loaded it is starting its own USB stack for serial mode debugging. It needs to not do that |
I suspect lilygo is shipping devices with different efuses. It looks like the USB_PHY_SEL eFuse needs to be burnt. I've had a quick look and it doesn't seem like pio supports setting esp32 efuses in the IDE but there is a python tool espefuse.py that can do it. Maybe the Arduino IDE can do it? |
So is there anything can I do something to help you confirm this? |
You could try blowing that eFuse and see if that fixes the issue |
Should I burn it with a 0 then? If I understood the documentation correctly, I should run the following command:
Which is returning the following error:
|
|
Yep, looks like it is consistently being detected as a HID device. Let me do some verifying on another machine, but seems good now. |
Can you confirm that setting USB_PHY_SEL to 1 fixed the issue. Also can you confirm you can still DFU flash the device. |
If you provide some more instructions I can also test the fix you used to confirm if it's working. |
I can confirm that it fixed the issue.
I cannot confirm I can still DFU flash just now, I will be able to do it in a few hours. |
Great news, it would be great to get the command line you used and I'll update the wiki. |
You need to install the esptool and then run the following command with the device in flashing mode (port may change):
|
Hello. I have checked this, and I was able to program the device with PIO, but with some issues. The device appears now as I had to execute the following command:
or
Otherwise, I was getting the error Also, the flashing procedure ended with the following error:
Which leads me to believe that the flashing works OK, but it either tries to reset it, and now it can't, or it wasn't trying it before. Maybe these cannot entirely be considered problems. The first one happened also with arduino, for example, which required you to be root or have the adequate permissions, and the second one could maybe be solved by adding the suggested flag? (I think it is OK to have to reset it manually). Either way, I think it would be good to see if there is a workaround, or document it otherwise. Thanks! |
Hi Hegocre...after this one-way burn of the fuse, will this prevent updates via the Web Installer? Can it see & use the new COM port? |
If it does, there is undocumented OTA flashing method that I can document. I suspect that it will still work. |
When trying to flash from espwebtool, I'm getting the following error:
Also, a device with a warning appeared in device manager: |
That's a pity..my success rate is ~1/4 getting HID. ElegantOTA might be the Jailbreak here. |
Just to verify, I tried with VScode and PIO on Windows (I was previously doing it from Linux), and it is also working succesfully, so it looks like a problem with espwebtool. |
Can confirm. I just burnt the fuse and it indeed fixed the problem. HID appears every reset. I can update via VScode/PIO but not via the Web Installer just as Hegocre said. |
Hi @i-am-shodan Related to this issue, I've been experimenting with the agent installer script, and I was having some trouble. After investigating a bit, I found that after the agent.img is mounted (USB_MOUNT_DISK_READ_ONLY), the serial and HID devices disappear, and a new serial device with id Also, the command WAIT_FOR_USB_STORAGE_ACTIVITY hangs forever at waiting for MSC activity, I temporarily replaced it with simple DELAY, and that's how I found the problem above. Could this be related to this issue? Thanks! |
Worth saying that I checked the efuses on my favourite device which doesn't show any of these issues From a pio terminal I ran
USB_PHY_SEL is unset
|
Maybe is then an issue with another eFuse? Would it be useful if I send you the complete summary? |
I to have this issue except when it is not occasionally it is never detected as a hid device always shows up ejectable as USB JTAG no HID or ducky scripts will run unless you only want to change the LCD that is all I can get it to do besides wifi and interface there but no payloads will work for the ESP tool it fails to set port and burn the refuse I am at a loss for my failure on this one |
Your problem
When connecting the device to a computer, either Linux or Windows, it is inconsistently being detected as a Keyboard (TinyUSB) or as a serial device (USB JTAG/serial debug unit). In both cases, the Wi-Fi AP and the web interface start successfully, and I can connect to the webpage and grab the logs (attached later).
If I try to run other payloads stored on the SD card from the web interface (for example, the YouTube part of the Rickroll one), it only works when it is detected as TinyUSB, and not in the other case.
The rest of the settings of the device are the default ones.
As stated before, I've encountered the problem with at least three different computers, using both Windows 10 and Windows 11, as well as Arch Linux.
Your device
Language (HID attacks only)
The Keyboard layout is
win_es
, which I've compiled into the firmware. The keyboard layout on the computer is also ES. There are no errors in the logs regarding this.Your DuckyScript
The payload on the device is the following one, which just disables the LED and the screen:
Your debug logs
Additional information
Any more info which could be useful, I will gladly provide it.
Thank you very much for this tool.
The text was updated successfully, but these errors were encountered: