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
RPi4 Home Assistant OS 6.4 won't boot if RFLink is plugged in a USB port #1544
Comments
With RFLink, do you mean this device? It seems that U-Boot, our bootloader, gets stuck in your case. In 6.2 and earlier versions U-Boot tried to initialize USB but failed (see #1203). With HAOS 6.3 I added a patch which fixes U-Boot: It successfully can start the USB bus now. However, unfortunately, this seems to have uncovered other bugs (like #1538, and this issue). I could just "break" USB in the bootloader again, but that seems a step backwards. Can you try the following U-Boot build: u-boot-32-bit-with-screen.zip Plug the SD card in your PC. The first partition should be a readable partition and contain a file named This should enable the screen and show what goes wrong during boot. |
Something must be really special with that device. I tried all three popular USB to UART bridges: CP2102N, FTDI and CH341 (as well as a Keyboard) connected to my Raspberry Pi 4, and the system still reboots fine with HAOS 6.4. |
Hi agners, yes this is exactly this kind of device. This is based on Arduino Mega. I tried your u-boot with screen. Here is what is shows: Then it reboots... And loops on this. Looks that a similar issue exists on balena-os that also uses u-boot. Check here for a potential fix. Hope this can help you. |
Hm, it looks very much related, but from what I can tell this fixes a null pointer dereference, and yours seems to be caused by a |
I found some more, probably related fix in the same patchset. Can you also give a test with this U-Boot, independent of the result above? |
Hello, |
Hi larrychapard.
|
Thanks for this anwer Antro31. |
@antro31 thanks for your testing. Yeah its kinda what I feared, those patches do not address the underlying issue. This is a bit of a wild guess, but maybe it helps U-Boot with disable USB keyboard. Can you test this version? |
Hi Stefan, thanks for the try, but bad luck. Result is exactly the same as my post 2 days ago. here |
Hi Stefan,
BTW, My RPI4 is a 2GB model. |
I do have an Arduino here, but its FTDI based and FTDI seem not to be problematic. I see that Arduino have different chips which are used to connect to USB (ATmega8U2 or ATmega16U2). I try to get to the bottom of this, but I need the exact setup to replicate the issue here. @antro31 you are using Arduino Mega is that correct? Which revision? @larrychapard What exact Arduino version/revision are you using? Exact variants, revisions or pictures help :) |
Hello Agners, I have two arduino:
When only UNO is connect, boot on Harddisk is OK, I have to disconnect MEGA, start Rapsberry and connect MEGA, after boot on hardisk. For information, I have not FTDI on ardunio, I use only Firmataexpress on these arduino. |
On my side, this is the same arduino Mega R3.
|
I did receive the an Arduino Mega R3 and can reproduce the issue here 🎉 On first sight it seems to be related with descriptor strings which can't be read from the device. I assume that this is a bug in the firmware of the ATmega16U2 which acts as USB to serial converter. Specifically, the device announces three strings:
However, when trying to read the product string, it seem the device disappears from the bus. This brings U-boot to crash currently. There is a fix for the crash, but U-Boot will then still retry reading that string (and the serial number successively) which takes more than 10 seconds... I am pretty sure this is also a problem on Linux, but it seems that Linux gracefully skips the Product string:
Any other device which announces a Product strings does response to those requests:
Long story short: This is a broken USB device, but it seems that other systems can deal with it. I'll check if I can make U-Boot behave more gracefully. Btw, this has been reported previously for 64-bit HAOS in #1011. Only now with 32-bit USB being fixed in #1529, this started to show up on 32-bit HAOS too. I see if I can build a |
…t#1544) Some USB devices cause the USB stack to get stuck with a TRB stall error. This adds a patch which recovers from this situation. This avoids an U-Boot crash when Arduino Mega R3 devices are connected, which cause an USB stall when trying to read the product string.
…t#1544) Some USB devices cause the USB stack to get stuck with a stall error. This adds a patch which recovers from this situation. This avoids an U-Boot crash when Arduino Mega R3 devices are connected, which cause an USB stall when trying to read the product string.
Some USB devices cause the USB stack to get stuck with a stall error. This adds a patch which recovers from this situation. This avoids an U-Boot crash when Arduino Mega R3 devices are connected, which cause an USB stall when trying to read the product string.
Some USB devices cause the USB stack to get stuck with a stall error. This adds a patch which recovers from this situation. This avoids an U-Boot crash when Arduino Mega R3 devices are connected, which cause an USB stall when trying to read the product string.
This is fixed with HAOS 6.5 (currently on beta channel). |
I confirm this is OK in HAOS 6.5. |
Hello, I confirm the system starts up well with ardunio connected @agners A big thank-you Larry |
Hardware Environment
Home Assistant OS release:
Not available
Supervisor logs:
Not Available
Journal logs:
Not Available
Kernel logs:
Not available
Description of problem:
Using RPi4 with Homeassistant OS 6.4 (32 bits) with RFLink connected to RPi USB Port (no external power on RFLink)
When upgrading to 6.4, RPI does not boot anymore.
RFLink connected to RPi has been identified has being the issue since unplugging it allows RPi to boot.
Problem is reproducible.
Booting with 6.2 with RFLink plugged in USB worked before. So this is a regression.
This should have been corrected by #1539 in 6.3, looks similar to #1011 (but this works with 6.2).
Nothing is displayed on the screen (blank screen) and RPi keeps on trying to reboot.
Had to rever to 6.2 to have everything working.
The text was updated successfully, but these errors were encountered: