Posts by LuRu

    Thank you for the answer. I have three different boards:

    1) Orange Pi PC (H3, 1GB DDR3 SDRAM)

    2) Orange Pi Lite 2 (H6, 1GB LPDDR3 SDRAM, no Ethernet)

    3) Orange Pi 3 (H6, 2GB LPDDR3 SDRAM)

    I use them all for LibreELEC, but due to the specification, my favorite is the Orange Pi 3. This is the board on which I performed the described debugging.

    So I made another debug version and found out even more information.

    The problem is in the function

    specifically in section

    So now it looks much clearer.

    There is no  sys/class/gpio directory in LibreELEC (maybe just for Allwinner?).

    For comparison - in the case of Raspberry Pi this directory exists ...

    Can this be fixed?

    I understand that I have provided little information.

    I made a debug version and now I have some information.

    This problem is in the following function:

    Specifically, where after executing g = new_gpio(gpio) the result is NULL.

    But I still don't know why this only happens in the LibreELEC OS, while in Armbian it works properly.

    I wanted to use the virtual.opi-tools add-on even more.

    I wanted to add some buttons and test their status using a python.

    I can easily read the status of buttons (statically) with a command like state01 = GPIO.input(button01).

    But I need to use a callback and it doesn't work.

    I have the command GPIO.add_event_detect(button01, GPIO.BOTH, callback = buttonCallback) in my script.

    As soon as the interpreter reaches the specified line, I get an error message RuntimeError: Failed to add edge detection

    I don't know how to solve it.

    I installed Armbian on the same board and there the exact same script works as expected. The OPi.GPIO library is also installed from the same source (GitHub - Pako2/OrangePi.GPIO: RPi.GPIO drop-in replacement library for Orange Pi Boards).

    Does anyone have any idea what to do with it?

    Note: I have LE version nightly-20210703-9059fe9 installed

    Great, it's finally working.

    So probably the problem was that my LE was installed some time ago (although upgraded to the last night version).

    Thank you again for your extraordinary support and patience.

    But it looks like it will still be many hours of work before LCDproc will work. There is little information on how to debug it.

    So I'm surprised at how fast it went. The LCD display already shows the current Kodi informations !

    Now I would like to do the correct way to enable the i2c bus via overlays. But I probably can't do it without help.

    Could any OPi 3 owner help me?

    Thank you for your extraordinary helpfulness and willingness to help. However, it still doesn't work, even though I used your working binary file (and it looked so promising ...).

    I even tried the line

    FDTOVERLAYS /overlays/sun50i-h6-ir.dtbo

    or

    FDTOVERLAYS /overlays/sun50i-h6-spdif.dtbo

    Both of these files existed (so they were included in the installation image) in the /overlays folder. I thought it should work. But it still behaves the same - the boot fails.

    So out of desperation I decompiled the file sun50i-h6-orangepi-3.dtb, edited it

    and then compiled again. It works !

    But I'm not happy about it, I'd rather it worked the way over overlays.

    So far, I have to work with what I have.

    But it looks like it will still be many hours of work before LCDproc will work. There is little information on how to debug it.

    - overlay you're using isn't correct -

    Can you please specify in what sense isn't correct?

    I did some other experiments. First in Armbian OS.

    First I enabled all three i2c buses in armbian-config and switched my interface to i2c2.

    It works again. But interestingly, there are even 5 i2c buses at the moment!

    If I only enable i2c2 in armbian-config, then there are only three i2c buses (i2c-2, i2c-3 and i2c-4).

    This means that the two default i2c buses are always at the end (in terms of numbering).

    So if I don't have the i2c bus enabled in armbian-config at all, the default buses are numbered 0 and 1.

    If I only have bus 0 enabled in armbian-config, the default buses have the numbers 1 and 2.

    Then I went back to LE.

    Instead of i2c0, I now enabled i2c2 in extlinux.conf.

    Unfortunately, it behaves exactly the same as with i2c0. I.e:

    A) When the FDTOVERLAYS line is at the end, LE boots, but no i2c bus is added

    B) When the FDTOVERLAYS line is moved up, the boot fails

    What steps can I take now (debugging?)?

    1) In the meantime I tried to move FTDOVERLAYS one line higher and it has a big effect. LE doesn't boot - see picture - it stops like this and does nothing further (I had to return it using "cardreader edit")

    2) i2cdetect -l says I have two i2c buses. See picture

    I think that's right:

    1) There is no other i2c port on the GPIO header

    2) I have the same connection when I boot Armbian, and there it works with the command i2cdetect -y 0 (see pictures in the first post)

    Thank you for further advice on how to proceed.

    Unfortunately, the result is still the same - no detection of the PCF8574 address.

    My extlinux.conf file now looks like this:

    Code
    LABEL LibreELEC
      LINUX /KERNEL
      FDT /sun50i-h6-orangepi-3.dtb
      APPEND boot=UUID=2212-5002 disk=UUID=2047348e-1e45-42ca-a55a-b19a509853fa quiet console=ttyS0,115200 console=tty1
      FDTOVERLAYS /overlays/sun50i-h6-i2c0.dtbo

    Is it right ?

    What's next ?

    Thank you for the advice.

    Unfortunately, I have little knowledge in this regard.

    I've read about overlays in the wiki, but there is only Raspberry described, no Allwinner.

    I took the sun50i-h6-i2c0.dtbo file from Armbian and copied it to the /flash/overlays folder in LE.

    But still no detection of the PCF8574 interface address.

    How do I know the overlay is loaded?

    Does it have to be allowed somewhere else?

    I intend to run LCDproc on an Orange Pi 3. I would like to use a display with an HD44780 controller connected via i2c.

    I connected PCF8574 to OPi3 and it doesn't work. So I tried the i2cdetect utility and I see that my PCF8574 interface is not detected.

    Then I inserted an SD card with the Armbian system into my device and tried the same thing (without any change of connection).

    It works so my circuit is correct.

    What should I do to make i2c work in LibreELEC?

    Today I upgraded LibreELEC to the latest nightly version (LibreELEC-H3.arm-9.80-nightly-20201230-c9e96e6-orangepi-pc.img).

    My addon "service.fan.orangepi" then stopped working.

    I found that the problem is in the "-b" option of the "top" command.

    This returns the error " 'dumb': unknown terminal type. ".

    This will remain so that it is not possible to use "top batch-mode" in LibreELEC?

    I think that this problem is not related to Allwinner only. The new builds for RPi4 behave in the same way. I solve this by manually editing the file ".cache/connman/ethernet_XXXXXXXXXXXX_cable/settings".

    When I need to assign IP addresses manually, the content looks like this: