Loss of connection to AirVantage - only reboot works

After about a day of my WP7601-1 running, the connection to AirVantage is lost and cant be recovered unless I reboot the module.

When looking at logread -F, there appears to be the following output stating about some kind of sleep mode? Can anyone confirm if this is normal behavior?

I have also checked for the possibility of some kind of sleep mode.

I checked the AT command AT+CSPSM and the result was 0, indicating no sleep mode was active.

do you mean you want to keep module waking up?
If yes, you can try this:
echo NO_SLEEP > /sys/power/wake_lock

I would like to make sure any sleep modes are not enabled.

Thank you, I will try this.

Looks like I was able to set it. I will let you know how it goes

image

It looks like when I reboot the module, the setting is not saved. Is this correct?

yes, you need to enter this every boot up

Could this be implemented in a legato application so this command will run automatically during the init phase of my legato application?

Yes, you can run script in legato application

Hello, I have been struggling with this. I tried the legato app approach that you shared, and I also tried to create a script under init.d. Both are not working, however when I issue the command from the command line, it works as expected.

This is telling me there is a permissions issue?

Do you have any suggestions?

i don’t see problem.
you can try my script and modify the init script:


root@fx30:~# cat /home/root/test.sh
sleep 30
echo NO_SLEEP > /sys/power/wake_lock


root@fx30:~# chmod 777 /home/root/test.sh
root@fx30:~#

root@fx30:~# cat /etc/init.d/startlegato.sh
#!/bin/sh
# Copyright (c) Sierra Wireless, Inc.
#
# Provides a hook for legato into the init scripts

if [ -e "/etc/run.env" ]; then
    source /etc/run.env
fi

FLASH_MOUNTPOINT=${FLASH_MOUNTPOINT:-/mnt/flash}
FLASH_MOUNTPOINT_LEGATO=${FLASH_MOUNTPOINT_LEGATO:-/mnt/legato}

if [ -e "${FLASH_MOUNTPOINT_LEGATO}/systems/current/read-only" ]
then
    export PATH=/legato/systems/current/bin:$PATH
    LEGATO_START=/legato/systems/current/bin/start
    LEGATO_MNT=${FLASH_MOUNTPOINT_LEGATO}
else
    LEGATO_START=${FLASH_MOUNTPOINT_LEGATO}/start
    LEGATO_MNT=${FLASH_MOUNTPOINT}/legato

    # Create mountpoint in case it doesn't already exists.
    mkdir -p ${LEGATO_MNT}
fi

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

        umount /legato 2>/dev/null
        mount -o bind $LEGATO_MNT /legato

        test -x $LEGATO_START && $LEGATO_START

#jyi
sh /home/root/test.sh &

        ;;

    stop)
        # Do something to stop Legato
        echo "Legato shutdown sequence"
        test -x $LEGATO_START && $LEGATO_START stop
        umount /legato
        ;;

    *)
        exit 1
        ;;

esac

echo "Finished Legato $1 Sequence"

Fantastic, thank you, I was first attempting to use the system() api inside a legato app.

I then tried to write an init.d script separately echoing NO_SLEEP.

You wrote a script in the home folder, then ran that script from existing startlegato.sh.

This worked for me. Thank you!

the NO_SLEEP directive is now auto written at startup.