14 Dec 2022
Still, getting the think to run was a bit of a challenge on Ubuntu 22.04... First, it show up as a Bluetooth device:
$ hcitool scan Scanning ... 11:75:58:xx:xx:xx PixooThen, one can check if RFCOMM is available using
$ sdptool browse 11:75:58:xx:xx:xx Browsing 11:75:58:xx:xx:xx ... Service Name: Serial Port 1 Service RecHandle: 0x10004 Service Class ID List: "Serial Port" (0x1101) Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 1Note the channel number (1), older Divoom devices use (4) here.
Next, there's an issue with Ubuntu's python3-pybluez package (0.23-4build1) in 22.04/jammy:
self.sock.send(bytes(package)) File "It's an issue with Python 3.10 and apparently a special flag macro must be #defined when compiling the library. Luckily, this can be easily fixed by installing the python3-pybluez 0.23-5 package from 22.10/kinetic.
", line 3, in send SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats