USB CC2531 Unsupported device on Linux 4.9 aarch64

0

I try to use zigbee2mqtt using the CC2531 USB stick. I tried on two computers:

  • On my laptop running ArchLinux (x86_64) (kernel 5.2). Every thing it works as expected (device recognized on dmesg, zigbee2mqtt working: zigbee devices appears on the log)
  • On my odroid-n2 (a single board computer) running Ubuntu 18.04.2 LTS or ArchLinuxARM (kernel 4.9) (aarch64). zigbee2mqtt starts, but no zigbee device is detected on both Ubuntu and ArchLinuxARM.

From now on, every command is executed on the odroid.

sudo dmesg | grep -i usb
[  115.960507] usb 1-1.1.1: new full-speed USB device number 8 using xhci-hcd
[  116.064565] usb 1-1.1.1: New USB device found, idVendor=0451, idProduct=16a8
[  116.064578] usb 1-1.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  116.064585] usb 1-1.1.1: Product: TI CC2531 USB CDC
[  116.064593] usb 1-1.1.1: Manufacturer: Texas Instruments
[  116.064600] usb 1-1.1.1: SerialNumber: __0X00124B001938A33F
[  116.087026] usb 1-1.1.1: Unsupported device
[  116.087333] usb 1-1.1.1: Unsupported device
[  116.125408] cdc_acm 1-1.1.1:1.0: ttyACM0: USB ACM device
[  116.126816] usbcore: registered new interface driver cdc_acm
[  116.126822] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

The Unsupported device makes me suspect a driver issue but when I unplug and replug the cc2531, I no longer have the Unsupported device in dmesg (I have to reboot to get this error again).

ls -l /dev/ttyACM0                                                                                                                                   odroid@odroid 0s 
crw-rw---- 1 root dialout 166, 0 juil. 16 11:58 /dev/ttyACM0
groups odroid
odroid : odroid adm dialout cdrom sudo dip plugdev lpadmin lightdm nopasswdlogin pulse-access docker

On the odroid, zigbee2mqtt doesn't log any error (I can even turn off the led of the cc2531 with a zigbee2mqtt parameter - see this post for the full zigbee2mqtt log), but it doesn't detect any devices.

I tried to plug the stick directly on a USB port of the board, or using an externally powered hub. Every port is USB3 ports. The cc2531 behavior is the same on the hub and on the onboard hub.

I am not really sure if it is a driver issue, but I don't know what else could cause this issue.

Pierre Macherel

Posted 2019-07-16T16:25:39.243

Reputation: 1

Answers

0

Thanks to this video, I was able to identifiy the missing driver. I needed to enable the option USB_SERIAL_TI in make menuconfig before compiling the Linux kernel.


Step for finding the right option :

  1. Identifying the idVendor of the USB stick using dmesg. In my case it is 0451
  2. Finding the driver file in the Linux kernel for this idVendor. My USB stick is made by Texas Instruments (TI in dmesg)
$ git clone --depth 1 --branch master https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git linux
...
$ cd linux
$ grep -i 0x0451 -r --include='*.c' drivers/
...
drivers/usb/serial/ti_usb_3410_5052.c:#define TI_VENDOR_ID          0x0451
...
  1. The driver file might be ti_usb_3410_5052.c. Now I need to find wich option include this file during the Linux kernel compilation. I need to look for the make file in the same folder than ti_usb_3410_5052.c
$ cat drivers/usb/serial/Makefile | grep -i ti_usb_3410_5052
obj-$(CONFIG_USB_SERIAL_TI)         += ti_usb_3410_5052.o
  1. The option is USB_SERIAL_TI. I can use make menuconfig to enable it.

Pierre Macherel

Posted 2019-07-16T16:25:39.243

Reputation: 1