forgotten removed call in device.py - breaks device enumeration on 27MHz receiver
Created by: prahal
Information
- Solaar version (
solaar --version
orgit describe --tags
if cloned from this repository): solaar 1.1.8+dfsg-2 - Distribution: Debian bullseye/bookworm
- Kernel version (ex.
uname -srmo
):Linux 6.0.0-0.deb11.6-amd64 x86_64 GNU/Linux
- Output of
solaar show
:
solaar show
solaar version 1.1.8+dfsg-2
EX100 Receiver 27 Mhz
Device path : /dev/hidraw3
USB id : 046d:C517
Serial : None
Has 2 paired device(s) out of a maximum of 4.
Notifications: wireless (0x000100)
- Contents of
~/.config/solaar/config.yaml
(or~/.config/solaar/config.json
if~/.config/solaar/config.yaml
not present):
No such file.
- Errors or warrnings from Solaar:
solaar -dd
2023-02-06 15:36:15,508,508 INFO [MainThread] root: language fr_FR (UTF-8), translations path None
2023-02-06 15:36:15,803,803 INFO [MainThread] logitech_receiver.diversion: GDK Keymap set up
2023-02-06 15:36:15,848,848 INFO [MainThread] solaar.upower: connected to system dbus, watching for suspend/resume events
2023-02-06 15:36:15,917,917 INFO [MainThread] solaar.ui.notify: starting desktop notifications
2023-02-06 15:36:16,220,220 INFO [MainThread] solaar.listener: starting receiver listening threads
2023-02-06 15:36:16,508,508 WARNING [MainThread] hidapi.udev: Report Descriptor not processed for BID 0003 VID 000017EF PID 0000608C: unpack requires a buffer of 2 bytes
2023-02-06 15:36:16,523,523 INFO [MainThread] hidapi.udev: Found device BID 0003 VID 0000046D PID 0000C517 HID++ True True USB 1 1
2023-02-06 15:36:16,523,523 INFO [MainThread] solaar.listener: receiver event add DeviceInfo(path='/dev/hidraw3', bus_id=3, vendor_id='046D', product_id='C517', interface=1, driver='logitech-djreceiver', manufacturer=None, product=None, serial='', release=None, isDevice=None, hidpp_short=True, hidpp_long=True)
2023-02-06 15:36:16,524,524 INFO [MainThread] logitech_receiver.base: New lock 13
2023-02-06 15:36:16,531,531 INFO [ReceiverListener:hidraw3] logitech_receiver.listener: started with <EX100Receiver27Mhz(/dev/hidraw3,13)> (13)
2023-02-06 15:36:16,531,531 INFO [ReceiverListener:hidraw3] solaar.listener: <EX100Receiver27Mhz(/dev/hidraw3,13)>: notifications listener has started (13)
2023-02-06 15:36:16,531,531 INFO [ReceiverListener:hidraw3] logitech_receiver.base: New lock <_ThreadedHandle(/dev/hidraw3)>
2023-02-06 15:36:16,547,547 INFO [ReceiverListener:hidraw3] logitech_receiver.receiver: <EX100Receiver27Mhz(/dev/hidraw3,13)>: receiver notifications enabled => ('wireless',)
2023-02-06 15:36:16,555,555 INFO [ReceiverListener:hidraw3] solaar.listener: status_changed <EX100Receiver27Mhz(/dev/hidraw3,13)>: present, Aucun périphérique jumelé. (0)
2023-02-06 15:36:16,572,572 ERROR [ReceiverListener:hidraw3] logitech_receiver.listener: processing Notification(10,1,41,02,012239)
Traceback (most recent call last):
File "/usr/share/solaar/lib/logitech_receiver/listener.py", line 191, in run
self._notifications_callback(n)
File "/usr/share/solaar/lib/solaar/listener.py", line 234, in _notifications_handler
dev = self.receiver.register_new_device(n.devnumber, n)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/solaar/lib/logitech_receiver/receiver.py", line 241, in register_new_device
dev = Device(self, number, notification)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/solaar/lib/logitech_receiver/device.py", line 121, in __init__
kind = self.get_kind_from_index(number, receiver)
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Device' object has no attribute 'get_kind_from_index'
2023-02-06 15:36:16,580,580 ERROR [ReceiverListener:hidraw3] logitech_receiver.listener: processing Notification(10,3,41,02,021145)
Traceback (most recent call last):
File "/usr/share/solaar/lib/logitech_receiver/listener.py", line 191, in run
self._notifications_callback(n)
File "/usr/share/solaar/lib/solaar/listener.py", line 234, in _notifications_handler
dev = self.receiver.register_new_device(n.devnumber, n)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/solaar/lib/logitech_receiver/receiver.py", line 241, in register_new_device
dev = Device(self, number, notification)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/solaar/lib/logitech_receiver/device.py", line 121, in __init__
kind = self.get_kind_from_index(number, receiver)
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Device' object has no attribute 'get_kind_from_index'
2023-02-06 15:36:24,927,927 INFO [MainThread] solaar.listener: stopping receiver listening threads [<ReceiverListener(ReceiverListener:hidraw3, started daemon 139937519236800)>]
2023-02-06 15:36:25,611,611 INFO [ReceiverListener:hidraw3] solaar.listener: <EX100Receiver27Mhz(/dev/hidraw3,13)>: notifications listener has stopped
2023-02-06 15:36:25,614,614 INFO [MainThread] solaar.ui.notify: stopping desktop notifications
Describe the bug The device paired are not shown. The UI tells no device is paired (even though the CLI with "show" tells 2 are paired).
The issue is that in commit 2c3578a7 "receiver: move receiver pairing information code from device class to receiver class" a call to self.get_kind_from_index in lib/logitech_receiver/device.py class Device, init was left. This function is not defined anymore. This call is also in git master.
To Reproduce Steps to reproduce the behavior:
- start solar -dd with device paired on a 27MHz receiver.
- See error