kevine
November 30, 2023, 3:51pm
1
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.
jyijyi
November 30, 2023, 4:03pm
2
do you mean you want to keep module waking up?
If yes, you can try this:
echo NO_SLEEP > /sys/power/wake_lock
kevine
November 30, 2023, 4:08pm
3
I would like to make sure any sleep modes are not enabled.
Thank you, I will try this.
kevine
November 30, 2023, 4:09pm
4
Looks like I was able to set it. I will let you know how it goes
kevine
November 30, 2023, 4:29pm
5
It looks like when I reboot the module, the setting is not saved. Is this correct?
jyijyi
November 30, 2023, 4:41pm
6
yes, you need to enter this every boot up
kevine
November 30, 2023, 5:18pm
7
Could this be implemented in a legato application so this command will run automatically during the init phase of my legato application?
jyijyi
November 30, 2023, 6:03pm
8
Yes, you can run script in legato application
I don’t see problem on WP76 FW R13.
You can use my hello6.tar.gz.
hello6.tar.gz (314.7 KB)
root@swi-mdm9x28-wp:~# chmod 777 /tmp/test.sh
root@swi-mdm9x28-wp:~# /tmp/test.sh
root@swi-mdm9x28-wp:~# ls /tmp/123.txt
/tmp/123.txt
root@swi-mdm9x28-wp:~# cat /tmp/123.txt
123
root@swi-mdm9x28-wp:~# rm /tmp/123.txt
root@swi-mdm9x28-wp:~# ls /tmp/
hello6.wp76xx.update legato test.sh
hosts pkgdwl thermal_engi_ipc
ld.so.cache psm_socket …
kevine
December 4, 2023, 10:30pm
9
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?
jyijyi
December 5, 2023, 1:39am
10
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"
kevine
December 5, 2023, 4:14am
11
jyijyi:
sh /home/root/test.sh &
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.