Unix & Linux Asked on November 26, 2021
I’m connecting a Legrand Keor SP UPS device via USB to my Debian linux. The problem is that /dev/ttyUSB0
is not created therefore I cannot communicate with the device.
After connecting I can see it added in lsusb
:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 005: ID 1cb0:0032 <<— THIS ONE
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
I can see the related dmesg
messages:
[Jul19 12:03] usb 3-1: new low-speed USB device number 5 using uhci_hcd
[ +0.201170] usb 3-1: New USB device found, idVendor=1cb0, idProduct=0032, bcdDevice= 0.02
[ +0.000002] usb 3-1: New USB device strings: Mfr=3, Product=1, SerialNumber=5
[ +0.000001] usb 3-1: Product: Legrand UPS
[ +0.000000] usb 3-1: Manufacturer: Legrand
[ +0.183988] hid-generic 0003:1CB0:0032.0005: hiddev0,hidraw1: USB HID v1.11 Device [Legrand Legrand UPS ] on usb-0000:00:1d.0-1/input0
I can see the related udev
messages:
UDEV [1188.303843] add /devices/pci0000:00/0000:00:1d.0/usb3/3-1 (usb)
UDEV [1188.304636] add /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0 (usb)
UDEV [1188.305475] add /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0/0003:1CB0:0032.0005 (hid)
UDEV [1188.306728] add /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0/0003:1CB0:0032.0005/hidraw/hidraw1 (hidraw)
UDEV [1188.307283] add /class/usbmisc (class)
UDEV [1188.307957] bind /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0/0003:1CB0:0032.0005 (hid)
UDEV [1188.308732] add /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0/usbmisc/hiddev0 (usbmisc)
UDEV [1188.309241] bind /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0 (usb)
UDEV [1188.310003] bind /devices/pci0000:00/0000:00:1d.0/usb3/3-1 (usb)
UDEV [1191.140181] remove /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0/usbmisc/hiddev0 (usbmisc)
UDEV [1191.140554] remove /usbmisc (class)
UDEV [1191.141072] remove /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0/0003:1CB0:0032.0005/hidraw/hidraw1 (hidraw)
UDEV [1191.141419] unbind /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0/0003:1CB0:0032.0005 (hid)
UDEV [1191.141618] remove /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0/0003:1CB0:0032.0005 (hid)
UDEV [1191.142072] unbind /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0 (usb)
I also tried this trick to see whether the device is mapped to another /dev
node but it isn’t, nothing appears in /dev unfortunately: How to allow software access to any USB devices?
A small note although I don’t think it’s relevant is that my Debian is running inside of a Proxmox VE. The USB port is shared entirely with the Debian VM therefore I think it should be fine:
The device shows up exactly the same in lsusb
of the Proxmox virtualization host:
Bus 004 Device 002: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 1058:25a2 Western Digital Technologies, Inc. Elements 25A2
Bus 002 Device 005: ID 1058:1140 Western Digital Technologies, Inc. My Book Essential (WDBACW)
Bus 002 Device 003: ID 0bda:0411 Realtek Semiconductor Corp.
Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 8087:0a2b Intel Corp.
Bus 001 Device 003: ID 05c8:0815 Cheng Uei Precision Industry Co., Ltd (Foxlink)
Bus 001 Device 011: ID 1cb0:0032 <<— THIS ONE
Bus 001 Device 004: ID 0bda:5411 Realtek Semiconductor Corp.
Bus 001 Device 002: ID 0bda:5411 Realtek Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
UPDATE 2020-07-20:
Updating udevadm monitor -u
messages to eliminate confusion about device removal. The following gets printed every time I plug in the UPS into the USB port:
UDEV [316.998469] remove /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0/0003:1CB0:0032.0002/hidraw/hidraw1 (hidraw)
UDEV [316.998941] remove /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0/usbmisc/hiddev0 (usbmisc)
UDEV [316.999325] remove /usbmisc (class)
UDEV [317.000298] unbind /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0/0003:1CB0:0032.0002 (hid)
UDEV [317.000534] remove /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0/0003:1CB0:0032.0002 (hid)
UDEV [317.001022] unbind /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0 (usb)
UDEV [317.001219] remove /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1:1.0 (usb)
UDEV [317.001737] unbind /devices/pci0000:00/0000:00:1d.0/usb3/3-1 (usb)
UDEV [317.001902] remove /devices/pci0000:00/0000:00:1d.0/usb3/3-1 (usb)
UPDATE 2020-07-22: New dump of dmesg
when connecting the device to the host machine:
https://pastebin.com/raw/uFUUHGz6
UPDATE 2020-07-30: New dump of lsusb -v
added:
Legrand does not use ttyUSB
, in upssrv
settings select "USB".
I use UPS Communicator 1.32, but this has a bug for linux version and can't initialize connection to ups correctly.
Solution:
Now you can stop the VM and start upssrv
on Debian - all will work fine until you unplug usb cabel or hard reset pc.
Answered by Олег Федорченко on November 26, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP