USB not working on raspberry pi CM4

Hi,

I bought a CC2531 (pre-flashed with z-stack 1.2) and thought i could just plug it in and then find the device under hardware.
However, sadly it was not the case. No new device shows up and when i search for CC2531 it won’t show up either.
I also tried running ZHA and zigbee2mqtt using the default ttyACM0 which did not work either.
Then, i decided to SSH into the pi and tried running dmesg, lsusb and dev/serial/by-id and none of them gave any results.
I also tried hooking up a keyboard which i know is working on my laptop but the exact same result and obviously the keyboard did not work either. The CC2531 lights green when i plug it in and then the light turns off after a minut or so.
Can anybody please tell me how i can fix this issue. Thanks!

You mention a RPi CM4 (which is a PCB only without any consumer connectors like USB) but not which carrier board you are using which sadly makes it hard to help.

A few Yellow users have found their hardware dead/ faulty on arrival due to the CM4 not being properly seated on the carrier board - might be worth a try.

Some USB modules don’t like USB-3 (blue) ports, but work better on USB-2 (black). Brain-damaged hardware (like the faulty Aeotec Z-Stick Gen-5) only works in a hub as it doesn’t meet the basic USB standard without a hardware fix.

What OS are you running? I’d try booting the CM4 with RPi OS as a test to see if there is a difference in kernel driver support compared with HASS OS.

You have run most of the useful diagnostic commands, but to help more, we need to see the output (in code braces to make it readable):

  • ls -la /dev/tty*
  • lsusb -t (sadly, HASSOS uses the BusyBox version which doesn’t seem to have tree mode)
  • uname -a
  • sudo lshw|grep usb (not available on a HASSOS shell due to virtualisation)

If even a USB keyboard fails on the console (exp. with RPI OS), my guess is the CM4 is not connected to the carrier board properly, or the board has extra USB hub hardware which is not supported by your kernel/ is broken.

If this helps, :heart: this post!

1 Like

Thank you for thorough response.

Sorry i’m a noob using HA OS and HA community.

Sorry for the lack of information. The CM4 is attached to this carrier board:
https://sourcekit.cc/

FYI: Since i cannot use the terminal directly on the pi (keyboard not working) i have used the “SSH & Web Terminal” add-on in HA UI. I don’t know if that can impact the results - i guess not!

Home Assistant 2022.10.4
Supervisor 2022.10.0
Operating System 9.2
Frontend 20221010.0

I installed HA using the rpi imager.

To give you the full context: i installed HA on the pi about a month ago and the keyboard worked on the pi back then. Then i messed up the HA by accidentially changing configuration.yaml and afterwards found out the keyboard did no longer work on the pi - which i thought was related to messing up the HA. Then i ran i complete re-install of the HA by using the rpi imager by hooking up the pi to my laptop using the usb-c port on the pi while the eMMC boot was switched on by which the HA came alive again. However, the usb-A port did not.

Below I have tried two of the commands you provided on the HA OS. Sorry i could’nt figure out how to copy the code from the terminal, so i have added pictures instead - hope that is okay.

Using the “SSH & Web Terminal” i get the following (on the current HA OS):
ls -la /dev/tty* returns:

Using uname -a returns:
uname_out

If this cannot be used to proceed, I will later try installing RPi OS and copy the output in code braces if i figure out doing that without a keyboard - maybe through putty or whatever works.

We were all noobs once! :grinning: :mage:t2:

The secret to copying text from the HASS web console is to hold SHIFT when selecting - without, it looks like click-and-drag, but doesn’t use the clipboard (a regular PITA even to seasoned users).

/dev/ttyAMA0 looks the same as my Yellow running HASSOS 9.2 (wondered about permissions and owner audio, but it’s the same):

crw-rw----    1 root     audio     204,  64 Oct 12 15:04 /dev/ttyAMA0

A shell is usually a shell - but in HASSOS, HASS runs inside a docker container so it has less permissions to see the underlying hardware (e.g. no lshw). Sadly, the HASS shell is a bit lighweight, so the BusyBox versions of lsusb -t don’t show the treeview which can be useful (and ls -lar /dev/bus/usb didn’t give extra info).

The underlying OS hardware is in the GUI, but buried. Mine shows full chip details of usb1:

Settings → System → Hardware → … top right → All Hardware

The best I can think is HASSOS v9.2 could be missing a few drivers - this is a guess from several posts where users are having trouble with installs or hardware. A HASS backup, and test install with (say) v8.5 - which is likely what you used to install when things worked:

If this helps, :heart: this post!

1 Like

Thank you again,

I have tried looking in the gui in “all hardware” but no usb or serial device other than the ttyAMA0 is shown. I have also tried inserting a micro SD to see if it recognizes that but apparantly it does not find any external storage devices either. This SD card worked in the pi before i messed HA up so that leads me to believe that im also missing drivers for that as well.

I will try that as soon as I find a way to install the other version.

I am also experiencing this problem of USB2 ports not working (e.g. no keyboard or mouse or zigbee devices). This is on a Raspberry Pi Compute Module 4 (without eMMC but with 4GB RAM and Wireless) mounted on a Waveshare ‘Raspberry Pi Compute Module 4 IO Board With PoE Feature (Type B)’. HA is installed to an M.2 SSD is mounted on the PCIe slot using a Waveshare adapter. Further details on Website.

Installing Raspberry Pi OS there’s an option to add the line dtoverlay=dwc2,dr_mode=host in /boot/config.txt to solve this, but I can find nothing similar for HA.

Any ideas?

Martin