onitake / daliserver

Command multiplexing server for the Tridonic DALI USB adapter
BSD 2-Clause "Simplified" License
72 stars 29 forks source link

Error sending DALI message: Send timeout #17

Open wimg opened 7 years ago

wimg commented 7 years ago

When we boot our system, at first everything works fine. However after not sending any commands to DALI at night, when we start sending them again the next day, we see this in the logs : Sep 14 18:59:33 dex daliserver: Error sending DALI message: Send timeout

Restarting daliserver doesn't help. Only restarting the machine works. Any ideas ?

onitake commented 7 years ago

I remember having some problems with daliserver running in a KVM virtual machine. After running for a long time, the USB adapter would suddenly drop off the bus and not come back. But that was a bug in KVM's USB passthrough code and I haven't seen it since the last OS update.

Can you run lsusb after these errors appear and see if this isn't a similar issue? Does disconnecting and reconnecting the adapter help?

wimg commented 7 years ago

We're not running it in KVM. It's running on a Raspberry Pi 3 with Raspbian.

lsusb produces this output when the problem occurs : Bus 001 Device 004: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light So I'm guessing it's still ok ? But it doesn't respond anymore.

wimg commented 7 years ago

Small update. When I do this : echo 0 > /sys/bus/usb/devices/1-1.4/authorized echo 1 > /sys/bus/usb/devices/1-1.4/authorized It works again right away.

wimg commented 7 years ago

Well strike that, I guess it was a fluke. Still doesn't work.

onitake commented 7 years ago
Bus 001 Device 004: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR 

I'm positive this is not the DALIUSB adapter. Looks like it vanishes from the bus and doesn't come back without a reboot. Can you make sure it's not a hardware problem? For example, try connecting the adapter to a powered USB hub, and see if dmesg reports anything. Also, please test it on a different host. Perhaps the adapter is defective.

wimg commented 7 years ago

The complete list (when operational) is : pi@dex:~ $ lsusb Bus 001 Device 006: ID 17b5:0020 Bus 001 Device 005: ID 04d9:a01c Holtek Semiconductor, Inc. Bus 001 Device 004: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub pi@dex:~ $

So I'm thinking it's the one that says 'mySmartUSB light'... nothing else is plugged in that has to do with lights.

wimg commented 7 years ago

I'll try to plug it in through a USB hub on Monday. It's at our office and it's weekend now ;-)

onitake commented 7 years ago

That's not it. The DALIUSB adapter is the device with vendor ID 17b5 and product ID 0020. The one that doesn't have a description.