APM start-up

Rc.local is “started” with “-e” , not a good idea if any “code really ABORT” before APM code, like 3g modem or video streaming, I strong recommend : a script “.sh” to control and start your “applications”.

But if you have only APM code, forget the following logic.

I can share my initialization sh files if necessary, but the “logic” is:

  1. Start WIFI or 3G

  2. Test Wifi and/or 3G

  3. If (“WIFI” or “3G” connectivity) .true.

    Start NO-IP (or other DDns , easy to access your flight board, even in “field” through mobile using a APP like putty.)
    
    If Ground station “IP is replying “ .true.
    
       Start video streaming.
       Start APM with telemetry over 3g or wifi (UDP) 
    

    Else
    Start APM with telemetry over regular Radio (433 or 915).
    Endif
    Else

    Start APM with telemetry over regular Radio (433 or 915).
    

Endif

I know is possible to start both “telemetry over UDP” and regular Radio, but I don’t like to start apps like video streaming without network, not a good idea…. Anyway, I have to test the connectivity, so I can start everything depending on the network status.

AND I strong recommend use > /home/pi/startup_log & for all applications, with different logs files names for sure…very helpful for Troubleshooting

1 Like

@robertb sounds reasonable! Could you please share the scripts? I’m pretty sure they would be useful for the community.

ok, I have to clean-up first.