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

HID error and network install #458

Closed
peterharperuk opened this issue Dec 15, 2022 · 18 comments
Closed

HID error and network install #458

peterharperuk opened this issue Dec 15, 2022 · 18 comments
Assignees

Comments

@peterharperuk
Copy link
Collaborator

Describe the bug

See https://forums.raspberrypi.com/viewtopic.php?t=339219

It seems some users are seeing "HID error" and that's stopping the device booting normally. It seems that it's possible to get stuck waiting for the ethernet cable to be plugged in?

Looking at the code. After a HID error we reply to the find a keyboard event. If the bootloader doesn't see that usb has an error the it will think a key has been pressed. It'll then wait 10 mins for the ethernet cable to be plugged in*. It doesn't look like anything is setting the error in the usb host after a HID error. We also reset usb after a hid error - I don't know if that's relevant at all.

  • The 10 mins to plug the cable in seems too long, maybe reduce to 2 mins?

Steps to reproduce the behaviour

Tricky - need a keyboard that reproduces the problem. Might be easier to reproduce with wireless keyboards/mice

Device (s)

Raspberry Pi 4 Mod. B

Bootloader configuration.

Latest

System

No response

Bootloader logs

No response

USB boot

No response

NVMe boot

No response

Network (TFTP boot)

No response

@peterharperuk peterharperuk self-assigned this Dec 15, 2022
@lurch
Copy link
Contributor

lurch commented Dec 15, 2022

Tricky - need a keyboard that reproduces the problem. Might be easier to reproduce with wireless keyboards/mice

If you're able to identify what the "bad" USB HID sequence is, perhaps you could program a Pico to emulate that? 🤷‍♂️

@cleverca22
Copy link

cleverca22 commented Dec 15, 2022

@lurch if somebody with an offending keyboard, runs modprobe usbmon and then fires up wireshark and captures the usb descriptors while plugging it in

then a pico could be programmed to repeat those same descriptors

HID is a mostly one-way protocol, so there isnt much the firmware or linux could do differently, and the messages the device sends should be fairly identical

@fgibaux
Copy link

fgibaux commented Dec 18, 2022

Hi, I'm getting this error with my remote keyboard (ID 1997:2433 Shenzhen Riitek Technology Co., Ltd wireless mini keyboard with touchpad) I did a capture while plugging it in my laptop:
rii_remote_port2.tar.gz

HTH

@peterharperuk
Copy link
Collaborator Author

I have one of these Riitek keyboards now (model RT-MWK01, mini wireless keyboard mouse combo). I saw the problem once, However it's now working fine, which confuses me. I do see the odd HID error, but it doesn't seem to stop boot happening.

@lurch
Copy link
Contributor

lurch commented Dec 21, 2022

Just a random guess - is it possible that it sends out "bad" HID packets when it gets low on battery? 🔋 🤷

@peterharperuk
Copy link
Collaborator Author

Got it again. It's starting net install because the bootloader hasn't been passed the error from usb.

@peterharperuk
Copy link
Collaborator Author

I have a fix for this

@peterharperuk
Copy link
Collaborator Author

Test bootloader image attached. Format an UNUSED sd card with this image using RPI Imager and power up a rpi4 and it will update the bootloader. In network install it should show the version 2b8fa59f in the bottom right

rpi-eeprom-recovery.zip

timg236 added a commit to timg236/rpi-eeprom that referenced this issue Jan 5, 2023
* Update VL805 to 138C0 - fix for handling of split transactions
* Fix HID error handling with network install
  raspberrypi#458
timg236 added a commit to timg236/rpi-eeprom that referenced this issue Jan 5, 2023
* Update VL805 to 138C0 - fix for handling of split transactions
* Fix HID error handling with network install
  raspberrypi#458
timg236 added a commit to timg236/rpi-eeprom that referenced this issue Jan 5, 2023
* Update VL805 to 138C0 - fix for handling of split transactions
* Fix HID error handling with network install
  raspberrypi#458
timg236 added a commit to timg236/rpi-eeprom that referenced this issue Jan 5, 2023
* Update VL805 to 138C0 - fix for handling of split transactions
  raspberrypi/linux#5262
* Fix HID error handling with network install
  raspberrypi#458
XECDesign pushed a commit to XECDesign/rpi-eeprom that referenced this issue Jan 6, 2023
* Update VL805 to 138C0 - fix for handling of split transactions
  raspberrypi/linux#5262
* Fix HID error handling with network install
  raspberrypi#458
timg236 added a commit to timg236/rpi-eeprom that referenced this issue Jan 18, 2023
Interesting changes since the last default release
* Update VL805 to 138C0 - fix for handling of split transactions
  raspberrypi/linux#5262
* Fix HID error handling with network install
  raspberrypi#458
bmiddha pushed a commit to bmiddha/rpi-eeprom that referenced this issue Jan 28, 2023
Interesting changes since the last default release
* Update VL805 to 138C0 - fix for handling of split transactions
  raspberrypi/linux#5262
* Fix HID error handling with network install
  raspberrypi#458
@ascot7654321
Copy link

Hello.
I have the same Problem. Not every time i reboot, but often!
but my english is not very good. I dont understand if u found the solution in this thread or are you still trying things?
I got a rapoo E2710 Keyboard.
You think this is causing the error?
What can i do?
thank you

@peterharperuk
Copy link
Collaborator Author

Do you have the latest version of the bootloader?

@ascot7654321
Copy link

I have no idea. I got 2 SD cards, one with raspberryOS, other one with libreelec. Both got this mistake. Where can i Check the bootloader version and how can i update it?

@peterharperuk
Copy link
Collaborator Author

On Raspberry Pi OS run: rpi-eeprom-update

@ascot7654321
Copy link

rpi-eeprom-update:
*** UPDATE AVAILABLE ***
BOOTLOADER: update available
CURRENT: Wed 7 Dec 14:24:15 UTC 2022 (1670423055)
LATEST: Wed 11 Jan 17:40:52 UTC 2023 (1673458852)
RELEASE: default (/lib/firmware/raspberrypi/bootloader/default)
Use raspi-config to change the release.

VL805_FW: Using bootloader EEPROM
VL805: version unknown. Try sudo rpi-eeprom-update
CURRENT:
LATEST:

@ascot7654321
Copy link

How to update?

@peterharperuk
Copy link
Collaborator Author

sudo rpi-eeprom-update -a

@ascot7654321
Copy link

sudo rpi-eeprom-update -a
*** INSTALLING EEPROM UPDATES ***

BOOTLOADER: update available
CURRENT: Wed 7 Dec 14:24:15 UTC 2022 (1670423055)
LATEST: Wed 11 Jan 17:40:52 UTC 2023 (1673458852)
RELEASE: default (/lib/firmware/raspberrypi/bootloader/default)
Use raspi-config to change the release.

VL805_FW: Using bootloader EEPROM
VL805: up to date
CURRENT: 000138a1
LATEST: 000138a1
CURRENT: Wed 7 Dec 14:24:15 UTC 2022 (1670423055)
UPDATE: Wed 11 Jan 17:40:52 UTC 2023 (1673458852)
BOOTFS: /boot
Using recovery.bin for EEPROM update

EEPROM updates pending. Please reboot to apply the update.
To cancel a pending update run "sudo rpi-eeprom-update -r".

reboot

thx a lot. i will check if the error occurrs aggain.
Can i do the same with the libreelec sd card?

@peterharperuk
Copy link
Collaborator Author

The bootloader is in an eeprom, not on the SD card, so you shouldn't have to do it again.

@ascot7654321
Copy link

ah ok, thank you aggain very much!

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

5 participants