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

Use single wireless dongle for multiple devices #1892

Open
J5cott opened this issue Aug 24, 2022 · 22 comments
Open

Use single wireless dongle for multiple devices #1892

J5cott opened this issue Aug 24, 2022 · 22 comments
Labels
enhancement not stale Label for issues the Stale bot shouldn't close

Comments

@J5cott
Copy link

J5cott commented Aug 24, 2022

Distribution

Pop OS 22.04 LTS

Razer deathadder V2 pro
Razer BlackWidow V3 pro

Suport

After boot, there is no way for a casual user to pair an existing dongle to a new device. In order to make multiple wireless razer devices to work with your linux system you need to have each device's dongle plugged into the computer. On windows you can plug in one dongle and you are good to go. Linux should have this same functionality.

Let me know what financial support is required to implement this feature.

@J5cott J5cott added the support label Aug 24, 2022
@z3ntu
Copy link
Member

z3ntu commented Oct 15, 2022

Sounds like #1869 and #1921 , right? Or are you talking about something different?

@stlhrt
Copy link

stlhrt commented Dec 29, 2022

Hyperpolling dongle is something different.
Since some time the dongles shipped with some wireless devices allow pairing with multiple devices. Something akin to the logitech unified receiver.
Example hardware Deathstalker V2 Pro, Naga V2 Pro.
The dongle, when connected, report on lsusb as single device with ID of the device they came from, yet they are connected to up to two devices.
Let me know if you need some debug info on this as I have above 2 devices which can use each others dongles.

Example lsusb output for two devices on single dongle:

Bus 001 Device 081: ID 1532:00a8 Razer USA, Ltd Razer Naga V2 Pro
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1532 Razer USA, Ltd
  idProduct          0x00a8 
  bcdDevice            1.00
  iManufacturer           1 Razer
  iProduct                2 Razer Naga V2 Pro
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0054
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    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            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     100
         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     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     314
         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     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      61
         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     0x0040  1x 64 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)

Thus wireless dongles should be interrogated if they contain a single HID interface linked to device or multiple ones...

@z3ntu
Copy link
Member

z3ntu commented Jan 9, 2023

Can you provide USB packet captures https://github.com/openrazer/openrazer/wiki/Reverse-Engineering-USB-Protocol of Razer Synapse on Windows handling this then? I'm not aware of a way to ask Razer devices this.

@stlhrt
Copy link

stlhrt commented Jan 10, 2023

pcap I think would help how it pairs or un pairs (like the standalone hyperspeed dongle)
The issue here is that on USB device id associated with a mouse or a keyboard, can exist another HID device which is another mouse or keyboard... So if module to be loaded is detected by the identifier then second device in most cases will be a different kind, as most people would pair a keyboard to mouse dongle or vice versa.

@stlhrt
Copy link

stlhrt commented Jan 11, 2023

@stlhrt
Copy link

stlhrt commented Jan 11, 2023

@z3ntu
Copy link
Member

z3ntu commented Jan 11, 2023

Indeed looks like it's sending requests to the different underlying devices

Status Trans Packet Proto DataSize Class CMD Args : nagav2pro_pairs_deathstalkerv2.pcapng
02     1f    0000   00    31       00    bf  020100a800ffff0000000000000000000000000000000000000... | UNKNOWN
02     1f    0000   00    03       00    c5  0100a8 | UNKNOWN
02     1f    0000   00    03       00    bc  000000 | UNKNOWN
02     1f    0000   00    31       00    bf  020100a800ffff0000000000000000000000000000000000000... | UNKNOWN
02     1f    0000   00    03       00    c5  0100a8 | UNKNOWN
02     1f    0000   00    03       00    bc  000000 | UNKNOWN
00     9f    0000   00    01       00    46  01 | UNKNOWN
00     9f    0000   00    03       00    41  010296 | UNKNOWN
00     9f    0000   00    01       00    0b  05 | UNKNOWN
02     1f    0000   00    03       00    c5  0100a8 | UNKNOWN
02     1f    0000   00    03       00    bc  000000 | UNKNOWN
02     1f    0000   00    31       00    bf  020100a80102960000000000000000000000000000000000000... | UNKNOWN
02     1f    0000   00    03       00    c5  0100a8 | UNKNOWN
02     1f    0000   00    03       00    bc  000000 | UNKNOWN

Could you maybe do a screencap of doing these actions so I kind of understand how Razer shows this in their UI? And from what I understand now, you have the dongle for Razer Naga V2 Pro and then you somehow pair the Razer DeathStalker V2 Pro to the same wireless dongle and you can use both via this dongle? And Synapse also just pretends both devices are connected normally and nothing funky is going on?

As you can see in the part of the pcap above, there's quite some references to the PID of the Naga (00a8) and also some for the DeathStalker (0296) but honestly based on this limited sample size I can't really say what the rest of the parameters are supposed to mean or how I can figure out that one device is transaction id 0x1f and the other 0x9f apparently..

@stlhrt
Copy link

stlhrt commented Jan 12, 2023

https://user-images.githubusercontent.com/3652939/211944567-26636cbd-0133-42f1-9bfe-b4c5916d8621.mp4
nagav2pro_pairs_deathstalkerv2-more.pcapng.gz

The process is very simple both on the Naga dongle and DS one. Just click Pair turn on device and it connects.

@z3ntu
Copy link
Member

z3ntu commented Jan 15, 2023

Clear, thanks!

A few more questions: if the two devices are paired and you turn them off, does Synapse indicate that it's turned off? If so can you make a pcap (with both devices connected), then turn off the mouse and maybe wait a bit. And a separate one where you turn off the keyboard?

Also do you have another device other than your keyboard that you can pair with this dongle? Would be good to see what arguments change in the pcap as many parameters are still unclear.

@stlhrt
Copy link

stlhrt commented Jan 15, 2023 via email

@z3ntu
Copy link
Member

z3ntu commented Jan 15, 2023

Pcap would be nice then for the case where one device disappears when turned off :) Just to confirm my suspicions I see in the args

@stlhrt
Copy link

stlhrt commented Jan 16, 2023

dsv2pro_and_naga_synapse_on_off_interactions.pcapng.gz

pcap shows how synapse detects and interrogates dongle with 2 devices attached. Then how it behaves when either one is turned on and of in different order. Hope this helps :)

@z3ntu
Copy link
Member

z3ntu commented Jan 16, 2023

02     88    0000   00    31       00    bf  020100a80102960000000000000000000000000000000000000...
02     1f    0000   00    31       00    bf  020100a80102960000000000000000000000000000000000000...
02     1f    0000   00    31       00    bf  020100a80102960000000000000000000000000000000000000...
02     1f    0000   00    31       00    bf  020100a80002960000000000000000000000000000000000000...

So based on these packets I would assume both devices are connected in the first three, and then in the last the 0296 device (keyboard) disappears. But based on your description you also turned off the mouse in the meantime so it doesn't seem to be exactly that way...

@stlhrt
Copy link

stlhrt commented Jan 17, 2023

so you'd need more precise sample with exact descriptions. Maybe a pcap with a screen capture showing whats going in the synapse UI?

@stlhrt
Copy link

stlhrt commented Jan 18, 2023

dsv2pro_and_nagav2pro-2023-01-19_00.21.43.pcapng.gz

dsv2pro_and_nagav2pro-2023-01-19_00.21.43_2.mp4

This pair should be more helpful :)
After pairing the newly added device isnt properly detected inside VM so had to toggle usb redirection near 1:00

@z3ntu
Copy link
Member

z3ntu commented Feb 11, 2023

fwiw these are the 00-bf packets from the new capture

Status Trans Packet Proto DataSize Class CMD Args
02     08    0000   00    31       00    bf  020100a800ffff0000000000000000000000000000000000000... | UNKNOWN
02     1f    0000   00    31       00    bf  020100a800ffff0000000000000000000000000000000000000... | UNKNOWN
02     1f    0000   00    31       00    bf  020100a800ffff0000000000000000000000000000000000000... | UNKNOWN
02     1f    0000   00    31       00    bf  020100a800ffff0000000000000000000000000000000000000... | UNKNOWN
02     1f    0000   00    31       00    bf  020100a800ffff0000000000000000000000000000000000000... | UNKNOWN
02     1f    0000   00    31       00    bf  020100a80102960000000000000000000000000000000000000... | UNKNOWN
02     08    0000   00    31       00    bf  020000a80102960000000000000000000000000000000000000... | UNKNOWN

really seems to be a not-so-trivial feature that I don't really have the time to look into in-depth...

@J5cott
Copy link
Author

J5cott commented Mar 3, 2023

Should I close this issue since it is not going to be implemented?

@johnafogarty4
Copy link

damn, i was hopeful that this would be something that could be implemented.

@z3ntu
Copy link
Member

z3ntu commented Mar 12, 2023

@J5cott How do you get this impression? I doubt I implied anywhere that this is out-of-scope for OpenRazer

@J5cott
Copy link
Author

J5cott commented Mar 12, 2023

I guess I misread your comment: "...really seems to be a not-so-trivial feature that I don't really have the time to look into in-depth" lead me to believe that this wasn't going to happen

@z3ntu
Copy link
Member

z3ntu commented Mar 12, 2023

Pull requests are always welcome :) Generally this project nowadays is mostly driven by pull requests, at least for devices and new device-specific features since for the most part you need to have the access to the device to develop and test.

@jarrard
Copy link

jarrard commented Jun 22, 2023

I have a Razer BlackWidow3 Pro connected to my Razer Orochi V2 receiver and it seems Polychromatic and RazerGenie will only show the mouse device and not keyboard thus I can't adjust the RGB on the BlackWidow.

It's a bit of a shame, seems related to this. If there is a workaround let me know.

Cheers

@z3ntu z3ntu added enhancement not stale Label for issues the Stale bot shouldn't close and removed support wontfix labels Oct 21, 2023
@openrazer openrazer deleted a comment from github-actions bot Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement not stale Label for issues the Stale bot shouldn't close
Development

No branches or pull requests

5 participants