[SOLVED] SONOFF Zigbee 3.0 - no serial-id

kru

New Member
May 23, 2022
5
1
3
Hi there,

i am trying to get my SONOFF Zigbee 3.0 USB Dongle Plus by ITead running, but i can not get a serial-id from this stick (another Zigbee Stick is working - Texas Instruments, Inc. CC2531 ZigBee)

Bash:
root@pve:~# lsusb -t -v
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 5, If 0, Class=Vendor Specific Class, Driver=usbfs, 12M
        ID 10c4:ea60 Silicon Labs CP210x UART Bridge
    |__ Port 3: Dev 2, If 0, Class=Communications, Driver=cdc_acm, 12M
        ID 0451:16a8 Texas Instruments, Inc. CC2531 ZigBee
    |__ Port 3: Dev 2, If 1, Class=CDC Data, Driver=cdc_acm, 12M
        ID 0451:16a8 Texas Instruments, Inc. CC2531 ZigBee

Bash:
root@pve:~# ls /dev/serial/by-id/
usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B00193870B1-if00

So, my Silicon Labs CP210x UART Bridge is missing. Got anybody some ideas about that?

I got an ID, when i plugged in the stick at my desktop PC (Arch-linux)
 
Hi, got the same usb stick here.
But no issues with passing trough this device, usb2 and usbs3 in pve, as well as via spice. (debian vm, opensuse tw works too)
Did you try the stick in another port? or via another usb hub? Maybe try without the CC2531 plugged in.
And you might check the logs from the host and guest if you can see if there's some trace of a conflict or block.
Assuming you are running a recent and up to date version of pve.
 
Last edited:
By the way, if you pass through the usb port to a vm and start it, the device won't be listed anymore on the host in /dev/serial/by-id/, only inside the guest. In lsusb it wil remain visible.
Driver=usbfs
This gives the hint. Probably connected inside one of your vm's.
 
Hi. Yes, i tried all ports and an additional usb-hub. Also without the CC2531 plugged-in. Always the same result :(
By the way, if you pass through the usb port to a vm and start it, the device won't be listed anymore on the host in /dev/serial/by-id/, only inside the guest. In lsusb it wil remain visible.
hmm, but my CC2531 used in a lxc is still seen at the host by /dev/serial/by-id/ and passed through to a running machine.
I stopped passing through the CP2102N stick and i can see it right now. So there are differences between lxc and vm in this particular passthrough part. New to me :)

This should be look good, or?

1653304346827.png


So when i am in the guest system (Ubuntu 22.04), i can see the stick by

Bash:
lsusb -t -v
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    ID 1d6b:0001 Linux Foundation 1.1 root hub
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    ID 1d6b:0001 Linux Foundation 1.1 root hub
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    ID 1d6b:0001 Linux Foundation 1.1 root hub
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=, 12M
        ID 10c4:ea60 Silicon Labs CP210x UART Bridge
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
    ID 1d6b:0001 Linux Foundation 1.1 root hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub

but i can´t integrate it to iobroker, because i get a

Bash:
ls -la /dev/serial/by-id/
ls: cannot access '/dev/serial/by-id/': No such file or directory

or

ls -la /dev/tty*
-> just getting the "standard" tty ports (no USB oder ACME)


I am a little bit lost :confused:
 
So there are differences between lxc and vm in this particular passthrough part.
Yep, there you got one of the differences. That's why you have a usb passhrough option in a vm, and in a container you don't. A vm guest gives the usb device exclusively from the host to the guest, a container guest is using the hardware already available from inside the host. So you have to decide where you want to manage your devices, what services can connect to them, and why you would want to run a vm or a container for that purpose. In your case, where you want the iobroker to run.

From the admin guide [0]:
Containers are a lightweight alternative to fully virtualized machines (VMs). They use the kernel of the host system that they run on, instead of emulating a full operating system (OS). This means that containers can access resources on the host system directly.
So vm's are used to really separate, with their own kernel, and their own kernel hardware.
It really depends on how much you want to separate services form each other, and how secure you want to be.
There's a lot more info in the admin guide and on this forum.

[0] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#chapter_pct
 
Last edited:
Thanks for the explanation and the link. Lots to read and learn :)
So, when you passed through the stick (I assume, that you also integrated it to iobroker/homeassistant etc.), how do you get to the serial-id number on the guest? Do you use a container or vm?

I am not sure, which dev the stick is right now

Bash:
homelab:/dev$ ls
autofs           dma_heap      loop0   null    sda14     tty1   tty21  tty33  tty45  tty57  ttyS10  ttyS22  ttyS6      vcs5   vcsu4
block            ecryptfs      loop1   nvram   sda15     tty10  tty22  tty34  tty46  tty58  ttyS11  ttyS23  ttyS7      vcs6   vcsu5
bsg              fd            loop2   port    sg0       tty11  tty23  tty35  tty47  tty59  ttyS12  ttyS24  ttyS8      vcsa   vcsu6
btrfs-control    full          loop3   ppp     sg1       tty12  tty24  tty36  tty48  tty6   ttyS13  ttyS25  ttyS9      vcsa1  vfio
bus              fuse          loop4   psaux   shm       tty13  tty25  tty37  tty49  tty60  ttyS14  ttyS26  ttyprintk  vcsa2  vga_arbiter
cdrom            hpet          loop5   ptmx    snapshot  tty14  tty26  tty38  tty5   tty61  ttyS15  ttyS27  udmabuf    vcsa3  vhost-net
char             hugepages     loop6   pts     snd       tty15  tty27  tty39  tty50  tty62  ttyS16  ttyS28  uinput     vcsa4  vhost-vsock
console          hwrng         loop7   random  sr0       tty16  tty28  tty4   tty51  tty63  ttyS17  ttyS29  urandom    vcsa5  virtio-ports
core             initctl       mapper  rfkill  stderr    tty17  tty29  tty40  tty52  tty7   ttyS18  ttyS3   vcs        vcsa6  vport2p1
cpu              input         mcelog  rtc     stdin     tty18  tty3   tty41  tty53  tty8   ttyS19  ttyS30  vcs1       vcsu   zero
cpu_dma_latency  kmsg          mem     rtc0    stdout    tty19  tty30  tty42  tty54  tty9   ttyS2   ttyS31  vcs2       vcsu1  zfs
cuse             log           mqueue  sda     tty       tty2   tty31  tty43  tty55  ttyS0  ttyS20  ttyS4   vcs3       vcsu2
disk             loop-control  net     sda1    tty0      tty20  tty32  tty44  tty56  ttyS1  ttyS21  ttyS5   vcs4       vcsu3

I do not see a suitable device... I would not point to the usb -port, instead by using th ID
 
I indeed use homeassistant, but do not prefer to, permanently, connect (sometimes a little odd and foreign) usb devices to my pve host as it runs more important systems then home automation ;)
I don't use iobroker, did not know of it until you mentioned it in this thread, there are so many of these platforms.
HA is in a vm. the stick is in a separate device (raspberry pi). Why? As soon as your service can connect through network layer you got a lot more options to physically and virtually limit access and in this way separate access on multiple levels. I prefer to let most stuff communicate on the network layer.
When starting off with proxmox I probably was thinking the same way as you do and had multiple containers running for this kind of stuff. But along the way it became clear to me you have to make important (design) choices. All-in-one doesn't work well, for me anyway.
And especially with iot stuff I'm always more on my guard. Times are changing, but in iot field, security hasn't always been the most important part.

To the point:
Do you use a container or vm?
None of the above, I use a physical separate hardware device where the zigbee stick is used inside a usb port.
If this is your vm and you have set pass through for your usb port as in the picture you posted, then it should be available inside the guest.
Actually I would prefer to pass through the whole usb port (option 3 instead of 2), as these devices expose sometimes multiple devices on one port.
how do you get to the serial-id number on the guest?
It should have exactly the same path as you already saw, so in /dev/serial/by-id/.
 
Thanks for your thoughts.
It should have exactly the same path as you already saw, so in /dev/serial/by-id/.
And that is the point. If I do not pass through the CP2102N Stick, I see the serial-id on the host (PVE). When i pass through the stick, i can not see the serial-id on the host (what should be normal, as far as I understood) but also not on the guest system (Ubuntu 22.04). And this last thing is strange for me, because I can see clearly, that the stick is availalbe on the guest (using
Bash:
lsusb -v -t
)
 
hmm, that's odd. just checked in a ubuntu desktop 22.04 vm. It's mounted in /dev/serial/by-id, but haven't tested it.
But lsusb has it registered, then another component is causing trouble.
Have you checked the log in the guest?
Something like: sudo journalctl -b | egrep -i 'usb|serial|udev'

If you run ubuntu server perhaps udev is not playing nice or there's missing modules like here:
https://forum.proxmox.com/threads/usb-device-pass-thru-not-working.109498/
 
If you run ubuntu server perhaps udev is not playing nice or there's missing modules like here:
https://forum.proxmox.com/threads/usb-device-pass-thru-not-working.109498/

Solution! So i checked my current kernel version by
Bash:
homelab:~$ uname -r
5.15.0-30-generic

and installed the right modules

Bash:
sudo apt install linux-modules-extra-5.15.0-30-generic

The stick is now available via serial-id

Maybe someone else got the same problem. Thanks @janssensm for your effort and the solution.
 
  • Like
Reactions: janssensm
I cannot run the command on 7.3.6. (5.15.85-1-pve) I just get:

E: Unable to locate package linux-modules-extra-5.15.0-30-generic
E: Couldn't find any package by glob 'linux-modules-extra-5.15.0-30-generic'

I tried also with

apt install linux-generic

but just receive a
E: Unable to locate package linux-generic

After an
apt-get update && apt-get upgrade

same situation. Also
apt-cache search linux-generic

didn't find anything.

Is there another way to get the USB data to use the devices in LXC Container? Or can anybody assist to get the

ls /dev/serial/by-id/

running?
 
Last edited:
I cannot run the command on 7.3.6. (5.15.85-1-pve) I just get:

E: Unable to locate package linux-modules-extra-5.15.0-30-generic
E: Couldn't find any package by glob 'linux-modules-extra-5.15.0-30-generic'

I tried also with

apt install linux-generic

but just receive a
E: Unable to locate package linux-generic

After an
apt-get update && apt-get upgrade

same situation. Also
apt-cache search linux-generic

didn't find anything.

Is there another way to get the USB data to use the devices in LXC Container? Or can anybody assist to get the

ls /dev/serial/by-id/

running?

This thread talks about USB-passthrough to a VM and installing those packages inside the Ubuntu 22.04-VM and not on the PVE-host...
 
To the point:

None of the above, I use a physical separate hardware device where the zigbee stick is used inside a usb port.

If this is your vm and you have set pass through for your usb port as in the picture you posted, then it should be available inside the guest.
Actually I would prefer to pass through the whole usb port (option 3 instead of 2), as these devices expose sometimes multiple devices on one port.
Hello, could you maybe explain how this is done, i.e. how to have the zigbee stick connected to a separate raspberry pi, and connect this to your HA instance running on the other machine?
 
@thiemo since that post I set it up differently, I changed my mind, not using separate hardware anymore for multiple (own) reasons.
Two of them: it was to complex and too much hassle to maintain and raspberry pi doesn't get automatic security updates, so the cons outweighed the pros.

How to configure a raspberry pi with HA is beyond the scope of this forum and also this thread (USB-passthrough) and should rather be posted on the HA or zigbee2mqtt forums. There are lots of posts and guides there, because there are also a lot of components communicating with one another, and every person has different needs.

Z2m has excellent guides:
https://www.zigbee2mqtt.io/guide/getting-started/
https://www.zigbee2mqtt.io/guide/usage/integrations/home_assistant.html
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!