USB dongle not attached to /dev/tty

Hello, I’m trying to setup the USB Dongle Texas_Instruments_CC2531, but I cannot see the device on /dev folder.

Seems that the system detects the device correctly:

  • name: 1-1.1
    sysfs: >-
    /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1
    dev_path: /dev/bus/usb/001/003
    subsystem: usb
    by_id: null
    attributes:
    BUSNUM: ‘001’
    DEVNAME: /dev/bus/usb/001/003
    DEVNUM: ‘003’
    DEVPATH: >-
    /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1
    DEVTYPE: usb_device
    DRIVER: usb
    ID_BUS: usb
    ID_MODEL: CC2531_USB_Dongle
    ID_MODEL_ENC: CC2531\x20USB\x20Dongle
    ID_MODEL_ID: 16ae
    ID_REVISION: ‘1528’
    ID_SERIAL: Texas_Instruments_CC2531_USB_Dongle
    ID_USB_INTERFACES: ‘:ffffff:’
    ID_VENDOR: Texas_Instruments
    ID_VENDOR_ENC: Texas\x20Instruments
    ID_VENDOR_ID: ‘0451’
    MAJOR: ‘189’
    MINOR: ‘2’
    PRODUCT: 451/16ae/1528
    SUBSYSTEM: usb
    TYPE: 0/0/0
    USEC_INITIALIZED: ‘21434693’

Then when running dmesg, I get this info:

[ 2.141857] usb 1-1.1: New USB device found, idVendor=0451, idProduct=16ae, bcdDevice=15.28
[ 2.141876] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2.141891] usb 1-1.1: Product: CC2531 USB Dongle
[ 2.141903] usb 1-1.1: Manufacturer: Texas Instruments

But doesn’t show any “attached to /dev/ttyUSB” message.

As I am trying to setup the usb dongle for the zigbee integration, but then I cannot provide any path because it’s not listed on the /dev folder.

Any help? Thanks! :slight_smile:

lsusb command seems to get usb 001 003 same as on the sys info:

Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 003: ID 0451:16ae
Bus 001 Device 002: ID 2109:3431
Bus 002 Device 001: ID 1d6b:0003
Bus 001 Device 004: ID 0951:1665

Stop posting pictures of text.

Please post the output of this

dmesg|grep tty -C3

This is what it returns:

[ 0.000000] pcpu-alloc: s49932 r8192 d23796 u81920 alloc=20*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 1010432
[ 0.000000] Kernel command line: zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor rootwait systemd.machine_id=a9128587346147eca8ac55528eb7fbc6 cgroup_enable=memory fsck.repair=yes coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=0 bcm2708_fb.fbheight=0 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:77:1A:E6 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype=squashfs ro rauc.slot=B
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000817] sched_clock: 56 bits at 54MHz, resolution 18ns, wraps every 4398046511102ns
[ 0.000833] Switching to timer-based delay loop, resolution 18ns
[ 0.001079] Console: colour dummy device 80x30
[ 0.001603] printk: console [tty1] enabled
[ 0.001666] Calibrating delay loop (skipped), value calculated using timer frequency… 108.00 BogoMIPS (lpj=540000)
[ 0.001708] pid_max: default: 32768 minimum: 301
[ 0.001865] LSM: Security Framework initializing
[ 1.173921] Key type .fscrypt registered
[ 1.173973] AppArmor: AppArmor sha1 policy hashing enabled
[ 1.182322] uart-pl011 fe201000.serial: cts_event_workaround enabled
[ 1.182389] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 29, base_baud = 0) is a PL011 rev2
[ 1.187481] bcm2835-power bcm2835-power: Broadcom BCM2835 power domains driver
[ 1.188164] mmc-bcm2835 fe300000.mmcnr: mmc_debug:0 mmc_debug2:0
[ 1.188187] mmc-bcm2835 fe300000.mmcnr: DMA channel allocated
[ 2.005358] usb 1-1.1: new full-speed USB device number 3 using xhci_hcd
[ 2.092914] systemd[1]: Queued start job for default target Multi-User System.
[ 2.093594] random: systemd: uninitialized urandom read (16 bytes read)
[ 2.097014] systemd[1]: Created slice system-getty.slice.
[ 2.097441] random: systemd: uninitialized urandom read (16 bytes read)
[ 2.098563] systemd[1]: Created slice system-modprobe.slice.
[ 2.098807] random: systemd: uninitialized urandom read (16 bytes read)

I suspect /dev/ttyAMA0

Thanks, I don’t know about ttyAMA0, it’s always active even if I disconnect the USB. Also I have 2 USBs attached and none of them is showing, that was why I suspected it could be a problem of not beign correctly attached.
dmesg also doesn’t show the USB attached to /tty message that should be the normal one.

This comes from the zigbeemqtt integration failing, on running herdsman service, so I was thinking it could be a problem about the USB not beign attached properly.

This is the zigbee2mqtt error that happens when starting the application. It runs until reaches a timeout. Logs doesn’t show anything extra on that output.

[email protected] start /app
node index.js
Zigbee2MQTT:info 2021-02-27 22:18:24: Logging to console and directory: ‘/share/zigbee2mqtt/log/2021-02-27.22-18-23’ filename: log.txt
Zigbee2MQTT:info 2021-02-27 22:18:24: Starting Zigbee2MQTT version 1.17.1 (commit #1.17.1)
Zigbee2MQTT:info 2021-02-27 22:18:24: Starting zigbee-herdsman (0.13.59)
Zigbee2MQTT:error 2021-02-27 22:18:44: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-02-27 22:18:44: Failed to start zigbee
Zigbee2MQTT:error 2021-02-27 22:18:44: Exiting…
Zigbee2MQTT:error 2021-02-27 22:18:44: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter. (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:94:31)
at Generator.throw ()
at rejected (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:25:65)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-02-27T21_18_44_271Z-debug.log

This is the configuration I have on zigbee2mqtt config:

data_path: /share/zigbee2mqtt
external_converters:
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: true
mqtt:
base_topic: zigbee2mqtt
server: ‘mqtt://192.168.0.49:1883’
user: mqtt
password: mqtt
serial:
port: /dev/ttyAMA0
advanced:
log_level: info
pan_id: 6754
channel: 11
network_key:
- 1
- 3
- 5
- 7
- 9
- 11
- 13
- 15
- 0
- 2
- 4
- 6
- 8
- 10
- 12
- 13
availability_blocklist:
availability_passlist:
device_options: {}
blocklist:
passlist:
queue: {}
frontend:
port: 8099
experimental:
new_api: true
socat:
enabled: false
master: ‘pty,raw,echo=0,link=/dev/ttyAMA0,mode=777’
slave: ‘tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5’
restartdelay: 1
initialdelay: 1
options: ‘-d -d’
log: false

My dmesg shows this (different TI chip)

1390851.431521] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1390851.431522] usb 2-1.2: Product: XDS110 (02.03.00.18) Embed with CMSIS-DAP
[1390851.431523] usb 2-1.2: Manufacturer: Texas Instruments
[1390851.431524] usb 2-1.2: SerialNumber: L1100H8Z
[1390851.431859] cdc_acm 2-1.2:1.0: ttyACM0: USB ACM device
[1390851.432795] cdc_acm 2-1.2:1.3: ttyACM1: USB ACM device
[1390851.434237] hid-generic 0003:0451:BEF3.0002: hiddev0,hidraw0: USB HID v1.11 Device [Texas Instr
uments XDS110 (02.03.00.18) Embed with CMSIS-DAP] on usb-0000:00:1d.0-1.2/input5
[1391263.832408] usb 2-1.2: USB disconnect, device number 4

My devices are /dev/ttyACM0 and /dev/ttyACM1.

Great, that’s what it should be I think. On the documentation it says you must point to ttyACM, but I don’t have any of these, just ttyAMA0, and doesn’t work.
As far as I read, AMA0 is for audio, not sure if it’s correct. But USB should be pointed to ACM.

Then my question was that probably the system is not attaching the USB to ACM as it should, seeing that the dmesg doesn’t show any attaching usb message.

Do you have anything at /dev/serial/by-id/? Use that path then, it’s more reliable.

Also checked that thanks, I don’t have any /dev/serial/by-id, just a /dev/serial1 and seems empty. I’ve readed a lot of posts saying that you must rely also on that path, but I cannot figure out how to make it run.

It‘s not present on every device/OS. I have it on one RPI3 but not on an RPI4 - both running same version of Raspbian.

Right, because I’m running RPI4. Any clue about how to make them appear?

No. Actually on the RPI4 I have an add-on card (Raspbee II) and it is accessible via /dev/ttyAMA0. On the RPI3 I have serial/by-id and map it as device into the Zigbee2MQTT container as /dev/ttyACM0.

Thanks for sharing, then I will need to find if someone can run a usb dongle on RPI4 if that’s the problem.
Please if someone have any idea I would appreciate the help :slight_smile:

Don’t know if this helps, but when I plug in something usb, I just go to /dev after and type ls -lah. Devices are sorted by date in ascending order, so your dongle should be whatever the last device listed is. You can confirm 100% by looking to see if the time matches the time you plugged it in.

1 Like

Just a small remark but might be important. Are you sure there is firmware on the dongle. If not first program it.

Hi @fbijma I thought it should be but didn’t checked… model is this one: https://www.amazon.de/gp/product/B07MBZMJB4/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1

@rotormonkey thanks for checking this, I just plugged USB again and only got this updates today 28 february:
crw-rw-rw- 1 root tty 5, 2 Feb 28 10:42 ptmx

could be the ptmx?

@fbijma should come preprogrammed:

Yes, but not with zigbee firmware. As stated in the documentation it has sniffing firmware for use with wireshark for example. See https://www.zigbee2mqtt.io/information/flashing_the_cc2531.html.

Edit: can also be done without programmer: https://youtu.be/RguRQUXWLCY

1 Like

OK, didn’t know that… thanks for the info :slight_smile: I will mark as solved for now while I try this way.