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

[WIP] add support to read buf from driver #13

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

RuiGuilherme
Copy link

I "tried" to make a solution, but i'm not C-dev and much less in the low level part...

CHARACTER_DEVICE = "/dev/acer-gkbbl-0"

with open(CHARACTER_DEVICE, 'rb') as cd:
    print(list(cd.read()))

I believe there is a WMID method to get the device settings.

@JafarAkhondali
Copy link
Owner

Hi, thanks for contribution
the method id is:
#define ACER_WMID_GET_GAMINGKBBL_METHODID 21

Here is the decompiled info about get and set method for it:


1898   │ #define SetGamingKBBacklight     20
1899   │ typedef struct _SetGamingKBBacklight_IN
1900   │ {
1901   │     // 
1902   │     UCHAR gmInput[16];
1903   │     #define SetGamingKBBacklight_IN_gmInput_SIZE sizeof(UCHAR[16])
1904   │     #define SetGamingKBBacklight_IN_gmInput_ID 1
1905   │ 
1906   │ } SetGamingKBBacklight_IN, *PSetGamingKBBacklight_IN;
1907   │ 
1908   │ #define SetGamingKBBacklight_IN_SIZE (FIELD_OFFSET(SetGamingKBBacklight_IN, gmInput) + SetGamingKBBacklight_IN_gmInput_SIZE)
1909   │ 
1910   │ typedef struct _SetGamingKBBacklight_OUT
1911   │ {
1912   │     // 
1913   │     ULONG gmOutput;
1914   │     #define SetGamingKBBacklight_OUT_gmOutput_SIZE sizeof(ULONG)
1915   │     #define SetGamingKBBacklight_OUT_gmOutput_ID 2
1916   │ 
1917   │ } SetGamingKBBacklight_OUT, *PSetGamingKBBacklight_OUT;
1918   │ 
1919   │ #define SetGamingKBBacklight_OUT_SIZE (FIELD_OFFSET(SetGamingKBBacklight_OUT, gmOutput) + SetGamingKBBacklight_OUT_gmOutput_SIZE)
1920   │ 
1921   │ #define GetGamingKBBacklight     21
1922   │ typedef struct _GetGamingKBBacklight_OUT
1923   │ {
1924   │     // 
1925   │     UCHAR gmReturn;
1926   │     #define GetGamingKBBacklight_OUT_gmReturn_SIZE sizeof(UCHAR)
1927   │     #define GetGamingKBBacklight_OUT_gmReturn_ID 1
1928   │ 
1929   │     // 
1930   │     UCHAR gmOutput[15];
1931   │     #define GetGamingKBBacklight_OUT_gmOutput_SIZE sizeof(UCHAR[15])
1932   │     #define GetGamingKBBacklight_OUT_gmOutput_ID 2
1933   │ 
1934   │ } GetGamingKBBacklight_OUT, *PGetGamingKBBacklight_OUT;
1935   │ 
1936   │ #define GetGamingKBBacklight_OUT_SIZE (FIELD_OFFSET(GetGamingKBBacklight_OUT, gmOutput) + GetGamingKBBacklight_OUT_gmOutput_SIZE)
1937   │ 

Is this what you need?

@RuiGuilherme
Copy link
Author

I tried but I could not get the expected state.

image

@JafarAkhondali
Copy link
Owner

I suggest to try checking function input and output in Windows first. Also de-compiling PredatorSense using Dotpeek may help.
WMI Explorer and powershell may come handy for checking it

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

Successfully merging this pull request may close these issues.

2 participants