Serial port challenge



  • Greetings Onioneers! :)

    I have an interesting 'quirk' that I need to work around while using UART1:

    I have a startup script in rc.local that calls my python serial port reader and all works perfectly on startup BUT heres the catch - the onion never stops booting up and the led flashes constantly.

    I have full control but cannot reboot from command line nor reset switch. I have to remove power. This is a challenge for me because my device needs to call home and upload it's daily data before going to sleep for the night...

    Any advice on how to check that boot is complete and stable before running serial port will be much appreciated! :)



  • @Paul-Cousins

    Look at the output on the serial-port to see what's going on. @WereCatf

    What about a Serial Terminal / Console on UART0 to try out an effective troubleshooting?



  • good thing to do is show that startup script in rc.local. my guess is you are causing the reboots with the script. thus the omega starts fine, the rc.local could be causing a reboot. could have a boot loop.



  • @Douglas-Kryder said in Serial port challenge:

    startup script in rc.local

    Put your custom commands here that should be executed once

    the system init finished. By default this file does nothing.

    activate the swap file on an external USB drive

    swapon /tmp/mounts/USB-A1/swap.page;

    omega2-ctrl gpiomux set uart0 gpio
    omega2-ctrl gpiomux set uart1 uart
    omega2-ctrl gpiomux set uart2 gpio
    omega2-ctrl gpiomux set spi_s gpio
    omega2-ctrl gpiomux set spi_cs1 gpio
    omega2-ctrl gpiomux set i2s gpio

    #/usr/local/bin/noip2

    echo 0 >/sys/class/gpio/unexport
    echo 1 >/sys/class/gpio/unexport
    echo 6 >/sys/class/gpio/unexport
    echo 7 >/sys/class/gpio/unexport
    echo 18 >/sys/class/gpio/unexport
    echo 19 >/sys/class/gpio/unexport
    echo 23 >/sys/class/gpio/unexport
    echo 26 >/sys/class/gpio/unexport

    python /root/grs/start_up.py
    exit 0



  • i see there is a call to a python script from rc.local. what you have in rc.local looks fine. perhaps the python script? anyway, you could always switch to a cron job which takes place after boot finishes and not use rc.local to call the script.


Log in to reply
 

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.