GithubHelp home page GithubHelp logo

jigoku / ayatool Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 1.0 37 KB

Linux userspace tools for BlackWeb AYA (LED Mouse)

License: GNU General Public License v3.0

Python 99.77% Shell 0.23%
aya blackweb driver led linux mouse tool

ayatool's Introduction

Hi there πŸ‘‹

  • πŸ”­ I’m currently working on some Red Eclipse 2 maps, and some half-assed LUA/Love2D games
  • πŸ—ΊοΈ Highly interested in original game engine design and interactive level editor / map editors

ayatool's People

Contributors

jigoku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ayatool's Issues

LED mode sometimes doesn't change (or will turn off)

The mouse flashes when storing the color via;

change_color()
change_mode(1)
store_settings()

but will occasionally turn the LED off after storing the newly set color.

Most of the time the mouse sets and stores the color fine, but other times it results in the mouse flashing the newly set color, and then results in the mouse turning the LED off.

Investigate this;

As of the moment, the only way i can get the LED light to turn back on, is to boot up a virtual machine and set the color via the windows software or using the factory_reset() command.

Properly implement profile switching

At the moment, switching profiles, only lets you save to selected profile slot.
But you cannot obtain previously set profile settings when switching.

What should be able to happen;

  • Mouse is set to Profile 1.
  • User changes Profile to slot 2
  • Settings for Profile are retrieved and set in the GUI
  • Click Apply
  • Previous settings for Profile 2 are now active.

Add support for LED breathe speed

This feature doesn't exist in the Windows driver tool software, and stumbled upon this setting by chance.
Add a slider (find min/max values) and allow this to be customized.

Documentation: BlackWeb AYA USB Protocol

BlackWeb AYA mouse USB protocol

Bytes indicated by an (*) are relevant to setting the active
profile (01-05). Bytes marked by a (^^) are configurable options.

The mouse features two input devices, one which is a generic HID
device, being the standard mouse input, and the other features a
keyboard interface which is used to change the settings of the hardware.

VENDOR ID
0x3938
PRODUCT ID
0x1101

Interface 0

This is the HID device (mouse input, clicks, movement)

Interface 1

This is a keyboard interface. Commonly used to set data on USB devices.
This interface controls everything we want to configure below.

USB WRITE

0x21     = bmRequestType
0x09     = bRequest
0x0307   = wValue 
0x0001   = wIndex

USB READ

0xa1     = bmRequestType
0x1      = bRequest 
0x0307   = wValue
0x0001   = wIndex

SET PROFILE

07 03 00 00 00 00 00 00
      ^^
	00 = factory reset
	01 = profile 1
	02 = profile 2
	03 = profile 3
	04 = profile 4
	05 = profile 5   

GET PROFILE

07 83 00 00 00 00 00 00

SET PERSISTENT SETTING CHANGES

07 44 01 00 00 00 00 00
       *

SET LED COLOR (to RR GG BB)

07 0a 01 00 00 00 00 00
       *    ^^ ^^ ^^
	    RR GG BB

GET LED COLOR

07 8a 01 00 00 00 00 00
       * 

SET LED MODE

07 0b 01 00 08 00 00 00
       *    ^^ ^^

        The first byte is the breathe speed [0x00-0xFF]
        (unconfigurable with driver software on windows!)

        The second byte is either:
	ff = breathe cycle
	00 =  breath single color
        (any other value turns off the breathe effect)

GET LED MODE

07 8c 01 00 00 00 00 00
       *    ^^ ^^

LED OFF

07 0c 01 00 00 00 00 00
       * 

SET MOUSE POLLING

07 01 00 00 00 00 00 00
    * ^^
	00 = 125hz
	01 = 250hz
	02 = 500hz
	03 = 1000hz

GET MOUSE POLLING

07 81 01 00 00 00 00 00
      *

SMART KEY (not relevant to a profile)

07 19 01 00 00 00 00 00
      ^^
	01 = 20ms
	02 = 40ms
	03 = 60ms
	04 = 80ms
	05 = 100ms
	06 = 120ms
	07 = 140ms
	08 = 160ms
	09 = 180ms
	0a = 200ms
	0b = 220ms
	0c = 240ms

GET SMARTKEY

! TODO !

UNKNOWN

07 09 01 00 00 00 00 00
       *

FACTORY RESET

07 03 00 00 00 00 00 00

Error when starting AYA

$ ./ayatool_qt.py Traceback (most recent call last): File "./ayatool_qt.py", line 183, in <module> main() File "./ayatool_qt.py", line 177, in main form = AyaTool() File "./ayatool_qt.py", line 57, in __init__ blackweb_aya.open_usb() File "/home/nils/Downloads/ayatool-master/blackweb_aya.py", line 37, in open_usb raise ValueError("Device is not connected") ValueError: Device is not connected

any idea how to solve it?

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.