AstroSnail / apexctl

(Apache-2.0) Control SteelSeries Apex keyboards on GNU/Linux!
Apache License 2.0
28 stars 3 forks source link

Trying to help for apexM800 support #3

Open Mocktezuma opened 4 years ago

Mocktezuma commented 4 years ago

Hello, i have an apexM800 and im interested into helpig you to make it work on this keyboard

AstroSnail commented 4 years ago

Hi, awesome, it would be great to have you on board.
Looking at information about the M800 online, it seems each of the keys are individually customizable. If we manage to get this working, this might give us some insight into the Apex Pro as well. (#1)

To start off, when you run lsusb, what ID do you get next to Steelseries? (should start with 1038:)

Mocktezuma commented 4 years ago

hey yo here is the output Bus 001 Device 006: ID 1038:1600 SteelSeries ApS

AstroSnail commented 4 years ago

Excellent, I've created a branch named test-m800. If you go build that, apexctl should now be able to recognize your M800.

Can you tell me which commands work?
If you have the time and patience, can you run fuzz.sh for a bit to see if you can find anything interesting?

Mocktezuma commented 4 years ago

ok i did what you asked and ran the script fuzz.sh and kept pressing enter, nothing happened for a while and then I think i saw some keys flashing quickly. what to you meant by "reducing the command to its smallest while still doing something interesting" ?

Mocktezuma commented 4 years ago

in fact when i keep pressing enter i can see some keys blinking very sharply

AstroSnail commented 4 years ago

In short, I meant taking the command that was echoed when the blinking started, then removing numbers from the end of the command and messing with some numbers in the middle until you have something simpler to understand.

For example, you find that sudo ./apexctl probe 05 04 03 02 01 ... does something.
You try changing the 04 to 05 and you see something else.
You reset the keyboard (see below).
You remove most of the numbers at the end, try sudo ./apexctl probe 05 04 and nothing happens, then you add a 03 and it works again.
(In my case, this sets the brightness of the west zone to 3/8)

If you find a command that does something but have a hard time understanding it, you can give fuzz.sh an argument, which it will use as the first byte and then fuzz the rest of the data.
For example, ./fuzz.sh 05 makes the script try everything starting with 05, such as sudo ./apexctl probe 05 b9 42 16 60 ...

It's a bit dumb but I can't think of any good way to find out how to work with the keyboard.

On resetting the keyboard, it would be great if you could find out if (a) the reboot command works, and (b) the keyboard keeps its settings after rebooting.
If the settings are lost on reboot, you can use that to reset the keyboard settings, and possibly to recover from a bad command that messes up your keyboard. If the reboot command doesn't work, you can instead try simply unplugging and replugging the keyboard.

Mocktezuma commented 4 years ago

Ok I will try to fuzz again, i will give you a feedback if i get anyhting, the reboot command doesnt seem to do anything though. should the led lights turn on and off on reboot ?

AstroSnail commented 4 years ago

The led lights should turn off and then back on when you reboot, and the keyboard should be unresponsive while it's doing that, as if you've unplugged the keyboard.
In general it should do nothing except lose the settings you set while it was on.

That's how it works on my old Apex, at least.