logiconf icon indicating copy to clipboard operation
logiconf copied to clipboard

How to use it?

Open michaelfresco opened this issue 7 years ago • 11 comments

Cool repo. But how would you use this? Do you think its MacOs compatible?

michaelfresco avatar Feb 26 '18 11:02 michaelfresco

Yes, I think it should work on Mac OS. I only provide binaries for linux (https://github.com/dslul/logiconf/releases), so if you want to try on Mac download Qt Creator (opensource version), open the project and try to build it. Let me know the results.

dslul avatar Mar 02 '18 21:03 dslul

That's cool stuff! I don't have a G402 yet. I'm still rocking the g400, but I wanna upgrade some day. -- Will try to look into later this week.

On Fri, Mar 2, 2018 at 10:57 PM, Daniele Laudani [email protected] wrote:

Yes, I think it should work on Mac OS. I only provide binaries for linux, so if you want to try download Qt Creator (opensource version) and try to build under mac. Let me know the results.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dslul/logiconf/issues/1#issuecomment-370064510, or mute the thread https://github.com/notifications/unsubscribe-auth/AOXhMLO6c7JQrdl64WQulneKACLHaiLzks5tacBQgaJpZM4STEwl .

-- Kind regards, Michael Fresco

michaelfresco avatar Mar 03 '18 08:03 michaelfresco

I'm trying to get your binary to work on Ubuntu 18.10, and I get ./logiconf-gui: error while loading shared libraries: libicuuc.so.55: cannot open shared object file: No such file or directory

sudo ln -s /usr/lib/x86_64-linux-gnu/libicui18n.so.60 /usr/lib/x86_64-linux-gnu/libicui18n.so.55 does not do the trick either, same error.

Compile instructions for this would be nice, I don't see a Makefile or any chance you have binaries for 18.10?

Strykar avatar Nov 19 '18 11:11 Strykar

@Strykar I know, I compiled that binary using Ubuntu 16.04 and for some reasons (link to older libraries) it doesn't work on newer versions. If you install qt5 you can compile it by yourself (or using qt creator if you prefer):

mkdir Build && cd Build
qmake ..
make

You can also try (if it works) this binary that I just compiled on my current system (ubuntu 18.04) https://github.com/dslul/logiconf/releases/tag/0.1.1 Let me know if it works. Bear in mind that you need to copy 99-hidraw-logitech-g402.rules to /lib/udev/rules.d/99-hidraw-permissions.rules with the following command: sudo cp 99-hidraw-logitech-g402.rules /lib/udev/rules.d/99-hidraw-permissions.rules and the replug the mouse.

dslul avatar Nov 23 '18 13:11 dslul

@dslul Thanks for getting back.

I had to install:

qt5-default + required deps
libqt5qml5
qml-module-qtquick-layouts
qml-module-qtquick-controls2
qml-module-qtquick-controls

This is the error when I try to run from Release:

$ sudo ./logiconf-gui 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
terminate called after throwing an instance of 'HIDPP::Device::NoHIDPPReportException'
  what():  No HID++ report
Aborted

I tried compiling from source, I had to add the qtdeclarative5-dev package, and I get the same error:

$ sudo logiconf-gui/logiconf-gui 
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
terminate called after throwing an instance of 'HIDPP::Device::NoHIDPPReportException'
  what():  No HID++ report
Aborted

$ dmesg|grep mouse
[    1.196260] mousedev: PS/2 mouse device common for all mice
[   28.166862]  autofs4 crypto_simd cryptd glue_helper aes_x86_64 algif_skcipher af_alg uas usb_storage dm_crypt nvidia_drm(POE) nvidia_modeset(POE) hid_generic gpio_ich nvidia(POE) drm_kms_helper psmouse usbhid hid i2c_i801 syscopyarea sysfillrect sysimgblt pata_acpi lpc_ich fb_sys_fops firewire_ohci ahci firewire_core drm r8169 crc_itu_t mii libahci pata_jmicron ipmi_devintf ipmi_msghandler

$ dmesg|grep Logitech
[    2.291655] usb 2-1.6: Manufacturer: Logitech
[    2.293745] input: Logitech Gaming Mouse G402 as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.0/0003:046D:C07E.0003/input/input6
[    2.304612] hid-generic 0003:046D:C07E.0003: input,hidraw1: USB HID v1.11 Mouse [Logitech Gaming Mouse G402] on usb-0000:00:1d.0-1.6/input0
[    2.306162] input: Logitech Gaming Mouse G402 Keyboard as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.1/0003:046D:C07E.0004/input/input10
[    2.428332] input: Logitech Gaming Mouse G402 Consumer Control as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.1/0003:046D:C07E.0004/input/input11
[    2.428688] input: Logitech Gaming Mouse G402 System Control as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6/2-1.6:1.1/0003:046D:C07E.0004/input/input12
[    2.428923] hid-generic 0003:046D:C07E.0004: input,hiddev1,hidraw3: USB HID v1.11 Keyboard [Logitech Gaming Mouse G402] on usb-0000:00:1d.0-1.6/input1

$ sudo lsusb -v (snipped)
Bus 002 Device 004: ID 046d:c07e Logitech, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x046d Logitech, Inc.
  idProduct          0xc07e 
  bcdDevice           90.03
  iManufacturer           1 Logitech
  iProduct                2 Gaming Mouse G402
  iSerial                 3 6D88578A5455
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           59
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          4 U90.03_B0020            
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              300mA
    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      67
         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 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     151
         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     0x0014  1x 20 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)

Searching for that error doesn't bring up much, what am I missing?

Strykar avatar Nov 23 '18 16:11 Strykar

@Strykar it's because you have more than one hid device connected to your system (it's my fault, I should implement a check that finds out automatically the correct hid file descriptor). Currently it's hardcoded to /dev/hidraw1 (https://github.com/dslul/logiconf/blob/master/logiconf-gui/devicecommunicator.cpp#L15). In your case it should be hidraw3, try this binary (compiled with /dev/hidraw3): logiconf-gui.zip

dslul avatar Nov 23 '18 20:11 dslul

@dslul Thanks very much, I made the change, recompiled and it works!

To confirm, Report Rate = Polling Rate? Resolutions = DPI?

Resolutions goes from 0-99, shouldn't it go up to 4000 if it's DPI? What do the Label and Button functions for? How would we map keyboard macros to buttons?

Strykar avatar Nov 23 '18 23:11 Strykar

@Strykar It's not that complete atm. Currently only led settings work. The reason I stopped developing this app is because piper (libratbag) claimed to support all mice, but in reality they refuse to implement device specific features. So I guess this program is not as useless as I thought it was. Are you able to code? I could use some help.

By the way, you are correct, report rate = polling rate, resolutions = dpi settings. If you tried LGS, there are 5 dpi levels that you can set in this mouse. You can also remove/add them (from 1 to 5) and set custom dpi to each. So each label refers to a DPI level (from 1 to 5). The buttons are just for selecting a particular level (I could use a radio list instead of buttons). I don't remember why I put two buttons for each level.

If you look at this https://github.com/dslul/logiconf/blob/master/other/dumps/g402_commands.txt#L62 it's easy to set a dpi level and the report rate. We already know the protocol and the hid commands, it's just a matter of implementing the UI logic and clean things up.

Regarding macros: this is already possible in linux. But it is possible to change button mappings "internally" in the mouse, so this could also be implemented.

dslul avatar Nov 24 '18 09:11 dslul

@Strykar I uploaded a new version, now it automatically recognizes the hid path. The rest is coming soon I hope.

dslul avatar Nov 25 '18 13:11 dslul

@Strykar I uploaded the new version with profile support. I also added a tab for enabling/disabling Fusion Engine for the G402. Please tell me if there is something that's not working as it should.

dslul avatar Nov 29 '18 10:11 dslul

@dslul Looking good! Everything works so far. I do not code, small scripts at most. I am happy to help you test and in any other way I can.

Strykar avatar Nov 29 '18 19:11 Strykar