Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nano Receiver with USB ID C542 does not use HID++ #1835

Closed
yesimxev opened this issue Nov 10, 2022 · 9 comments
Closed

Nano Receiver with USB ID C542 does not use HID++ #1835

yesimxev opened this issue Nov 10, 2022 · 9 comments

Comments

@yesimxev
Copy link

yesimxev commented Nov 10, 2022

Dmesg log

[21837.663373] usb 2-2: new full-speed USB device number 9 using xhci_hcd
[21837.815411] usb 2-2: New USB device found, idVendor=046d, idProduct=c542, bcdDevice= 3.02
[21837.815419] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[21837.815422] usb 2-2: Product: Wireless Receiver
[21837.815424] usb 2-2: Manufacturer: Logitech
[21837.819645] input: Logitech Wireless Receiver Mouse as /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.0/0003:046D:C542.000D/input/input38
[21837.819801] hid-generic 0003:046D:C542.000D: input,hidraw0: USB HID v1.11 Mouse [Logitech Wireless Receiver] on usb-0000:00:14.0-2/input0

Describe the bug
Adapter CU0019 not recognised (same on windows Logitech utilities). Tried multiple of these adapters.

To Reproduce

  1. Plug in
  2. Start solaar

Screenshots
Screenshot_2022-11-10_13-49-26

@yesimxev yesimxev added the bug label Nov 10, 2022
@yesimxev
Copy link
Author

Update just seen the docs..
Some Nano receivers are only partly supported as they do not fully implement the full HID++ 1.0 protocol. Some Nano receivers are not supported at all as they do not implement the HID++ protocol. Receivers with USB ID 046d:c542 fall into this category.

@pfps
Copy link
Collaborator

pfps commented Nov 10, 2022

It might be the case that Solaar can do a better job of supporting the C542. Solaar 1.1.7 has code to recognize more receivers, and the comment about the C542 may be in error.

Upgrade to version 1.1.7 if you have not already done so.

Run Solaar with the -ddd option and post the resulting output. Also try the instructions for adding a new device in the device documentation.

@pfps pfps reopened this Nov 10, 2022
@pfps pfps changed the title CU0019 is not recognised Nano Receiver with USB ID C542 is not recognised Nov 10, 2022
@yesimxev
Copy link
Author

Tried 1.1.5, I'll upgrade next week as it's at work and let you know.

@yesimxev
Copy link
Author

yesimxev commented Nov 14, 2022

Debug with 1.1.7

┌──(root💀kali)-[~/Solaar/bin]
└─# ./solaar -ddd                                                       
2022-11-14 07:52:57,739,739     INFO [MainThread] root: language en_US (UTF-8), translations path None
2022-11-14 07:52:57,942,942     INFO [MainThread] logitech_receiver.diversion: GDK Keymap set up
2022-11-14 07:52:57,957,957    DEBUG [MainThread] solaar.ui.tray: using Ayatana AppIndicator3
2022-11-14 07:52:57,967,967     INFO [MainThread] solaar.upower: connected to system dbus, watching for suspend/resume events
2022-11-14 07:52:58,017,017    DEBUG [MainThread] solaar.ui: startup registered=True, remote=False
2022-11-14 07:52:58,018,018    DEBUG [AsyncUI] solaar.tasks: started
2022-11-14 07:52:58,018,018     INFO [MainThread] solaar.ui.notify: starting desktop notifications
2022-11-14 07:52:58,022,022    DEBUG [MainThread] solaar.ui.icons: sys.path[0] = /root/Solaar/lib
2022-11-14 07:52:58,022,022    DEBUG [MainThread] solaar.ui.icons: looking for icons in /root/Solaar/icons
2022-11-14 07:52:58,022,022    DEBUG [MainThread] solaar.ui.icons: looking for icons in /root/Solaar/share/solaar/icons
2022-11-14 07:52:58,022,022    DEBUG [MainThread] solaar.ui.icons: icon theme paths: ['/root/Solaar/share/solaar/icons', '/root/.local/share/icons', '/root/.icons', '/usr/share/xfce4/icons', '/usr/local/share/icons', '/usr/share/icons', '/usr/share/icons', '/usr/share/xfce4/pixmaps', '/usr/local/share/pixmaps', '/usr/share/pixmaps', '/usr/share/pixmaps']
2022-11-14 07:52:58,262,262     INFO [MainThread] solaar.listener: starting receiver listening threads
2022-11-14 07:52:58,264,264    DEBUG [MainThread] solaar.ui: activate
2022-11-14 07:53:01,232,232  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for BID 0003 VID 0000046D PID 0000C542: No module named 'hid_parser'
2022-11-14 07:53:01,232,232     INFO [MainThread] hidapi.udev: Found device BID 0003 VID 0000046D PID 0000C542 HID++ None None USB 0 1

I noticed hid-parser is missing, see the debug after installed:

┌──(root💀kali)-[~/Solaar/bin]
└─# ./solaar -ddd                                                                                                                       1 ⨯
2022-11-14 07:59:21,640,640     INFO [MainThread] root: language en_US (UTF-8), translations path None
2022-11-14 07:59:21,845,845     INFO [MainThread] logitech_receiver.diversion: GDK Keymap set up
2022-11-14 07:59:21,859,859    DEBUG [MainThread] solaar.ui.tray: using Ayatana AppIndicator3
2022-11-14 07:59:21,869,869     INFO [MainThread] solaar.upower: connected to system dbus, watching for suspend/resume events
2022-11-14 07:59:21,919,919    DEBUG [MainThread] solaar.ui: startup registered=True, remote=False
2022-11-14 07:59:21,920,920    DEBUG [AsyncUI] solaar.tasks: started
2022-11-14 07:59:21,921,921     INFO [MainThread] solaar.ui.notify: starting desktop notifications
2022-11-14 07:59:21,924,924    DEBUG [MainThread] solaar.ui.icons: sys.path[0] = /root/Solaar/lib
2022-11-14 07:59:21,925,925    DEBUG [MainThread] solaar.ui.icons: looking for icons in /root/Solaar/icons
2022-11-14 07:59:21,925,925    DEBUG [MainThread] solaar.ui.icons: looking for icons in /root/Solaar/share/solaar/icons
2022-11-14 07:59:21,925,925    DEBUG [MainThread] solaar.ui.icons: icon theme paths: ['/root/Solaar/share/solaar/icons', '/root/.local/share/icons', '/root/.icons', '/usr/share/xfce4/icons', '/usr/local/share/icons', '/usr/share/icons', '/usr/share/icons', '/usr/share/xfce4/pixmaps', '/usr/local/share/pixmaps', '/usr/share/pixmaps', '/usr/share/pixmaps']
2022-11-14 07:59:22,171,171     INFO [MainThread] solaar.listener: starting receiver listening threads
2022-11-14 07:59:22,173,173    DEBUG [MainThread] solaar.ui: activate
2022-11-14 07:59:24,701,701  WARNING [MainThread] hidapi.udev: Report Descriptor not processed for BID 0003 VID 0000046D PID 0000C542: Expecting 7 usages but got 1
2022-11-14 07:59:24,701,701     INFO [MainThread] hidapi.udev: Found device BID 0003 VID 0000046D PID 0000C542 HID++ None None USB 0 1

@pfps
Copy link
Collaborator

pfps commented Nov 14, 2022

Hmm. Can you try the process for adding new devices from https://pwr-solaar.github.io/Solaar/devices? Use this issue instead of a new enhancement issue.

@yesimxev
Copy link
Author

HID_NAME: /sys/class/hidraw/hidraw0/device/uevent:HID_NAME=Logitech Wireless Receiver
Uevent:

cat /sys/class/hidraw/hidraw0/device/uevent                                                                                                          1 ⨯
DRIVER=hid-generic
HID_ID=0003:0000046D:0000C542
HID_NAME=Logitech Wireless Receiver
HID_PHYS=usb-0000:00:14.0-2/input0
HID_UNIQ=
MODALIAS=hid:b0003g0001v0000046Dp0000C542

Hidrd output

root@kali:~/hidrd/src# ./hidrd-convert -o spec /sys/class/hidraw/hidraw0/device/report_descriptor
Usage Page (Desktop),               ; Generic desktop controls (01h)
Usage (Mouse),                      ; Mouse (02h, application collection)
Collection (Application),
    Report ID (1),
    Usage (Pointer),                ; Pointer (01h, physical collection)
    Collection (Physical),
        Usage Page (Button),        ; Button (09h)
        Usage Minimum (01h),
        Usage Maximum (05h),
        Logical Minimum (0),
        Logical Maximum (1),
        Report Count (5),
        Report Size (1),
        Input (Variable),
        Report Count (1),
        Report Size (3),
        Input (Constant),
        Usage Page (Desktop),       ; Generic desktop controls (01h)
        Usage (X),                  ; X (30h, dynamic value)
        Usage (Y),                  ; Y (31h, dynamic value)
        Logical Minimum (-32767),
        Logical Maximum (32767),
        Report Size (16),
        Report Count (2),
        Input (Variable, Relative),
        Usage (Wheel),              ; Wheel (38h, dynamic value)
        Logical Minimum (-127),
        Logical Maximum (127),
        Report Size (8),
        Report Count (1),
        Input (Variable, Relative),
    End Collection,
End Collection,
Usage Page (Desktop),               ; Generic desktop controls (01h)
Usage (00h),
Collection (Application),
    Report ID (5),
    Usage Page (FF00h),             ; FF00h, vendor-defined
    Usage (01h),
    Logical Minimum (-127),
    Logical Maximum (127),
    Report Size (8),
    Report Count (7),
    Feature (Variable),
End Collection

lsusb:

root@kali:~/hidrd/src# lsusb -vv -d 046d:c542

Bus 002 Device 006: ID 046d:c542 Logitech, Inc. Wireless Receiver
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x046d Logitech, Inc.
  idProduct          0xc542 
  bcdDevice            3.02
  iManufacturer           1 Logitech
  iProduct                2 Wireless Receiver
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0022
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               50mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode           33 US
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      90
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               4
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

@pfps
Copy link
Collaborator

pfps commented Nov 14, 2022

Your information confirms that this receiver does not have the ability to either send or receive HID++ messages. Solaar is only for devices that use HID++ so Solaar does not support this device.

I have no idea why Logitech is using a different protocol for this receiver.

@pfps pfps changed the title Nano Receiver with USB ID C542 is not recognised Nano Receiver with USB ID C542 does not use HID++ Nov 14, 2022
@pfps pfps removed the bug label Nov 14, 2022
@pfps pfps closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2022
@yesimxev
Copy link
Author

Thanks for your time though 😄

@pfps
Copy link
Collaborator

pfps commented Nov 14, 2022

For future comparison here is the output from a Logitech Unifying Receiver, which does use HID++

Usage Page (FF00h),         ; FF00h, vendor-defined
Usage (01h),
Collection (Application),
    Report ID (16),
    Report Size (8),
    Report Count (6),
    Logical Minimum (0),
    Logical Maximum (255),
    Usage (01h),
    Input,
    Usage (01h),
    Output,
End Collection,
Usage Page (FF00h),         ; FF00h, vendor-defined
Usage (02h),
Collection (Application),
    Report ID (17),
    Report Size (8),
    Report Count (19),
    Logical Minimum (0),
    Logical Maximum (255),
    Usage (02h),
    Input,
    Usage (02h),
    Output,
End Collection,
Usage Page (FF00h),         ; FF00h, vendor-defined
Usage (04h),
Collection (Application),
    Report ID (32),
    Report Size (8),
    Report Count (14),
    Logical Minimum (0),
    Logical Maximum (255),
    Usage (41h),
    Input,
    Usage (41h),
    Output,
    Report ID (33),
    Report Count (31),
    Logical Minimum (0),
    Logical Maximum (255),
    Usage (42h),
    Input,
    Usage (42h),
    Output,
End Collection

The relevant parts are the vendor-defined usages with report id 16 and 17, which are for short and long HID++ messages, respectively. A device that supports HID++ will have one or the other of these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants