Giter Club home page Giter Club logo

Comments (43)

kirainmoe avatar kirainmoe commented on August 28, 2024 1

here: http://www.hasee.com/drivefile/notebook/%E5%90%8C%E6%96%B9/GK5SNxx/GamingCenter_1.2.2.2_HASEE.rar

My laptop is GK5CN6X. You can find other control center of GK5CN5Z/GK5CN6Z models. The official reseller of Tongfang laptops in my country is "Mechrevo", you can download its control center:

https://mega.nz/#!OypVmAKZ!8pafkk3DTjaWZNMq2ufDY69vSr6DZRCJFlm8WEtNRjI (2.0)

https://mega.nz/#!GqgD3CKS!VQEY2x1pkI1JK9pS9_Wj9RPOK6Ycd9p52iKQmhF9asw (1.0)

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024 1

Of course, I added it to readme of that repo.

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

I tried to install the application and got usb.core.NoBackendError: No backend available error. I wonder if this is the trouble you are facing.

I'm willing to help you with it (but I know little about Python and the project :( )

As far as I know, ITE Device can be detected on macOS:

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

The problem is exactly this usb.core.NoBackendError: No backend available

Maybe is a issue with pyusb on OSX, iam on smartphone now but iam search and work on this tomorow

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

Can you install libusb

brew install libusb

And try run It again?

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

OK I will try it later.

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

Seems that the program has found the backend after install the libusb, but it still says usb.core.USBError: [Errno 13] Access denied (insufficient permissions) (with sudo).

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

Seems that the program has found the backend after install the libusb, but it still says usb.core.USBError: [Errno 13] Access denied (insufficient permissions) (with sudo).

Iam stuck on this too, this is a big problem for me, sound like pyusb have old issues in MacOS, i wll need to find other lib to comunicante to USB devices in OSX and rewrite comunication flow

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

sr @kirainmoe , can make some tests? i think i got something:

brew install hidapi
pip install hidapi

curl https://raw.githubusercontent.com/rodgomesc/avell-unofficial-control-center/master/aucc/tests/main.py -o main.py && python main.py 

unfortunately i'm not having much time but this can be a start

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

It shows:

Opening the device
Manufacturer: ITE Tech. Inc.
Product: ITE Device(8291)
Serial No: None

Looks like the program recognized the device successfully.

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

It shows:

Opening the device
Manufacturer: ITE Tech. Inc.
Product: ITE Device(8291)
Serial No: None

Looks like the program recognized the device successfully.

and keyboard dont light up to green?,

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

It just disabled my keyboard light... And I can't light up it using Fn keys.

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

I can't light up it using Fn keys.

what is the default color of your keyboard? On my laptop even with the illumination disabled in the bios, I was able to activate using this algorithm, could make a test enabling again and check if the colors will change to green?

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

I don't understand what is "default color", my setting is mixed color. Tried to run it again but nothing changed. Boot into Windows and reboot to macOS and run again, still not working.

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

I don't understand what is "default color", my setting is mixed color. Tried to run it again but nothing changed. Boot into Windows and reboot to macOS and run again, still not working.

"default color" i mean, when you boot in hackintosh, if keyboard lights are enabled in bios, what color show up in key caps

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

When I press the Power button, the color is blue. After a while it will change to the color scheme that I set.

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

After a while it will change to the color scheme that my set.

and what is that?

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

sr @kirainmoe , can make some tests? i think i got something:

brew install hidapi
pip install hidapi

curl https://raw.githubusercontent.com/rodgomesc/avell-unofficial-control-center/master/aucc/tests/main.py -o main.py && python main.py 

unfortunately i'm not having much time but this can be a start

very strange it didn't work since you have the same ite 8291 chip

https://dl3.pushbulletusercontent.com/0n8GrUk2lgT8vAV9Lyzav3WIogvNr6nu/IMG_20190807_014206.jpg

https://dl3.pushbulletusercontent.com/F1yqXWlW9BTLmmcEOeYc6oeBditm39w6/IMG_20190807_014542.jpg

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

I'm uploading a video to show you the phenomenon.

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

I'm uploading a video to show you the phenomenon.

hahahaha ok, crazy

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

https://send.firefox.com/download/1487f4b7cd684cc3/#T2GcUPFtAn-omI8JXUbpsQ

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

save this in the same folder of main.py and run sh test.sh

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

Running 20 times of main.py still has no change..

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

it may not make sense to send the same code 20 times, but the official software does the same thing

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

can you send download link of your windows software to control rgb keyboard?

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

Before Proceed

i make some fixes, try run this:

https://raw.githubusercontent.com/rodgomesc/avell-unofficial-control-center/hackintosh_support/aucc/tests/main.py

if not work;

ok, i thing we can we can make this working for your mac, your ite 8281 are in revision 0.02 and mine it's in 0.03,

if you are sure this software works on your laptop, then with a little reverse engineering we can make my project work on your hackintosh perfectly, but it will take some of your time, I can guide you through the reverse engineering process, so After capturing a few bytes you will be able to change the keyboard colors to whatever you like in windows, such as red, blue, teal, pink, yellow, orange and others.

if you agree
1 - make sure your windows have this version:

https://mega.nz/#!GqgD3CKS!VQEY2x1pkI1JK9pS9_Wj9RPOK6Ycd9p52iKQmhF9asw

2 - install this version of usb analyzer https://usb-monitor.br.uptodown.com/windows/download/46949 (last version some bugs and can't intercept ITE bytes)

3 - what is your GMT? (let's choose a time that is better for both of us)

4 - join in this chat:

https://gitter.im/Unofficial-CC/Lobby

5 - if you pass teamviewer access in windows it may be faster, other wise the process just will only be a little slower

6 - this is going to be really cool because we will start support from people using ite 8291 revision 0.02 on linux and hackintosh on this wonderful notebook

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

Tried to run the latest script, though the color doesn't change, but the script now isn't disabling my keyboard light. In other word, it has no effect now.

I will go to Windows and install that. I'm in GMT +8.


I was unable to open the download link of USB Analyzer (my network seems to be fine). Can you help me to download it and upload it to send.firefox.com , or give me another download link? I can find little about USBMonitor in Google.

I downloaded free-usb-analyzer for alternative. Is it OK?

from tongfang-macos.

shengt25 avatar shengt25 commented on August 28, 2024

On my computer the test.py successfully changed the backlit color(to red and green).
But the main.py doesn’t work. There's an error saying can’t find the module aucc. Sorry I’m not familiar with python wish there is something I can help.

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

On my computer the test.py successfully changed the backlit color(to red and green).
Though the main.py doesn’t work. It always tells my can’t find the module aucc. Sorry I’m not familiar with python.

What's the model of your laptop?

from tongfang-macos.

shengt25 avatar shengt25 commented on August 28, 2024

On my computer the test.py successfully changed the backlit color(to red and green).
Though the main.py doesn’t work. It always tells my can’t find the module aucc. Sorry I’m not familiar with python.

What's the model of your laptop?

MECHREVO X8TI Plus. And my ITE Device is revision 0.03.

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

On my computer the test.py successfully changed the backlit color(to red and green).
Though the main.py doesn’t work. It always tells my can’t find the module aucc. Sorry I’m not familiar with python.

What's the model of your laptop?

MECHREVO X8TI Plus. And my ITE Device is revision 0.03.

So this indicates the problem is the ITE revision.

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

The following is the Packet View captured by the software when I changed the color to "MonoColor" in Blue:

000000: PnP Event: Device Connected (UP), 09.08.2019 17:51:30.166 (1. Device: USB Composite Device)
The USB device has just been connected to the system.
000001: Class-Specific Request (DOWN), 09.08.2019 17:51:34.321 +4.154 (1. Device: USB Composite Device)
Destination: Interface, Index 1
Reserved Bits: 34
Request: 0x9
Value: 0x300
Send 0x8 bytes to the device

 14 00 09 00 B4 FF 00 00                           ....?...
000002: Control Transfer (UP), 09.08.2019 17:51:34.322 +0.001. (1. Device: USB Composite Device) Status: 0x00000000
Pipe Handle: Control Pipe
 14 00 09 00 B4 FF 00 00                           ....?...
Setup Packet
 21 09 00 03 01 00 08 00                           !.......
Recipient: Interface
Request Type: Class
Direction: Host->Device
Request: 0x9 (Unknown)
Value: 0x300
Index: 0x1
Length: 0x8
000003: Class-Specific Request (DOWN), 09.08.2019 17:51:34.324 +0.001 (1. Device: USB Composite Device)
Destination: Interface, Index 1
Reserved Bits: 34
Request: 0x9
Value: 0x300
Send 0x8 bytes to the device

 14 00 0A 00 B4 FF 00 00                           ....?...

000004: Control Transfer (UP), 09.08.2019 17:51:34.324 +0.0. (1. Device: USB Composite Device) Status: 0x00000000
Pipe Handle: Control Pipe
 14 00 0A 00 B4 FF 00 00                           ....?...
Setup Packet
 21 09 00 03 01 00 08 00                           !.......
Recipient: Interface
Request Type: Class
Direction: Host->Device
Request: 0x9 (Unknown)
Value: 0x300
Index: 0x1
Length: 0x8
Destination: Interface, Index 1
Reserved Bits: 34
Request: 0x9
Value: 0x300
Send 0x8 bytes to the device

 14 00 0B 00 B4 FF 00 00                           ....?...
000006: Control Transfer (UP), 09.08.2019 17:51:34.325 +0.0. (1. Device: USB Composite Device) Status: 0x00000000
Pipe Handle: Control Pipe
 14 00 0B 00 B4 FF 00 00                           ....?...
Setup Packet
 21 09 00 03 01 00 08 00                           !.......
Recipient: Interface
Request Type: Class
Direction: Host->Device
Request: 0x9 (Unknown)
Value: 0x300
Index: 0x1
Length: 0x8
000007: Class-Specific Request (DOWN), 09.08.2019 17:51:34.327 +0.001 (1. Device: USB Composite Device)
Destination: Interface, Index 1
Reserved Bits: 34
Request: 0x9
Value: 0x300
Send 0x8 bytes to the device

 14 00 0C 00 B4 FF 00 00                           ....?...
000008: Control Transfer (UP), 09.08.2019 17:51:34.327 +0.0. (1. Device: USB Composite Device) Status: 0x00000000
Pipe Handle: Control Pipe
 14 00 0C 00 B4 FF 00 00                           ....?...
Setup Packet
 21 09 00 03 01 00 08 00                           !.......
Recipient: Interface
Request Type: Class
Direction: Host->Device
Request: 0x9 (Unknown)
Value: 0x300
Index: 0x1
Length: 0x8
000009: Class-Specific Request (DOWN), 09.08.2019 17:51:34.342 +0.014 (1. Device: USB Composite Device)
Destination: Interface, Index 1
Reserved Bits: 34
Request: 0x9
Value: 0x300
Send 0x8 bytes to the device

 14 00 01 00 B4 FF 00 00                           ....?...
000010: Control Transfer (UP), 09.08.2019 17:51:34.342 +0.0. (1. Device: USB Composite Device) Status: 0x00000000
Pipe Handle: Control Pipe
 14 00 01 00 B4 FF 00 00                           ....?...
Setup Packet
 21 09 00 03 01 00 08 00                           !.......
Recipient: Interface
Request Type: Class
Direction: Host->Device
Request: 0x9 (Unknown)
Value: 0x300
Index: 0x1
Length: 0x8
000011: Class-Specific Request (DOWN), 09.08.2019 17:51:34.347 +0.004 (1. Device: USB Composite Device)
Destination: Interface, Index 1
Reserved Bits: 34
Request: 0x9
Value: 0x300
Send 0x8 bytes to the device

 14 00 02 00 B4 FF 00 00                           ....?...
000012: Control Transfer (UP), 09.08.2019 17:51:34.347 +0.0. (1. Device: USB Composite Device) Status: 0x00000000
Pipe Handle: Control Pipe
 14 00 02 00 B4 FF 00 00                           ....?...
Setup Packet
 21 09 00 03 01 00 08 00                           !.......
Recipient: Interface
Request Type: Class
Direction: Host->Device
Request: 0x9 (Unknown)
Value: 0x300
Index: 0x1
Length: 0x8
000013: Class-Specific Request (DOWN), 09.08.2019 17:51:34.350 +0.003 (1. Device: USB Composite Device)
Destination: Interface, Index 1
Reserved Bits: 34
Request: 0x9
Value: 0x300
Send 0x8 bytes to the device

 14 00 03 00 B4 FF 00 00                           ....?...
000014: Control Transfer (UP), 09.08.2019 17:51:34.350 +0.0. (1. Device: USB Composite Device) Status: 0x00000000
Pipe Handle: Control Pipe
 14 00 03 00 B4 FF 00 00                           ....?...
Setup Packet
 21 09 00 03 01 00 08 00                           !.......
Recipient: Interface
Request Type: Class
Direction: Host->Device
Request: 0x9 (Unknown)
Value: 0x300
Index: 0x1
Length: 0x8
000015: Class-Specific Request (DOWN), 09.08.2019 17:51:34.355 +0.004 (1. Device: USB Composite Device)
Destination: Interface, Index 1
Reserved Bits: 34
Request: 0x9
Value: 0x300
Send 0x8 bytes to the device

 14 00 04 00 B4 FF 00 00                           ....?...
000016: Control Transfer (UP), 09.08.2019 17:51:34.355 +0.0. (1. Device: USB Composite Device) Status: 0x00000000
Pipe Handle: Control Pipe
 14 00 04 00 B4 FF 00 00                           ....?...
Setup Packet
 21 09 00 03 01 00 08 00                           !.......
Recipient: Interface
Request Type: Class
Direction: Host->Device
Request: 0x9 (Unknown)
Value: 0x300
Index: 0x1
Length: 0x8
000017: Class-Specific Request (DOWN), 09.08.2019 17:51:34.359 +0.003 (1. Device: USB Composite Device)
Destination: Interface, Index 1
Reserved Bits: 34
Request: 0x9
Value: 0x300
Send 0x8 bytes to the device

 08 02 01 05 24 08 00 01                           ....$...

000018: Control Transfer (UP), 09.08.2019 17:51:34.359 +0.0. (1. Device: USB Composite Device) Status: 0x00000000
Pipe Handle: Control Pipe
 08 02 01 05 24 08 00 01                           ....$...
Setup Packet
 21 09 00 03 01 00 08 00                           !.......
Recipient: Interface
Request Type: Class
Direction: Host->Device
Request: 0x9 (Unknown)
Value: 0x300
Index: 0x1
Length: 0x8

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

Do you need any other information? The USB Analyzer has a tried time limit and it's going to expire.

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

So I managed to figure out how it works on revision 0.02. The following is the rule of 0.02:

First, I don't know how to name these packet correctly, and I will use "data packet" and "ending packet" to distinguish them. When setting a color, program will send 4 (or more but not more than 8) data packets to ITE device to state the color, and ending with 1 ending packet to state brightness, speed, direction, mode and so on.

I don't know if the rule is general on every device and laptops from different resellers. But as for my laptop:

Data packet is like this: 14 00 01 FF 00 FF 00 00, the first 2 bits are certain (14 00), and the third bit is the area of keyboard that you are going to set (my keyboard has 4 discrete areas, so it often ranges from 01 ~ 04, however it sometimes may ranges from 01~08 and 09~0C with unknown reason). Then the 4th~6th bits are hex of RGB color, then 7~8th bits are certain to be 00 00.

Ending packet also has 8 bits, like this: 08 02 01 05 24 08 00 01, the first 2 bits are certain. The 3rd bit represents the light mode (mono color is 01, breathing is 02, wave is 03, rainbow is 05, flash is 12, mix is 13). The 4th bit is the speed (has 5 values of 0A, 07, 05, 03, 01 from slow to fast), and the 5th bit is the brightness (has 5 values of 00, 08, 16, 24, 32 from dark to bright). The 7th bit represents the direction, only using wave or flash it will be (01 l->r, 02 r->l; flash has 03 sync), in other mode it will be 00. The last bit decide whether you will save your change (00 for no, 01 for yes). Especially, if you want to disable the light, you can just send 08 01 00 00 00 00 00 00. For example, 08 02 03 05 24 08 01 01 will set the keyboard to wave mode, direction left to right, brightness 4/5, speed 3/5 and save change.

And as for breathing, wave, flash and mix mode, the program will send 7 packets before sending ending packet:

14 00 01 FF 00 00 00 00
14 00 02 FF 5A 00 00 00
14 00 03 FF B4 00 00 00
14 00 04 00 B4 00 00 00
14 00 05 00 00 FF 00 00
14 00 06 00 B4 FF 00 00
14 00 07 FF 00 FF 00 00
08 02 02 05 24 08 00 01  <---ending packet

I don't know what's the function of these 7 packets, but the program in Windows sent them.

There is some examples, I think you will easily understand it:

Set light to mono color blue(00b4ff).

14 00 01 00 b4 ff 00 00
14 00 02 00 b4 ff 00 00
14 00 03 00 b4 ff 00 00
14 00 04 00 b4 ff 00 00
08 02 01 05 24 08 00 01

Set light to rainbow:

14 00 01 ff 00 00 00 00
14 00 02 00 b4 00 00 00
14 00 03 00 00 ff 00 00
14 00 04 ff 00 ff 00 00
08 02 05 05 24 08 00 01

Set light to mix, with full brightness and 2/5 speed:

14 00 01 FF 00 00 00 00
14 00 02 FF 5A 00 00 00
14 00 03 FF B4 00 00 00
14 00 04 00 B4 00 00 00
14 00 05 00 00 FF 00 00
14 00 06 00 B4 FF 00 00
14 00 07 FF 00 FF 00 00
08 02 13 03 32 08 00 01

That's all. And I think that you already find the solution to the original problem of this issue. Sorry for my poor English, if you have any other problem, just tell me.

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

whanks for reply i will analyze this

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

I just found that the problem is not just the revision of the chip, the library I use to communicate, is acting unexpectedly, the same code that works in windows and linux, when I run on mac it spends a few bytes more than I still can't figure out where they're coming from

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

I modified your test.py and it works, so there may be no problem to me. btw I use hid.send_feature_report() to do everything instead of hid.write(), I don't know if this affects.

I'm now using Node.js with node-hid library, it seems to work normally and it needs no extra library like hidapi. If python has the similar library?

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

I modified your test.py and it works, so there may be no problem of me. btw I use hid.send_feature_report() to do everything instead of hid.write(), I don't know if this affects.

I'm now using Node.js with node-hid library, it seems to work normally and it needs no extra library like hidapi. If python has the similar library?

I already migrated from pyusb to hidapi because of compatibility issues, i think hidapi and node hid use same interface in backend

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

Yes I know it, you send me a test script of hidapi, and I modified it to 0.02 rule it works.

node-hid's documentation says that it uses hidraw by default, libusb is alternative.

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

so, thanks for all feedbacks, i will implement this when i have more time

from tongfang-macos.

kirainmoe avatar kirainmoe commented on August 28, 2024

You are welcome. XD

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

@kirainmoe if you can add my project link to people looking for support for ite 8291 revision 3 in readme of project starbeat, thanks, i will do the same here

from tongfang-macos.

rodgomesc avatar rodgomesc commented on August 28, 2024

Thanks,

from tongfang-macos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.