pmeerw's blog

14 Dec 2022

Wed, 14 Dec 2022

Fun with a pixel art frame

Got a 16x16 Divoom Pixoo pixel art frame, a Bluetooth connected device with a small battery in a nice case. It can blink pixels. There's an app and Github repo with Python code.

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	Pixoo
Then, one can check if RFCOMM is available using sdptool:
$ 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: 1
Note 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:

  File "", line 3, in send
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
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.

posted at: 13:11 | path: /fun | permanent link

Made with PyBlosxom