(05-01-2020, 08:05 PM)antiX-Dave Wrote: A small update.
I was able to keep sms messaging working by purging the cache every now and then.
Making a script under /usr/local/bin/ named clear-cache.sh I am able to do this without the use of minicom.
The contents of /usr/local/bin/clear-cache.sh are:
Which I gave the permissions of 755Code:#!/bin/sh
echo "AT+CMGD=0,4" > /dev/ttyUSB2
Also added the script to cron via "crontab -e" with the entry of
clearing the cache every 10 minutes. This could be less frequent but if a few people send sms messages at the same time it could plug up the buffer / cache if set longer.Code:*/10 * * * * /usr/local/bin/clear-cache.sh
It was nice to see in later images that the ringtones/notification sounds started working.
Calling seems to be more spotty than the version used above.
This time around have been using image numbers 297/298 if I remember correctly
Using your idea as a base, I did the following. I was having an issue with USA T-Mobile (not CDMA) on the PureOS port for PP CE in which T-Mobile spam sent MMS messages to me (perhaps trying to confirm something). This was further exacerbated by being in an area without signal and the phone's battery dying regularly. I created the following script to delete the messages they send.
Code:
#!/bin/bash
MODEM=`sudo mmcli -L | awk '{print $1}' | awk -F'/' '{print $6}'`
oIFS=$IFS
IFS=$'\n'
CACHEDSMS=""
for CACHEDSMS in `sudo mmcli -m $MODEM --messaging-list-sms | awk '{print $1}' | awk -F'/' '{print $6}'`; do
if sudo mmcli -s $CACHEDSMS | grep 'smsc: +12063130057' ; then
sudo mmcli -m $MODEM --messaging-delete-sms=$CACHEDSMS
fi
done
While I haven't put this in a cron, the script works and should be able to be placed in a cron.
See also this post.