Odroid N2 OLED I2C / SPI driver

Thanks, I’m already aware of the PreCharge and VCOMH issues. However the reason it currently doesn’t work on the SPI SSD1309 displays is simply that I forgot to update the code that sets the brightness. The code is simply missing :smiley:

I’ll update the code at the weekend to include support fro SPI displays.

1 Like

It’s nice to hear that ! :grinning:
Thanks roidy !

@RAMALPHA Could you grab release 0.1.7 from github and test that brightness is working on SSD1309 SPI displays please.

Just finished installing your update and yes it works now.
Here are the results with the following brightness settings :
1 - 8 - 16

Thanks for your work roidy !

1 Like

Brightness set at 1 is dark enough to be used in a dark room without beeing annoying while watching a movie.

1 Like

Addon service doesn’t work with the latest official CoreELEC 9.2.4. No display at all. OLED Driver error is shown at the top of the screen at boot. I had to reactivate ODROID N2 SPI with the following SSH commands :

mount -o remount,rw /flash
fdtput -t s /flash/dtb.img /soc/cbus@ffd00000/spi@13000/spidev@0 status “okay”
fdtput -t s /flash/dtb.img /soc/cbus@ffd00000/spi@13000 status “okay”

And after that it works again. :wink:

Yep, until SPI gets permanently activated in CoreELEC you will have to do that every time you update.

And do you know if this is something the developers plan to do in the near future ? :relaxed:

Sorry I have no idea, you’d have to ask the CoreELEC dev team.

There will come dtb-xml what is able to handle such user dtb settings.

1 Like

While there is a solution to this problem planned in the future, A possible solution in the meantime is
to add something like this to your autostart.sh file.

if [ $(cat /storage/.config/boot.hint) == "UPDATE" ]; then
  mount -o remount,rw /flash
  fdtput -t s /flash/dtb.img /soc/cbus@ffd00000/spi@13000/spidev@0 status “okay”
  fdtput -t s /flash/dtb.img /soc/cbus@ffd00000/spi@13000 status “okay
  mount -o remount,ro /flash

This will make the changes to the dtb after an update for you. You will still need to reboot for the changes to take effect, but this makes it much easier to deal with. Keep in mind that you don’t want to add the reboot command to this since that would cause a boot loop.

That’s an excellent temporary solution…I’m going to do so. Thanks !

I have a SH1106 OLED 128x64 IIC display that I wanted to try with my ODROID N2, but it seems that the I2C address choice is limited to 0x78 or 0x7A and your addon only has 0x3C or 0x3D. Any means of circumventing this issue ?

@RAMALPHA, I’ll add 0x78 and 0x7A as address options to the add-on. I wont get time to do that until the weekend so in the mean time if you want to test your display then simply edit /lib/settings.py

Change line 46 to read:-
return 0x78

Thanks roidy. I just tried. It works partially. The clock is displayed correctly. But when I watch a video, the screen turns off completely for the duration of the video, but the display with the duration of the video as well as the icons reappear for about a second when I press the STOP button, then back to the clock.
But it does not matter I will receive another compatible model tomorrow. Anyway I think I’ll go for a 128 x 32 which will be easier to fit into the small plastic case.

0x78 and 0x7A are equivalent to 0x3C and 0x3D respectively.
The address with the “higher” value simply includes an extra bit.
The SH1106 differs from the SSD1306, in that it’s a 132x64 controller, and requires an X axis offset in order for the image to be displayed on it properly, in addition to a few other differences.
You can look at it as a SH1106 having a sub-set of capabilities of the SSD1306.

Yep it seems 0x78 and 0x7A are in the reserved address space.

Yep the add-on has different display routines for each chipset. The SH1106 needs to have the display page increased as you write data to it where as the SSD1306 you set the column address and the page then write the display data it in one continuous block.

1 Like


Using this nice driver, works perfectly with the SPI display, the only thing I am missing is that when I change the audio stream it do not updates the display, for instance if I change from a DD stream to a DTS one display keeps displaing DD, is this normal or I am missing something?

Sorry if already answered, I didn’t find the info in the thread.

Thanks for the good work

The stream information is only read when the video is first started so changing audio tracks during playback wont update the display, it should be an easy fix to periodically recheck the stream info and update it if the audio track has changed. I’ll look into fixing this :+1:

@pviader These changes have now been added. Audio codec and channel count should update during playback, please grab v0.1.8 from github and test that the changes are working for you.