Hi, First of all thank you for a very useful library.
I have cloned version 0.5.1 from the github repository and have without any problems been using it with a Stream Deck Original on a Raspberry PI CM3+ module. The baseboard for the CM3+ is my own design. (USB 2.0)
I have now bought a Stream Deck XL and it is not working correctly. I have tested this on the CM3+ (USB2.0 Capable of delivering 1 ampere to the USB port), a Raspberry Pi 4 (USB3.0) and Ubuntu in VMware Fusion and the result is the same.
When I connect the Stream Deck XL I can control the backlight and read key states but calling update_key_image(deck, key, False)
in example_basic.py
causes a delay for about 3 seconds and the key stays black before trying to update the the next key.
Investigating a little further it looks like def set_key_image(self, key, image):
in StreamDeckXL.py
calls self.device.write(payload)
three times to transmit all data and the function def write(self, payload):
in HIDAPI.py
returns -1 and not the transferred byte count.
When Disconnecting the XL and reconnecting the Stream Deck Original to the Raspberry Pi 4, example_basic.py
works as expected.
The Raspberry Pi 4 is running a fresh install of 2019-09-26-raspbian-buster.
Below are the version information of the system.
Any help is greatly appreciated.
Versions:
Raspbian: 2019-09-26-raspbian-buster
Python: 3.7.3
Pillow: 5.4.1
HIDAPI: 0.7.99.post21
StreamDeck Library: 0.5.1
"example_deckinfo.py" returns the following information for the XL and the Original.
Deck 0 - Stream Deck XL.
- ID: b'0001:0009:00'
- Serial: 'CL30I1A03593'
- Firmware Version: '1.00.006'
- Key Count: 32 (4x8 grid)
- Key Images: 96x96 pixels, JPEG format, rotated 0 degrees, mirrored horizontally/vertically
Deck 0 - Stream Deck (Original).
- ID: b'0001:000a:00'
- Serial: 'AL25I1C0682'
- Firmware Version: '1.0.170133'
- Key Count: 15 (3x5 grid)
- Key Images: 72x72 pixels, BMP format, rotated 0 degrees, mirrored horizontally/vertically
LSUSB on the Raspberry Pi 4 returns:
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 011: ID 0fd9:006c Elgato Systems GmbH
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
lsusb -v -s 1:12
Bus 001 Device 012: ID 0fd9:006c Elgato Systems GmbH
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0fd9 Elgato Systems GmbH
idProduct 0x006c
bcdDevice 2.00
iManufacturer 1 Elgato
iProduct 2 Stream Deck XL
iSerial 3 CL30I1A03593
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0029
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 177
Report Descriptor: (length is 177)
Item(Global): Usage Page, data= [ 0x0c ] 12
Consumer
Item(Local ): Usage, data= [ 0x01 ] 1
Consumer Control
Item(Main ): Collection, data= [ 0x01 ] 1
Application
Item(Local ): Usage, data= [ 0x00 0xff ] 65280
(null)
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0xff 0x03 ] 1023
Item(Global): Report ID, data= [ 0x02 ] 2
Item(Main ): Output, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Local ): Usage, data= [ 0x00 0xff ] 65280
(null)
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0xff 0x01 ] 511
Item(Global): Report ID, data= [ 0x01 ] 1
Item(Main ): Input, data= [ 0x02 ] 2
Data Variable Absolute No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Local ): Usage, data= [ 0x00 0xff ] 65280
(null)
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x1f 0x00 ] 31
Item(Global): Report ID, data= [ 0x03 ] 3
Item(Main ): Feature, data= [ 0x04 ] 4
Data Array Relative No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Local ): Usage, data= [ 0x00 0xff ] 65280
(null)
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x1f 0x00 ] 31
Item(Global): Report ID, data= [ 0x07 ] 7
Item(Main ): Feature, data= [ 0x04 ] 4
Data Array Relative No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Local ): Usage, data= [ 0x00 0xff ] 65280
(null)
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x1f 0x00 ] 31
Item(Global): Report ID, data= [ 0x05 ] 5
Item(Main ): Feature, data= [ 0x04 ] 4
Data Array Relative No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Local ): Usage, data= [ 0x00 0xff ] 65280
(null)
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x1f 0x00 ] 31
Item(Global): Report ID, data= [ 0x04 ] 4
Item(Main ): Feature, data= [ 0x04 ] 4
Data Array Relative No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Local ): Usage, data= [ 0x00 0xff ] 65280
(null)
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x1f 0x00 ] 31
Item(Global): Report ID, data= [ 0x06 ] 6
Item(Main ): Feature, data= [ 0x04 ] 4
Data Array Relative No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Local ): Usage, data= [ 0x00 0xff ] 65280
(null)
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x1f 0x00 ] 31
Item(Global): Report ID, data= [ 0x08 ] 8
Item(Main ): Feature, data= [ 0x04 ] 4
Data Array Relative No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Local ): Usage, data= [ 0x00 0xff ] 65280
(null)
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x1f 0x00 ] 31
Item(Global): Report ID, data= [ 0x09 ] 9
Item(Main ): Feature, data= [ 0x04 ] 4
Data Array Relative No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Local ): Usage, data= [ 0x00 0xff ] 65280
(null)
Item(Global): Logical Minimum, data= [ 0x00 ] 0
Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
Item(Global): Report Size, data= [ 0x08 ] 8
Item(Global): Report Count, data= [ 0x1f 0x00 ] 31
Item(Global): Report ID, data= [ 0x0a ] 10
Item(Main ): Feature, data= [ 0x04 ] 4
Data Array Relative No_Wrap Linear
Preferred_State No_Null_Position Non_Volatile Bitfield
Item(Main ): End Collection, data=none
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0000
(Bus Powered)