UART1 (/dev/ttyS1) disapear after reboot (PICO ULTRA / Ubuntu)

  • Couple of finding may be it will help to understand the issue.

    I can edit cfg file and then perform config reload

    Code: Select all

    sudo nano /etc/luckfox.cfg
    sudo luckfox-config load
    It works for all UART except UART4_M1 and UART1_M1,

    Code: Select all

    sudo luckfox-config show
    does not display * sign on it.

    If on/off for these ports done via gui menu, * sign is displayed

    Code: Select all

    PWM8_M1 -              *UART4_M1_RX - GPIO1_C4 |       | GND
     PWM9_M1 -              *UART4_M1_TX - GPIO1_C5 |       | MICBIAS
             - I2C4_M0_SCL - UART1_M1_RTS- GPIO2_A1 |       | MIC1P
             - I2C4_M0_SDA - UART1_M1_CTS- GPIO2_A0 |       | MIC1N
                            *UART1_M1_RX - GPIO2_A5 |       | GND
                            *UART1_M1_TX - GPIO2_A4 |       | GPIO1_C7 -             -             - PWM11_M1
    
    but after reload config it disappears again

    Code: Select all

    sudo luckfox-config load

    So during boot process config load is performed (?) and it does not work for UART4_M1 and UART1_M1 on PICO Ultra board.
  • Solved by editing luckfox-config script

    Code: Select all

    sudo nano /usr/bin/luckfox-config

    Code: Select all

    multi_pins_group+=("$(echo "$pin" | sed -E 's/(UART[0-9]+_M[0-9]+)_.*$/\1/g' | sed 's/^ //')")
    does not delete leading spaces and should be replaced by this one

    Code: Select all

    multi_pins_group+=("$(echo "$pin" | sed -E 's/(UART[0-9]+_M[0-9]+)_.*$/\1/g' | sed 's/^ //' | sed 's/[[:space:]]//g')")
    difference is in

    Code: Select all

     | sed 's/[[:space:]]//g'
  • Thank you for your feedback, we'll update after verifying that there are no issues