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

Razer Naga Hex V2 #85

Open
l3iggs opened this issue Aug 17, 2016 · 28 comments
Open

Razer Naga Hex V2 #85

l3iggs opened this issue Aug 17, 2016 · 28 comments

Comments

@l3iggs
Copy link

l3iggs commented Aug 17, 2016

@mbuesch
Hi, I just bought one of these. Looks like it's not supported here. Are you aware of its existence? I'd like to try to add support for it. Would you estimate this would be a lot of work? trivial?

lsusb -v gives

Bus 001 Device 010: ID 1532:0050 Razer USA, Ltd 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1532 Razer USA, Ltd
  idProduct          0x0050 
  bcdDevice            2.00
  iManufacturer           1 Razer
  iProduct                2 Razer Naga Hex V2
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           84
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    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      94
         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     0x0008  1x 8 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      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     159
         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     0x0010  1x 16 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      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     0x0008  1x 8 bytes
        bInterval               1
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)
@mbuesch
Copy link
Owner

mbuesch commented Aug 17, 2016

The Hex v2 is a known unsupported device. (That's why it says v1 on the homepage ;) )

It is not possible to estimate the effort. That can go from just adding a USB ID to writing a completely new hardware driver module.
A mouse having a predecessor even with the same name does not necessarily tell anything about its API.

But feel free to work on support for this device.

@l3iggs
Copy link
Author

l3iggs commented Aug 17, 2016

I've attempted to attach here a capture I've just made of me using the Windows Razer mouse config tool to map the 1 keyboard key to the button marked 1 on the mouse.

@mbuesch does it look like I've captured something useful here?

button1-mapped-to-kb-1.zip

@mbuesch
Copy link
Owner

mbuesch commented Aug 17, 2016

Well, it looks like captured control data.
Please compare that to the existing naga-hex driver (and possibly others).
At the top of the C file you can see the on-wire data structures (those with "packed" attribute).

@l3iggs
Copy link
Author

l3iggs commented Aug 17, 2016

Well, struct naga_command is 90 bytes long and my capture has a few packets with a 90 byte long field that wireshark calls "CONTROL response data". The crc in the struct seems to line up with a crc looking byte in my captures too.

@mbuesch
Copy link
Owner

mbuesch commented Aug 17, 2016

Good start.
Please check if the structures for all commands (LEDs, DPIs, etc...) match (or not).

@l3iggs
Copy link
Author

l3iggs commented Aug 17, 2016

I've just installed a build from my fork.
The mouse shows up in the dropdown in qrazercfg now, but that's about all that works.
Toggling "Glowing Logo LED" makes the cursor disappear 😨 and puts a bunch of bad things in my system log:

Aug 17 22:39:11  /usr/lib/gdm/gdm-x-session[1693]: (II) config/udev: removing device Razer Razer Naga Hex V2
Aug 17 22:39:11  /usr/lib/gdm/gdm-x-session[1693]: (**) Option "fd" "38"
Aug 17 22:39:11  /usr/lib/gdm/gdm-x-session[1693]: (II) UnloadModule: "libinput"
Aug 17 22:39:11  /usr/lib/gdm/gdm-x-session[1693]: (II) systemd-logind: releasing fd for 13:77
Aug 17 22:39:11  razerd[1352]: librazer: razer-naga: Command 0003/0401 failed with 03
...

The firmware version shows 1.00 (don't know what it should be).
So it looks like I've got more work to do.

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

I'm going to put my captures here for reference. Let me know if I should put them elsewhere.

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

map keyboard key "2" to side mouse button 2
button2-mapped-to-kb-2.zip

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

set acceleration to 1
set-accel-to-1.zip

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

set acceleration to 10
set-accel-to-10.zip

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

set dpi to 100
set-DPI-to-100.zip

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

set dpi to 16000
set-DPI-to-16000.zip

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

set polling rate to 125 Hz
set-polling-rate-to-125.zip

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

set polling rate to 1000 Hz
set-polling-rate-to-1000.zip

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

set lighting effect to none
set-lighting-effect-none.zip

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

set lighting effect to static
set-lighting-effect-static.zip

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

change static lighting to blue
set-lighting-effect-staticBlue.zip

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

change static lighting to red
set-lighting-effect-staticRed.zip

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

change static lighting to green
set-lighting-effect-staticGreen.zip

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

set lighting brightness to 33%
set-lighting-brightness-33.zip

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

set lighting brightness to 100%
set-lighting-brightness-100.zip

@l3iggs
Copy link
Author

l3iggs commented Aug 20, 2016

set lighting effect to spectrum cycling
set-lighting-effect-spectrumCycling.zip

@danhph
Copy link

danhph commented Jan 16, 2017

I just bought one and really want to help!
Is there any quick guide for me?

@z3ntu
Copy link
Contributor

z3ntu commented Jan 16, 2017

I think only this document exists for this project: https://github.com/mbuesch/razer/blob/master/HACKING.md

@mbuesch
Copy link
Owner

mbuesch commented Jan 16, 2017

In addition to that the information from the website:
https://bues.ch/h/razercfg#how_to_add_support_for_new_devices

@l3iggs
Copy link
Author

l3iggs commented Jan 18, 2017

Quick update from my end--
I haven't really made any further progress. I stopped when I realized that adding support for this mouse isn't as trivial as adding the USB ID and re-using one of the already existing drivers. Unfortunately, I just don't have the time to get this working. I've dropped my captures here in hopes that the next dev that comes along with time to work on this might find them useful.

@z3ntu
Copy link
Contributor

z3ntu commented Jan 18, 2017

For anyone else, it's supported by https://github.com/terrycain/razer-drivers

@l3iggs
Copy link
Author

l3iggs commented Jan 18, 2017

😲

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

No branches or pull requests

4 participants