The time has come to publish the result of my efforts. From today, the OLEDproc add-on supports displays with both types of interfaces (I2C and SPI).
I am developing the plugin on an SBC Orange Pi (SoC Allwinner). Fortunately, I can use these boards without restrictions and have an easily accessible GPIO connector. It's completely different with the RPi4 board. I can only borrow it for a short time and I have to disassemble the box to get to the GPIO connector.
Unfortunately, it turned out that there were a number of difficulties to overcome to get the SPI interface working on the Orange Pi SBC, which is why it took me so long. In the end, however, it succeeded. But there is a small drawback - it was only possible with the LE11 system. On the contrary - on RPi boards, the add-on should work both with LE11 and LE10 (I only tried it on RPi4 with LE10).
I created a total of 6 SW packages that contain the necessary files. Two for Orange Pi boards (one for H3 boards, one for H6 boards) and four for RPi boards: RPi4-LE10, RPi2-LE10, RPi4-LE11, RPi2-LE11.
Since the SW packages exceed the allowed size, it was not possible to attach them here. So I saved them to my google drive.
Note 1.
The following text talks about (in the case of RPi) editing the config.txt file or (in the case of OPi boards) editing the /flash/extlinux.conf file and adding overlay files to the /flash/overlays directory. All described files and directories are located in the flash partition, which is mounted as read only in normal operation.
Here you can read how to proceed. Although the manual only talks about the config.txt file, the procedure is exactly the same for OPi boards.
Note 2.
The add-on is capable of displaying texts in Kodi's native encoding (UTF-8). Unfortunately, the official version of the XBMC LCDproc add-on does not support this encoding at this time. The modification is very simple and I asked the author to include it in the official version. Before that happens, please download the modified version here.
Installation instructions:
1. Enable I2C or SPI interface (this of course depends on your display type)
1.1 RPi
1.1.1 I2C interface
In the case of RPi, the I2C interface must be enabled by adding rows to the config.txt file.
dtparam=i2c1=on
dtparam=i2c_arm=on
1.1.2 SPI/spidev interface
In the case of RPi, the SPI interface must be enabled by adding row to the config.txt file.
dtoverlay=spi0-1cs
1.2 OPi H3
1.2.1 I2C interface
In this case, the file sun8i-h3-i2c0.dtbo should be stored in the /flash/overlays directory and the line FDTOVERLAYS /overlays/sun8i-h3-i2c0.dtbo should be added to the extlinux.conf file.
1.2.2 SPI/spidev interface
In this case, the file sun8i-h3-spi-spidev0.dtbo should be stored in the /flash/overlays directory and the line FDTOVERLAYS /overlays/sun8i-h3-spi-spidev0.dtbo should be added to the extlinux.conf file.
1.3 OPi H6
1.3.1 I2C interface
In this case, the file sun50i-h6-i2c0.dtbo should be stored in the /flash/overlays directory and the line FDTOVERLAYS /overlays/sun50i-h6-i2c0.dtbo should be added to the extlinux.conf file.
1.3.2 SPI/spidev interface
Depending on the specific board type, you need to choose the right overlay file. Here is an example for the OPi 3 and OPi Lite 2 boards:
In the case of OPi 3, the file sun50i-h6-spi-spidev1.dtbo should be stored in the /flash/overlays directory and the line FDTOVERLAYS /overlays/sun50i-h6-spi-spidev1.dtbo should be added to the extlinux.conf file.
In the case of OPi Lite 2, the file sun50i-h6-spi-spidev0.dtbo should be stored in the /flash/overlays directory and the line FDTOVERLAYS /overlays/sun50i-h6-spi-spidev0.dtbo should be added to the extlinux.conf file.
2. Installing add-ons (install in the order listed)
2.1 RPi
2.1.1 Raspberry Pi Tools
Add-ons - Install from repository - LibreELEC Add-ons - Program add-ons - Raspberry Pi Tools
2.1.2 Add-ons from the attached SW package
script.module.cbor2
script.module.smbus2
script.module.spidev
script.module.luma
service.oled
In the case of the service.oled add-on, a configuration dialog opens immediately after installation.
According to the type of your display, fill in the data in the Display and Connection tabs.
2.1.3 Modified XBMC LCDproc addon
After installing the add-on (from the downloaded zip file), open the configuration dialog and in the first tab (Behaviour) turn on the Use alternate charset switch. Then set the Charset to UTF-8.
2.2 OPi
2.2.1 Add-ons from the attached SW package
script.module.cbor2
script.module.smbus2
script.module.spidev
script.module.luma
virtual.opi-tools
service.oled
In the case of the service.oled add-on, a configuration dialog opens immediately after installation.
According to the type of your display and SBC, fill in the data in the Display and Connection tabs. On the Connection tab - don't forget to select the type of your SBC.
2.2.2 Modified XBMC LCDproc addon
After installing the add-on (from the downloaded zip file), open the configuration dialog and in the first tab (Behaviour) turn on the Use alternate charset switch. Then set the Charset to UTF-8.
If the display is properly connected and all data is set correctly, the display should work at this point.
The content of the display is (thanks to the use of the XBMC LCDproc add-on) customizable by editing the LCD.xml file. You can find the documentation here.