TRB245: SIM SMS storage fills up with invisible entries

After running for several weeks, the TRB245 stops sending SMS without any obvious error in the WebUI. The router is used exclusively for event-triggered outgoing SMS alerts (no incoming SMS expected).

Checking the SMS Storage tab shows:

Memory – Used: 9  Available: 10

However, the Read Messages tab is completely empty. There are no messages visible, yet the SIM storage is reported as 90% full.

Verifying via AT commands confirms the issue:

AT+CPMS?
+CPMS: "SM",9,10,"SM",9,10,"SM",9,10

AT+CMGL=4
OK

AT+CMGL=4 (list all messages) returns empty — the slots are occupied by entries that cannot be read or displayed. Attempting to send an SMS fails:

gsmctl -S -s "+49xxxxxxxxx Test"
ERROR: Failed to parse response

This has been reproduced on multiple TRB245 units, all running the same firmware and restored from the same configuration backup.

Temporary fix

Delete all SIM slots individually (since AT+CMGD=1,4 returns OK but does not actually clear them):

for i in 1 2 3 4 5 6 7 8 9 10; do gsmctl -A "AT+CMGD=$i"; done
gsmctl -A 'AT+CFUN=1,1'

After modem reset, SMS sending works again.

Edit:
mobifd.log shows EMM reject events (“Severe network failure”) from o2. These network disconnection events appear to correlate with slot accumulation, suggesting operator-originated messages (voicemail notifications, network status SMS) are being stored on SIM during reconnection and never deleted.

Greetings,

Apologies for the delayed response.

Could you please confirm which firmware version is currently running on the device?

Additionally, what is the modem firmware version? You can check this by running the following command:
gsmctl -A "ATI"

Next, verify the current message format on the modem:
gsmctl -A 'AT+CMGF?'
If the result is 1 (text mode), please switch it to PDU mode for testing purposes using:
gsmctl -A 'AT+CMGF=0'

After that, you should be able to read a specific message index directly. For example (if slot 1 is empty, try 2, 3, etc.):
gsmctl -A 'AT+CMGR=1'
This will help identify what messages are filling the SMS storage. The output should be in PDU format, you can use an online PDU decoder to interpret it. If the message does not contain any sensitive information, please share the PDU string with me.

I will need this information to further analyze the issue and provide an appropriate solution.

In the meantime, you can use crontabs to run your script at set intervals: Crontabs - Teltonika Networks Wiki

Best Regards,
Justinas