double disconnects cause a recoverable error
Information
- Solaar version: 1.0.1 from github
Describe the bug With DJ notifications turned on, there can be two disconnects for a device number. The second one causes an error, which is recovered from.
To Reproduce Steps to reproduce the behavior:
- solarr
- Unpair a DJ device
Additional context solaar -dd output extract (with some debugging already done)
18:29:13,074 DEBUG [ReceiverListener:hidraw0] logitech_receiver.base: (14) => r[10 02 4002 000000]
18:29:13,075 DEBUG [MainThread] logitech_receiver.base: (16) => r[10 02 4002 000000]
18:29:13,076 INFO [ReceiverListener:hidraw0] solaar.listener: status_changed <PairedDevice(2,None,M510v2,60E4B97D)>: unpaired offline, None (FF) unpaired
18:29:13,076 WARNING [ReceiverListener:hidraw0] solaar.listener: device <PairedDevice(2,None,M510v2,60E4B97D)> was unpaired, ghosting
18:29:13,077 DEBUG [MainThread] logitech_receiver.base: (16) => r[20 02 4000 0000000000000000000000]
18:29:13,077 DEBUG [ReceiverListener:hidraw0] logitech_receiver.base: (14) => r[20 02 4000 0000000000000000000000]
18:29:13,078 INFO [ReceiverListener:hidraw0] logitech_receiver.receiver: new PairedDevice(<UnifyingReceiver(/dev/hidraw0,14)>, 2, None)
18:29:13,078 DEBUG [ReceiverListener:hidraw0] logitech_receiver.base: (14) <= w[10 FF 83B5 210000]
18:29:13,078 DEBUG [ReceiverListener:hidraw0] logitech_receiver.base: (14) => r[10 FF 80B2 000000]
18:29:13,079 DEBUG [MainThread] logitech_receiver.base: (16) => r[10 FF 80B2 000000]
18:29:13,079 WARNING [MainThread] logitech_receiver.receiver: <UnifyingReceiver(/dev/hidraw0,14)> unpaired device <PairedDevice(2,None,M510v2,60E4B97D)>
18:29:13,079 DEBUG [MainThread] solaar.ui: status changed: _GHOST_DEVICE(receiver=<UnifyingReceiver(/dev/hidraw0,14)>, number=2, name='Wireless Mouse M510', kind=NamedInt(2, 'mouse'), status=None, online=False) (ALL) unpaired
18:29:13,080 DEBUG [ReceiverListener:hidraw0] logitech_receiver.base: (14) => r[10 FF 8F83 B50300]
18:29:13,081 DEBUG [ReceiverListener:hidraw0] logitech_receiver.base: (14) device 0xFF error on request {83B5}: 3 = invalid value
18:29:13,081 DEBUG [ReceiverListener:hidraw0] logitech_receiver.base: (14) <= w[10 FF 83B5 040000]
18:29:13,081 DEBUG [MainThread] solaar.ui.tray: picked device with lowest battery: None
18:29:13,084 DEBUG [ReceiverListener:hidraw0] logitech_receiver.base: (14) => r[10 FF 8F83 B50300]
18:29:13,084 DEBUG [ReceiverListener:hidraw0] logitech_receiver.base: (14) device 0xFF error on request {83B5}: 3 = invalid value
18:29:13,085 ERROR [ReceiverListener:hidraw0] logitech_receiver.receiver: failed to read Nano wpid for device 2 of <UnifyingReceiver(/dev/hidraw0,14)>
18:29:13,085 ERROR [ReceiverListener:hidraw0] logitech_receiver.receiver: register_new_device
Traceback (most recent call last):
File "/home/local/SoftwareDownloads/Solaar/lib/logitech_receiver/receiver.py", line 430, in register_new_device
dev = PairedDevice(self, number, notification)
File "/home/local/SoftwareDownloads/Solaar/lib/logitech_receiver/receiver.py", line 103, in __init__
raise _base.NoSuchDevice(number=number, receiver=receiver, error="read Nano wpid")
logitech_receiver.base.NoSuchDevice: {'number': 2, 'receiver': <UnifyingReceiver(/dev/hidraw0,14)>, 'error': 'read Nano wpid'}
18:29:13,086 WARNING [ReceiverListener:hidraw0] logitech_receiver.receiver: <UnifyingReceiver(/dev/hidraw0,14)>: looked for device 2, not found
18:29:13,087 WARNING [ReceiverListener:hidraw0] solaar.listener: <UnifyingReceiver(/dev/hidraw0,14)>: received Notification(2,40,00,0000000000000000000000) for invalid device 2: None