Technically it should be loads faster than 5FPS on my PC! On my pi I can easily get a smooth 50 FPS. I think it’s down to the software driver. I think the hardware is fine. On the adafruit marketing bumf for the mcp2221 it says “wouldn’t it be cool to drive a tiny OLED display” but I haven’t found anyone who’s done it!
I have a couple of 7 inch HDMI displays but it’s overkill. Most uses cases call for a small cheap screen, that’s why mpd_oled is so popular
Interesting! He said that only 32 byte packets can be sent and they have a 2ms delay. So for a screen 128x64 screen, that’s 1024 bytes of data in 32 bytes, 32 packets to send, with waits of 2ms delay = 64 ms delay 1000ms/64 = 15.6 FPS. Still nowhere near as fast as my Pi Zero 2.
I was then able to build and install the module, and load it with insmod. If the module works out with your adapter I am tempted to get one too (9.99 euros on amazon,es!)
I was able to build the driver, but I needed to install the kernel headers for V5.10.139.I haven’t changed any of the coding. wget https://github.com/volumio/x86-kernel-headers/blob/master/linux-headers-5.10.139-volumio_5.10.139-volumio-1_amd64.deb
volumio@volumio-x86-s2:~/i2c-ch341-usb$ make
make -C /lib/modules/5.10.139-volumio/build M=/home/volumio/i2c-ch341-usb modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.139-volumio'
CC [M] /home/volumio/i2c-ch341-usb/i2c-ch341-usb.o
MODPOST /home/volumio/i2c-ch341-usb/Module.symvers
CC [M] /home/volumio/i2c-ch341-usb/i2c-ch341-usb.mod.o
LD [M] /home/volumio/i2c-ch341-usb/i2c-ch341-usb.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.10.139-volumio'
volumio@volumio-x86-s2:~/i2c-ch341-usb$ sudo make install
[sudo] password for volumio:
Creating symlink /var/lib/dkms/i2c-ch341-usb/1.0.0/source ->
/usr/src/i2c-ch341-usb-1.0.0
DKMS: add completed.
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.10.139-volumio -C /lib/modules/5.10.139-volumio/build M=/var/lib/dkms/i2c-ch341-usb/1.0.0/build modules...
cleaning build area...
DKMS: build completed.
i2c-ch341-usb.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.10.139-volumio/updates/dkms/
/etc/modprobe.d/dkms.conf: added alias reference for 'i2c-ch341-usb'
depmod...
DKMS: install completed.
volumio@volumio-x86-s2:~/i2c-ch341-usb$ lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 2772:0230
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
volumio@volumio-x86-s2:~/i2c-ch341-usb$ lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 2772:0230
Bus 003 Device 003: ID 1a86:5512 QinHeng Electronics CH341 in EPP/MEM/I2C mode, EPP/I2C adapter
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
volumio@volumio-x86-s2:~/i2c-ch341-usb$
If you now have a device entry in the filesystem like (according to your i2cdetect command) /dev/i2c-9, then you can hopefully run mpd_oled -B 9 -o oled_type_number, and it will work (fingers crossed).
EDIT: install the mpd_oled plugin and disable it, so you have the mpd_oled binary, then run it from the command line.
I don’t think that mpd_oled will run on x86 architecture, As it keeps nagging about missing ‘armhf’
I should have entries in the folders below, but on the x86 none are present
Currently testing a full manual install, as given by you on git.
manual got more prospect, but need some additional research:
volumio@volumiox86-s2:~/mpd_oled$ mpd_oled -B 9 -o 3
bcm2835_init: Unable to open /dev/gpiomem: No such file or directory
mpd_oled: error: could not initialise OLED
volumio@volumiox86-s2:~/mpd_oled$
Ah, ok, I didn’t see the “x86” in your volumio prompt! In which case, yes, you will need to uninstall the plugin and build mpd_oled from source.
Looking at your followup message, although I added code to use the linux I2C device driver it may be that the code relating to I2C still contains some parts that are specific to the Raspberry Pi.
The development version of mpd_oled shouldn’t contain anything specific to the Raspberry Pi, but I haven’t tested its I2C on anything but a Raspberry Pi
Installing the dev branch now. Let’s see how it goes.
Installing the libu8 seems problematic. Unable to locate one for x86. The one in dev is also intended for arm, One i found online, also for Arduino or arm.
Currently the volumio installation is not happy with me. seems I need to reinstall everything.
volumio@volumiox86-s2:~/u8g2/src$ sudo apt-get update
Hit:1 https://deb.nodesource.com/node_14.x buster InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-x86/Packages' as repository 'https://deb.nodesource.com/node_14.x buster InRelease' doesn't support architecture 'x86'
N: Skipping acquire of configured file 'main/binary-x86/Packages' as repository 'http://deb.debian.org/debian buster InRelease' doesn't support architecture 'x86'
N: Skipping acquire of configured file 'contrib/binary-x86/Packages' as repository 'http://deb.debian.org/debian buster InRelease' doesn't support architecture 'x86'
N: Skipping acquire of configured file 'non-free/binary-x86/Packages' as repository 'http://deb.debian.org/debian buster InRelease' doesn't support architecture 'x86'
volumio@volumiox86-s2:~/u8g2/src$
I don’t provide any binaries for x86, and the U8g2 library needs to be built. The link I posted for installing from source also includes instructions for building the U8g2 library that mpd_oled links against
Was referring to this part (installation only took 6 minutes on a i5 ), after this Volumio reports these errors.
Need to reinstall everything and get a different unit that I can mess up.
git clone https://github.com/antiprism/libu8g2arm.git
cd libu8g2arm
./bootstrap
mkdir build
cd build
CPPFLAGS="-W -Wall -Wno-psabi" ../configure --prefix=/usr/local
make
cd ../.. # leave libu8g2arm/build directory
Ok, I understand. The library has “arm” in the name, but it may not have anything arm-specific in it. I can’t say for sure because I have only used it with I2C on the Pi. The screenshot of mpd_oled running on the desktop was running on x86 and used this library. Anyway, if it turns out that the library doesn’t work with I2C on a PC then it needs to be modified so it does work!
IMG_4242.zip (6.1 MB)
No clue, need to get CAVA running before I will reinstall this device.
At this moment 've started it with mpd_oled -o SSD1306,128X64,I2C - f 50
Scrolling looks acceptable. Please rename zip to MOV (it’s not a zip archive)