pwr-Solaar / Solaar

Linux device manager for Logitech devices
https://pwr-solaar.github.io/Solaar
GNU General Public License v2.0
5.29k stars 398 forks source link

Show WPID in pairing log #1205

Closed hai-ld closed 3 years ago

hai-ld commented 3 years ago

Information

Nano Receiver
  Device path  : /dev/hidraw1
  USB id       : 046d:C52F
  Serial       : E3FD922A
    Firmware   : 30.00.B0009
  Has 1 paired device(s) out of a maximum of 1.
  Has 37 successful pairing(s) remaining.
  Notifications: wireless, software present (0x000900)

  1: Multi Device Silent Mouse M585/M590
     Device path  : /dev/hidraw2
     WPID         : 406B
     Codename     : M585/M590
     Kind         : mouse
     Protocol     : HID++ 4.5
     Polling rate : 8 ms (125Hz)
     Serial number: D4001A4D
     The power switch is located on the base.
     Battery: unknown (device is offline).

Unifying Receiver
  Device path  : /dev/hidraw5
  USB id       : 046d:C52B
  Serial       : ADF09427
    Firmware   : 12.10.B0032
    Bootloader : 02.14
    Other      : AA.AA
  Has 2 paired device(s) out of a maximum of 6.
  Notifications: wireless, software present (0x000900)
  Device activity counters: 1=159

  1: Wireless Mouse M325
     Device path  : /dev/hidraw6
     WPID         : 400A
     Codename     : M325
     Kind         : mouse
     Protocol     : HID++ 2.0
     Polling rate : 8 ms (125Hz)
     Serial number: BC6C1341
     Model ID:      000000000000
     Unit ID:       00000000
          Firmware: RQM 40.01.B0018
     The power switch is located on the base.
     Supports 22 HID++ 2.0 features:
         0: ROOT                   {0000}   
         1: FEATURE SET            {0001}   
         2: DEVICE FW VERSION      {0003}   
            Firmware: Firmware RQM 40.01.B0018 400A
            Unit ID: 00000000  Model ID: 000000000000  Transport IDs: {}
         3: DEVICE NAME            {0005}   
            Name: Wireless Mouse M325
            Kind: mouse
         4: BATTERY STATUS         {1000}   
            Battery: 70%, discharging, next level 5%.
         5: unknown:1830           {1830}   internal, hidden
         6: unknown:1850           {1850}   internal, hidden
         7: unknown:1860           {1860}   internal, hidden
         8: unknown:1890           {1890}   internal, hidden
         9: unknown:18A0           {18A0}   internal, hidden
        10: unknown:18C0           {18C0}   internal, hidden
        11: WIRELESS DEVICE STATUS {1D4B}   
        12: unknown:1DF3           {1DF3}   internal, hidden
        13: REPROG CONTROLS        {1B00}   
        14: REMAINING PAIRING      {1DF0}   hidden
            Remaining Pairings: 118
        15: unknown:1E00           {1E00}   hidden
        16: unknown:1E80           {1E80}   internal, hidden
        17: unknown:1E90           {1E90}   internal, hidden
        18: unknown:1F03           {1F03}   internal, hidden
        19: VERTICAL SCROLLING     {2100}   
            Roller type: micro
            Ratchet per turn: 36
            Scroll lines: 0
        20: MOUSE POINTER          {2200}   
            DPI: 800
            Acceleration: low
            Override OS ballistics
            No vertical tuning, standard mice
        21: unknown:18B0           {18B0}   internal, hidden
     Has 5 reprogrammable keys:
         0: Left Button                => Left Click                    mse, reprogrammable
         1: Right Button               => Right Click                   mse, reprogrammable
         2: Middle Button              => Mouse Middle Button           mse, reprogrammable
         3: Back Button                => Back                          mse, reprogrammable
         4: Forward Button             => BrowserForward                mse, reprogrammable
     Battery: 70%, discharging, next level 5%.

  2: Wireless Illuminated Keyboard K800
     Device path  : /dev/hidraw8
     WPID         : 2010
     Codename     : K800
     Kind         : keyboard
     Protocol     : HID++ 1.0
     Polling rate : 20 ms (50Hz)
     Serial number: 895F098C
     The power switch is located on the top right corner.
     Battery: unknown (device is offline).

Is your feature request related to a problem? Please describe. I'm trying to pair a M185 mouse to a nano receiver. According to the documentation, only a few WPIDs of this product is supported. My pairing is unsuccessful but I'd like to know the WPID of the mouse in the pairing log for verification. Below is my pairing log. hidraw1 is the nano receiver. hidraw5 is an unifying receiver, which also failed to pair with the mouse.

``` 13:36:41,389 DEBUG [MainThread] logitech_receiver.base: (7) <= w[10 FF 83B5 030000] 13:36:41,392 DEBUG [MainThread] logitech_receiver.base: (7) => r[11 FF 83B5 03E3FD922A0B01000300000000000000] 13:36:41,392 DEBUG [MainThread] logitech_receiver.base: (7) <= w[10 FF 80B2 000000] 13:36:41,394 DEBUG [MainThread] logitech_receiver.base: (7) => r[10 FF 8F80 B20300] 13:36:41,394 DEBUG [MainThread] logitech_receiver.base: (7) device 0xFF error on request {80B2}: 3 = invalid value 13:36:41,394 DEBUG [MainThread] solaar.cli: [/dev/hidraw1] => 13:36:41,396 DEBUG [MainThread] logitech_receiver.base: (8) <= w[10 FF 83B5 030000] 13:36:41,398 DEBUG [MainThread] logitech_receiver.base: (8) => r[11 FF 83B5 03ADF0942702060A0000000000000000] 13:36:41,398 DEBUG [MainThread] logitech_receiver.base: (8) <= w[10 FF 80B2 000000] 13:36:41,499 DEBUG [MainThread] logitech_receiver.base: (8) => r[20 01 4101 0A40040000000000000000] 13:36:41,499 DEBUG [MainThread] logitech_receiver.base: (8) => r[20 02 4101 10201A4000000000000000] 13:36:41,499 DEBUG [MainThread] logitech_receiver.base: (8) => r[20 00 4102 0000000000000000000000] 13:36:41,500 DEBUG [MainThread] logitech_receiver.base: (8) => r[10 FF 8F80 B20300] 13:36:41,500 DEBUG [MainThread] logitech_receiver.base: (8) device 0xFF error on request {80B2}: 3 = invalid value 13:36:41,500 DEBUG [MainThread] solaar.cli: [/dev/hidraw5] => 13:36:41,503 DEBUG [MainThread] logitech_receiver.base: (7) <= w[10 FF 8100 000000] 13:36:41,504 DEBUG [MainThread] logitech_receiver.base: (7) => r[10 FF 8100 000900] 13:36:41,504 DEBUG [MainThread] logitech_receiver.base: (7) <= w[10 FF 83B5 200000] 13:36:41,508 DEBUG [MainThread] logitech_receiver.base: (7) => r[11 FF 83B5 200908406B0402020700000000000000] 13:36:41,516 INFO [MainThread] logitech_receiver.receiver: : found new device 1 (406B) 13:36:41,516 DEBUG [MainThread] logitech_receiver.base: (7) <= w[10 FF 80B2 010014] 13:36:41,522 DEBUG [MainThread] logitech_receiver.base: (7) => r[10 FF 4A01 002A00] 13:36:41,522 INFO [MainThread] logitech_receiver.notifications: : pairing lock is open 13:36:41,524 DEBUG [MainThread] logitech_receiver.base: (7) => r[10 FF 80B2 000000] Pairing: turn your new device on (timing out in 20 seconds). 13:36:51,348 DEBUG [MainThread] logitech_receiver.base: (7) => r[10 FF 4A00 022A00] 13:36:51,349 INFO [MainThread] logitech_receiver.notifications: : pairing lock is closed 13:36:51,349 WARNING [MainThread] logitech_receiver.notifications: pairing error 2: device not supported ```

Describe the solution you'd like WPID of device detected after being turned on should be displayed in a DEBUG or INFO message. Or enrich the device not supported error with more information (including WPID).

Describe alternatives you've considered None

pfps commented 3 years ago

The information available to Solaar is the third-last ling of the log, which does not contain the WPID of the device that did not pair. So Solaar is unable to report the WPID, because that information is not available to it.

Maybe there is some way to get the receiver to divulge this information by querying the receiver, but there is no documentation on how to do this.