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

3dConnexion Universal Receiver - Linux OK, Windows and MacOS not #136

Closed
smartavionics opened this issue Jan 19, 2020 · 5 comments
Closed
Labels
macOS Related to macOS backend question Information is requested Windows Related to Windows backend

Comments

@smartavionics
Copy link

Hi, I'm using hidapi (via cython-hidapi) to access a 3dConnexion Spacemouse. The mouse is supplied with a USB Universal Receiver. On Linux, I can open this device and read from it quite happily. But on both Windows and MacOS, although I can open the device, no data is ever returned from a read.
I am opening using the path returned from enumeration.
Also, on both Windows and MacOS, if I plug the same mouse into the computers using a USB cable, they both get mouse data OK (of course, they are then using a different vid:pid).
I don't really know that much about USB, HID, etc. so I am hoping someone can suggest where the problem lies.

Here's what lsusb -v on Linux says about the device...

Thanks.

Bus 001 Device 077: ID 256f:c652  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        32
  idVendor           0x256f 
  idProduct          0xc652 
  bcdDevice            1.02
  iManufacturer           1 3Dconnexion
  iProduct                2 3Dconnexion Universal Receiver
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          134
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          4 3DX01.02_B0003
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               98mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     448
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     129
         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     0x0020  1x 32 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     129
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     129
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     129
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)
@Youw
Copy link
Member

Youw commented Jan 19, 2020

Can you confirm, that you're opening the same interface (hid_device_info->interface_number) on each platform?

Also, please check is it related to some known limitations (at least on Windows): #61.

@Youw Youw added macOS Related to macOS backend question Information is requested Windows Related to Windows backend labels Jan 19, 2020
@smartavionics
Copy link
Author

Can you confirm, that you're opening the same interface (hid_device_info->interface_number) on each platform?

I believe I did. In fact, I tried explicitly specifying the interface number and none worked.

Also, please check is it related to some known limitations (at least on Windows): #61.

Given that the same spacemouse works quite happily when plugged in using the direct USB cable instead of the Universal Receiver, I don't think it's the same problem. But, perhaps it is?

@Youw
Copy link
Member

Youw commented Jan 19, 2020

I believe I did. In fact, I tried explicitly specifying the interface number and none worked.

I'd suggest you check what is "correct" interface number on Linux, where you can get it to work, so you know exactly which one.

I don't think it's the same problem. But, perhaps it is?

Maybe not. Maybe it is related, but not directly.
Windows/macOS native HID API has its limitations (for security reasons) when it comes to Keyboard/Mouse devices, you're not the first one who has issues with it.

Unfortunately I can't help you much more. Maybe someone else from the community will.

@smartavionics
Copy link
Author

I'd suggest you check what is "correct" interface number on Linux, where you can get it to work, so you know exactly which one.

Good idea, I will do that.

Unfortunately I can't help you much more. Maybe someone else from the community will.

Thanks anyway for your assistance. Every little helps!

@smartavionics
Copy link
Author

I found the problem, on Windows (and probably MacOS too), I needed to match the usage page and usage to 1 and 8 respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macOS Related to macOS backend question Information is requested Windows Related to Windows backend
Projects
None yet
Development

No branches or pull requests

2 participants