You are not logged in.

#1 2019-10-10 13:58:25

broms
Member
From: USA
Registered: 2016-07-07
Posts: 6

Access Serial Ports of a USB Device

I'm trying to set up a USB Zigbee/Z-Wave radio hub combo device (Nortek HUSBZB-1) to use with Homeassistant running via virtualenv on my Arch box. The manual for the USB device says after plugging it in, "it appears as two (2) serial ports." Can someone explain what 'ports' are in this context and how to find the file paths in order to access them?

ls /dev/tty* doesn't seem to show any difference when the device is plugged vs unplugged. Forum posts from Homeassistant say this device is usually at tty/ACM0

 ls -l /dev/tty*
crw-rw-rw- 1 root tty  5,  0 Oct 10 08:30 /dev/tty
crw--w---- 1 root tty  4,  0 Oct  6 09:07 /dev/tty0
crw--w---- 1 root tty  4,  1 Oct  6 09:07 /dev/tty1
crw--w---- 1 root tty  4, 10 Oct  6 09:07 /dev/tty10
crw--w---- 1 root tty  4, 11 Oct  6 09:07 /dev/tty11
crw--w---- 1 root tty  4, 12 Oct  6 09:07 /dev/tty12
crw--w---- 1 root tty  4, 13 Oct  6 09:07 /dev/tty13
crw--w---- 1 root tty  4, 14 Oct  6 09:07 /dev/tty14
crw--w---- 1 root tty  4, 15 Oct  6 09:07 /dev/tty15
crw--w---- 1 root tty  4, 16 Oct  6 09:07 /dev/tty16
crw--w---- 1 root tty  4, 17 Oct  6 09:07 /dev/tty17
crw--w---- 1 root tty  4, 18 Oct  6 09:07 /dev/tty18
crw--w---- 1 root tty  4, 19 Oct  6 09:07 /dev/tty19
crw--w---- 1 root tty  4,  2 Oct  6 09:07 /dev/tty2
crw--w---- 1 root tty  4, 20 Oct  6 09:07 /dev/tty20
crw--w---- 1 root tty  4, 21 Oct  6 09:07 /dev/tty21
crw--w---- 1 root tty  4, 22 Oct  6 09:07 /dev/tty22
crw--w---- 1 root tty  4, 23 Oct  6 09:07 /dev/tty23
crw--w---- 1 root tty  4, 24 Oct  6 09:07 /dev/tty24
crw--w---- 1 root tty  4, 25 Oct  6 09:07 /dev/tty25
crw--w---- 1 root tty  4, 26 Oct  6 09:07 /dev/tty26
crw--w---- 1 root tty  4, 27 Oct  6 09:07 /dev/tty27
crw--w---- 1 root tty  4, 28 Oct  6 09:07 /dev/tty28
crw--w---- 1 root tty  4, 29 Oct  6 09:07 /dev/tty29
crw--w---- 1 root tty  4,  3 Oct  6 09:07 /dev/tty3
crw--w---- 1 root tty  4, 30 Oct  6 09:07 /dev/tty30
crw--w---- 1 root tty  4, 31 Oct  6 09:07 /dev/tty31
crw--w---- 1 root tty  4, 32 Oct  6 09:07 /dev/tty32
crw--w---- 1 root tty  4, 33 Oct  6 09:07 /dev/tty33
crw--w---- 1 root tty  4, 34 Oct  6 09:07 /dev/tty34
crw--w---- 1 root tty  4, 35 Oct  6 09:07 /dev/tty35
crw--w---- 1 root tty  4, 36 Oct  6 09:07 /dev/tty36
crw--w---- 1 root tty  4, 37 Oct  6 09:07 /dev/tty37
crw--w---- 1 root tty  4, 38 Oct  6 09:07 /dev/tty38
crw--w---- 1 root tty  4, 39 Oct  6 09:07 /dev/tty39
crw--w---- 1 root tty  4,  4 Oct  6 09:07 /dev/tty4
crw--w---- 1 root tty  4, 40 Oct  6 09:07 /dev/tty40
crw--w---- 1 root tty  4, 41 Oct  6 09:07 /dev/tty41
crw--w---- 1 root tty  4, 42 Oct  6 09:07 /dev/tty42
crw--w---- 1 root tty  4, 43 Oct  6 09:07 /dev/tty43
crw--w---- 1 root tty  4, 44 Oct  6 09:07 /dev/tty44
crw--w---- 1 root tty  4, 45 Oct  6 09:07 /dev/tty45
crw--w---- 1 root tty  4, 46 Oct  6 09:07 /dev/tty46
crw--w---- 1 root tty  4, 47 Oct  6 09:07 /dev/tty47
crw--w---- 1 root tty  4, 48 Oct  6 09:07 /dev/tty48
crw--w---- 1 root tty  4, 49 Oct  6 09:07 /dev/tty49
crw--w---- 1 root tty  4,  5 Oct  6 09:07 /dev/tty5
crw--w---- 1 root tty  4, 50 Oct  6 09:07 /dev/tty50
crw--w---- 1 root tty  4, 51 Oct  6 09:07 /dev/tty51
crw--w---- 1 root tty  4, 52 Oct  6 09:07 /dev/tty52
crw--w---- 1 root tty  4, 53 Oct  6 09:07 /dev/tty53
crw--w---- 1 root tty  4, 54 Oct  6 09:07 /dev/tty54
crw--w---- 1 root tty  4, 55 Oct  6 09:07 /dev/tty55
crw--w---- 1 root tty  4, 56 Oct  6 09:07 /dev/tty56
crw--w---- 1 root tty  4, 57 Oct  6 09:07 /dev/tty57
crw--w---- 1 root tty  4, 58 Oct  6 09:07 /dev/tty58
crw--w---- 1 root tty  4, 59 Oct  6 09:07 /dev/tty59
crw--w---- 1 root tty  4,  6 Oct  6 09:07 /dev/tty6
crw--w---- 1 root tty  4, 60 Oct  6 09:07 /dev/tty60
crw--w---- 1 root tty  4, 61 Oct  6 09:07 /dev/tty61
crw--w---- 1 root tty  4, 62 Oct  6 09:07 /dev/tty62
crw--w---- 1 root tty  4, 63 Oct  6 09:07 /dev/tty63
crw--w---- 1 root tty  4,  7 Oct  6 09:07 /dev/tty7
crw--w---- 1 root tty  4,  8 Oct  6 09:07 /dev/tty8
crw--w---- 1 root tty  4,  9 Oct  6 09:07 /dev/tty9
crw-rw---- 1 root uucp 4, 64 Oct  6 09:07 /dev/ttyS0
crw-rw---- 1 root uucp 4, 65 Oct  6 09:07 /dev/ttyS1
crw-rw---- 1 root uucp 4, 66 Oct  6 09:07 /dev/ttyS2
crw-rw---- 1 root uucp 4, 67 Oct  6 09:07 /dev/ttyS3

ls /dev/USB* also returns nothing

lsusb detetcts it, and it appears as one device at /dev/bus/usb/001/007 which I can symlink with udev, but I don't think this is the right device path, because the Homeassistant software throws errors when it tries to access the radios.

lsusb
Bus 001 Device 007: ID 10c4:8a2a Cygnal Integrated Products, Inc. HubZ Smart Home Controller

I've read other people have had success using udev rules to create symlinks for the two interfaces to two devices:

SUBSYSTEM==“tty”, ATTRS{interface}==“HubZ Z-Wave Com Port”, SYMLINK+="zwave"
SUBSYSTEM==“tty”, ATTRS{interface}==“HubZ ZigBee Com Port”, SYMLINK+=“zigbee”

but I don't see any interfaces for my device:

udevadm info --attribute-walk /dev/bus/usb/001/007

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:14.0/usb1/1-10':
    KERNEL=="1-10"
    SUBSYSTEM=="usb"
    DRIVER=="usb"
    ATTR{manufacturer}=="Silicon Labs"
    ATTR{maxchild}=="0"
    ATTR{bConfigurationValue}=="1"
    ATTR{speed}=="12"
    ATTR{avoid_reset_quirk}=="0"
    ATTR{serial}=="6130212D"
    ATTR{quirks}=="0x0"
    ATTR{bMaxPacketSize0}=="64"
    ATTR{product}=="HubZ Smart Home Controller"
    ATTR{bmAttributes}=="80"
    ATTR{bDeviceSubClass}=="00"
    ATTR{devnum}=="7"
    ATTR{rx_lanes}=="1"
    ATTR{idVendor}=="10c4"
    ATTR{bDeviceProtocol}=="00"
    ATTR{devspec}=="(null)"
    ATTR{removable}=="removable"
    ATTR{bDeviceClass}=="00"
    ATTR{configuration}==""
    ATTR{idProduct}=="8a2a"
    ATTR{urbnum}=="14"
    ATTR{bNumInterfaces}==" 2"
    ATTR{bMaxPower}=="100mA"
    ATTR{busnum}=="1"
    ATTR{devpath}=="10"
    ATTR{ltm_capable}=="no"
    ATTR{tx_lanes}=="1"
    ATTR{bNumConfigurations}=="1"
    ATTR{authorized}=="1"
    ATTR{bcdDevice}=="0100"
    ATTR{version}==" 2.00"

  looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1':
    KERNELS=="usb1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{bDeviceClass}=="09"
    ATTRS{devpath}=="0"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{removable}=="unknown"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{authorized_default}=="1"
    ATTRS{tx_lanes}=="1"
    ATTRS{busnum}=="1"
    ATTRS{devspec}=="(null)"
    ATTRS{authorized}=="1"
    ATTRS{bcdDevice}=="0503"
    ATTRS{devnum}=="1"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{interface_authorized_default}=="1"
    ATTRS{idVendor}=="1d6b"
    ATTRS{serial}=="0000:00:14.0"
    ATTRS{manufacturer}=="Linux 5.3.4-arch1-1-ARCH xhci-hcd"
    ATTRS{bmAttributes}=="e0"
    ATTRS{speed}=="480"
    ATTRS{bMaxPower}=="0mA"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{product}=="xHCI Host Controller"
    ATTRS{idProduct}=="0002"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{configuration}==""
    ATTRS{rx_lanes}=="1"
    ATTRS{ltm_capable}=="no"
    ATTRS{maxchild}=="12"
    ATTRS{urbnum}=="202"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{quirks}=="0x0"
    ATTRS{bDeviceProtocol}=="01"
    ATTRS{version}==" 2.00"

  looking at parent device '/devices/pci0000:00/0000:00:14.0':
    KERNELS=="0000:00:14.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="xhci_hcd"
    ATTRS{irq}=="26"
    ATTRS{d3cold_allowed}=="1"
    ATTRS{vendor}=="0x8086"
    ATTRS{enable}=="1"
    ATTRS{numa_node}=="-1"
    ATTRS{device}=="0x8c31"
    ATTRS{class}=="0x0c0330"
    ATTRS{consistent_dma_mask_bits}=="64"
    ATTRS{broken_parity_status}=="0"
    ATTRS{driver_override}=="(null)"
    ATTRS{revision}=="0x05"
    ATTRS{dma_mask_bits}=="64"
    ATTRS{ari_enabled}=="0"
    ATTRS{subsystem_device}=="0x5007"
    ATTRS{devspec}==""
    ATTRS{msi_bus}=="1"
    ATTRS{local_cpulist}=="0-1"
    ATTRS{local_cpus}=="3"
    ATTRS{subsystem_vendor}=="0x1458"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""

What am I missing here?

Offline

#2 2019-10-12 15:05:42

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 7,295

Re: Access Serial Ports of a USB Device

The naming of usb-to-serial devices follows three different schemes[1].

Please post

# dmesg | grep tty

.


[1]
the three naming schemes are ttyUSBx , ttySx and ttyACMx
https://rfc1149.net/blog/2013/03/05/wha … evttyacmx/ gives a decent description.


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#3 2019-10-13 03:13:53

broms
Member
From: USA
Registered: 2016-07-07
Posts: 6

Re: Access Serial Ports of a USB Device

I contacted Nortek tech support and they told me that the HUSBZB-1 required a software update that was no longer available because they hadn't sold or supported the device in the last five years.

I ended up switching to two different radios for zigbee/z-wave (Conbee II and Aoetc Z-Stick Gen5) and they 'just worked', after plugging in, I can access them at /dev/ttyACM0 and /dev/ttyACM1.

Offline

#4 2019-10-13 09:58:53

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 7,295

Re: Access Serial Ports of a USB Device

Glad to hear you solved it, please prepend [Solved] to the title (edit first post)


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

Board footer

Powered by FluxBB