How to setup LTE connect automatically at system bootup

How to setup LTE connect automatically at system bootup?

My current approach is to set a script to be automatically executed at boot

in the /etc/init.d/ add a script to startup LTE connection


case "$1" in
        echo "Legato start sequence"

        umount /legato 2>/dev/null
        mount -o bind $LEGATO_MNT /legato
        nohup sh /home/root/ >/dev/null 2>&1 &

the content of as below:


cm data apn internet
cm data auth none
cm data connect 

we can connect to internal via this script by manually, but it can’t work when it is automatically executed via at bootup.
I don’t know why the cm command cannot be executed correctly.

you can build an unsandboxed legato application to call your script by system() API.
As this legato application will be run at boot up, so this script will also be run during boot up.

Please note that you need to use full path in your script or system() to call cm tool: