How to interface with a Ajazz Stream Deck device.
The device uses the HID protocol to communicate with its software.
The number of keys can be determined from the HID device descriptors. There is currently no known provision to determine their layout or size. The buttons on the current version of the device (AKP153) are arranged in a grid and numbered from top right through to bottom left as follows:
-----------------------------
| 0d | 0a | 07 | 04 | 01 | 10 |
|----|----|----|----|----|----|
| 0e | 0b | 08 | 05 | 02 | 11 |
|----|----|----|----|----|----|
| 0f | 0c | 09 | 06 | 03 | 12 |
-----------------------------
Note: 10~12 are icons without buttons.
0x01
every packet size = 512, zero padding up to 512 bytes
PC = PERCENTAGE (0-100)
0x43, 0x52, 0x54, 0x00, 0x00, 0x4c, 0x49, 0x47, 0x00, 0x00, PC
image size : 85x85
SIZE0, SIZE1 : BigEndian 16bit Image Data Size
0x43, 0x52, 0x54, 0x00, 0x00, 0x42, 0x41, 0x54, 0x00, 0x00, SIZE0, SIZE1, TG1, 0x00, 0x00, 0x00,
Jpeg encoded data, Packet Size = 512
ex) 8000 bytes = 512 * 16 packets
data
flush images
0x43, 0x52, 0x54, 0x00, 0x00, 0x53, 0x54, 0x50,
TG0 = 0, TG1 = BUTTON(1-18) : Clear Button
TG0 = 0, TG1 = 0xff : Clear All
TG0 = 0x44, TG1 = 0x43 : Clear and show logo image
0x43, 0x52, 0x54, 0x00, 0x00, 0x43, 0x4c, 0x45, 0x00, 0x00, TG0, TG1, 0x00, 0x00, 0x00, 0x00,
every packet size = 512, zero padding up to 512 bytes
TG1 = BUTTON(1-15)
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, TG1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x41, 0x43, 0x4b, 0x00, 0x00, 0x4f, 0x4b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Reference : https://gist.github.com/cliffrowley/d18a9c4569537b195f2b1eb6c68469e0