interface number wrong
I ran these apt-get commands and then make and everything worked except for the interface number, which defaults to 1 but had to be 0 on my system and which resulted in the fact that the kernel driver could not be detached.
sudo apt-get install build-essential pkg-config linux-headers-amd64 libusb-1.0-0-dev
Originally posted by @silkentrance in https://github.com/krayon/ratslap/issues/10#issuecomment-640623192
@silkentrance Are you saying that the interface number in the source code needed to be 0?
Are you talking about here:
https://github.com/krayon/ratslap/blob/da173986e9818a49f5cab5b6848de9a73fd43761/main.c#L1341-L1342
@krayon Yes, after having changed that to 0 it worked. Debian/Buster.
Hello, I have more details about this issue and another one:
Compiling with Value 1 is the only way to detach the G300s Keyboard. Compiling with Value 0 is the only way to program and read profiles.
Here is a resume...
-
Compile RATSLAP with USB_INTERFACE_INDEX set to 1
-
Execute these two commands in the Terminal with that version...
sudo ./ratslap -s F3 sudo ./ratslap -p F3
These two commands and respective order is the ONLY way to detach the Keyboard. 1st Command executes successfully , 2nd fails BUT i have to issue it or Keyboard doesn't detach...you can use F4 or F5 to achieve same results.
-
Compile other version of RATSLAP with USB_INTERFACE_INDEX set to 0.
-
Execute any further commands that you need to read or program the G300s with this other version.
After all modifications are done to your profiles, reboot PC OR disconnect and reconnect G300s after some seconds. ALL Button assignments, etc. will be FULLY working, ANY further modifications, need execution again of the two RATSLAP versions with above commends to correctly initiate the Programming/Reading Mode of the G300s. .
Linux Distro : SLACKWARE-CURRENT 64bit
So, I guess a solution is that program would be modified somehow to automatically, no matter the command we want to execute, the program silently (sending result to /dev/null) will internally issue by itself sudo ./ratslap -s
A crude solution, i know...but it would work flawlessly and meanwhile you could find a better solution :D
PS: Dunno what happened but i made fresh compilations of RATSLAP with values 1 and 0 and now all works well with version with Value at 1 and G300s "Keyboard" is not even (need to be) disabled at any moment, go figure.
Another thing is that the issue continued to happen with 0.4.1 Binary distributed from you.