Specify a fixed tty name for UZB1 on a specific USB port

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Specify a fixed tty name for UZB1 on a specific USB port

Post by PoltoS »

Sometimes you need to fix the tty name for your UZB1 on a specific port. Especially when you use similiar ACM devices on different ports.

This can be easily done using udev subsystem.

Plug your dongle and run (supposing it is called ttyACM0 right now):
# udevadm info -a -n /dev/ttyACM0 | grep {devpath} | head -n 1
ATTRS{devpath}=="1"

Use this value in the next line.

create a file /etc/udev/rules.d/99-acm-fix-tty-name.rules
SUBSYSTEM=="tty", ATTRS{devpath}=="1", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="ZWavePort1"

The last parameter specifies which additional name to use.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Specify a fixed tty name for UZB1 on a specific USB port

Post by PoltoS »

Just in case, to remotelly reconnect your USB device you can use
for i in /sys/bus/pci/drivers/[uoex]hci_hcd/*:*; do
[ -e "$i" ] || continue
echo "${i##*/}" > "${i%/*}/unbind"
echo "${i##*/}" > "${i%/*}/bind"
done
Post Reply