Problem with autostart.sh on RPI-4 Libreelec 11.95.1 Omega

  • To make it complete, please check every listed chip:

    Code
    cat /sys/class/gpio/gpiochip512/ngpio
    cat /sys/class/gpio/gpiochip512/label

    The correct one has 58 on the RPi4 (but the pin count could be split/vary on RPi5) as the return value for ngpio and I'm assuming the label is "pinctrl-bcm2712" or something similar.

    for ngpio i have 32 as result and gpio-brcmstb@107d508500 for the label

  • The original intention was, that you repeat this for every gpiochip.

    • gpiochip512

      Code
      cat /sys/class/gpio/gpiochip512/ngpio
      cat /sys/class/gpio/gpiochip512/label
    • gpiochip544

      Code
      cat /sys/class/gpio/gpiochip544/ngpio
      cat /sys/class/gpio/gpiochip544/label
    • gpiochip548

      Code
      cat /sys/class/gpio/gpiochip548/ngpio
      cat /sys/class/gpio/gpiochip548/label
    • gpiochip565

      Code
      cat /sys/class/gpio/gpiochip565/ngpio
      cat /sys/class/gpio/gpiochip565/label
    • gpiochip571

      Code
      cat /sys/class/gpio/gpiochip571/ngpio
      cat /sys/class/gpio/gpiochip571/label

    But I think, that I know the answer. You can check the gpiochip571 and you should get "54" for ngpio and "pinctrl-rp1" for label as the return values.

    Quote

    I have to do more tests when I get home, but it seems to be ok
    Thanks a lot

    Have you had time to test more? Are there any problems or is it working?

    I was afraid that the pin number was to generic and could be used at the wrong pin. So I have changed the pinctrl script version some minutes ago. Please check the new version.

    Edited 3 times, last by HarryH: typo corrected (April 16, 2024 at 3:26 PM).

  • Quote

    But I think, that I know the answer. You can check the gpiochip571 and you should get "54" for ngpio and "pintctrl-rp1" for label as the return values.

    That’s it

    Have you had time to test more? Are there any problems or is it working?

    I don’t know if it’s due to the board but when I connect the power to the board the pi5 shutdown just after start

    I’m not at home right now so it’s a little bit complicated to make test remotely.

  • Quote

    I don’t know if it’s due to the board but when I connect the power to the board the pi5 shutdown just after start

    Do you have this strange behavior only since you tried the pinctrl version? Have you updated to the current version?

    The GPIO15 seems to me to be the more important signal for shutting down. It may be triggered the MCU on the RemotePi pcb before the irwitch.sh script was started. These 2 pins (GPIO14/15) are part of UART0. Depending on your bootloader/EEPROM settings and config.txt, conflicts can occur. But this conflict should also exist if you have not installed the script. Can you check without the scripts, if the shutdown also is initiated automatically?

    This information would be important for me to know.

  • Do you have this strange behavior only since you tried the pinctrl version? Have you updated to the current version?

    Hello, yes, without the scripts I don’t have shutdown. I didn’t notice this with the first version you made. I just update to the last nightly version… I will retry later when I ´m come back home to see…

  • Do we talk about the same thing? I meant, that I have updated the scripts inside of the 2 codeblocks in Post #17

    Yes I updated the 2 scripts this morning like in your post.
    And I have a shutdown at startup...

    After that I updated to latest nightly version 12.0 (20240416-8b61557) and uncommented the scripts and now it seems to work (and start fine)

    I don't know if there is a connection... but it seems to work currently with your scripts... :)

  • It’s not impossible, but I currently doesn‘t know about changes in the images, which are related to these scripts.
    If it‘s working now, I‘m happy and will not touch the scripts. :) Perhaps only to add some version comments and replacing the deprecated usleep command, no functional change.

    For documentation purposes, please can you provide the following informations?

    • config.txt
      cat /flash/config.txt
    • kernel log
      dmesg | grep -i uart
    • ls -la /dev/ttyAMA*
    • pinctrl -p get
    • Do you know which version of the RemotePi do you have? I read about, that the pcb has a current limiter to prevent damages at RPi pcb. But this can also restrict the current to much for your RPi5 and you are get in trouble, because not enough power.
  • Perhaps only to add some version comments and replacing the deprecated usleep command, no functional change.

    yes It will be cool...

    Quote from HarryH

    cat /flash/config.txt

    Quote from HarryH

    dmesg | grep -i uart

    Code
    [    0.000000] Kernel command line: reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1  smsc95xx.macaddr=D8:3A:DD:CF:C9:00 vc_mem.mem_base=0x3fc00000 vc_mem.mem_size=0x40000000  boot=UUID=0604-1456 disk=UUID=e37f87e7-658e-4610-abc3-cd9177b85998 quiet console=ttyAMA10,115200 console=tty0
    [    0.010450] Serial: AMBA PL011 UART driver
    [    0.348037] 107d50c000.serial: ttyS0 at MMIO 0x107d50c000 (irq = 35, base_baud = 6000000) is a Broadcom BCM7271 UART
    [    2.515145] Bluetooth: HCI UART driver ver 2.3
    [    2.515151] Bluetooth: HCI UART protocol H4 registered
    [    2.515172] Bluetooth: HCI UART protocol Three-wire (H5) registered
    [    2.515306] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator
    [    2.515356] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator
    [    2.515375] Bluetooth: HCI UART protocol Broadcom registered
    Quote from HarryH

    ls -la /dev/ttyAMA*

    Code
    crw-rw----    1 root     dialout   204,  74 Feb 27 18:26 /dev/ttyAMA10
    Quote from HarryH

    pinctrl -p get


    Quote from HarryH

    Do you know which version of the RemotePi do you have? I read about, that the pcb has a current limiter to prevent damages at RPi pcb. But this can also restrict the current to much for your RPi5 and you are get in trouble, because not enough power.

    It's the RemotePi Board for Pi 4.
    Yes maybe shutdown on startup can be due to a sporadic power issue... If it happens again I will maybe try to power directly the board with direct power supply.