Gsmctl on rut906 doesn't display received messages

Goodday everyone,

We are just testing with 3 RUT906 modems to send and receive SMS messages.
After trying different options, we are now focusing on using the cli based gsmctl.

After some initial fiddling with syntax en options, sending an sms is now a breeze.
The issue we have now is that reading the incoming messages doesn’t work.
It seems there are stored messages indeed, but the gsmctl binary runs into an error.

The commands I used and resulted in [almost] the same error are these:

gsmctl -D --sms --list all

GSMCTL modem[0]: Debug mode enabled
GSMCTL Modem id: 0
GSMCTL modem[0]: Calling List SMS
GSMCTL modem[0] SMS: Calling read SMS
[gsmctl_read_sms:74] error: ERROR: Unknown error (errno:1) ‘AT+CMGL=4\r’ => ‘\r’

gsmctl -D –sms –read 1

GSMCTL modem[0]: Debug mode enabled
GSMCTL Modem id: 0
GSMCTL modem[0]: Checking SMS index
GSMCTL modem[0]: Calling Read SMS
GSMCTL modem[0] SMS: Calling read SMS
[gsmctl_read_sms:74] error: ERROR: Fatal exception occurred (errno:4) ‘AT+CMGL=4\r’ => ‘\r’

When looking at the sms logs in /tmp, it seems that the modem does respond with a set of SMS messages:

gsm_1-1.4_202509101744.log:[2025-09-10 17:44:12] Sent: AT+CMGL=4\r
gsm_1-1.4_202509101744.log-[2025-09-10 17:44:12] Received: \r\n+CMGL: 1,3,18\r\n07911326040000F011000B911346534838F60000FF04B35A0E07\r\n
gsm_1-1.4_202509101744.log-[2025-09-10 17:44:12] Received: \r\n+CMGL: 2,3,59\r\n07911326040000F011000B911326442622F70000FF33C8344BA138A6DD67903AAD06B9DF67D0BD2C5F97DDA0B719E44E97E93F85E22C7F97E9EAF29CA550B85C2E970B\r\n
gsm_1-1.4_202509101744.log-[2025-09-10 17:44:12] Received: \r\n+CMGL: 3,3,20\r\n07911326040000F011000B911316217210F00000FF0673F39C6C9E03\r\n
gsm_1-1.4_202509101744.log-[2025-09-10 17:44:12] Received: \r\n+CMGL: 4,3,38\r\n07911326040000F011000B911316217210F00000FF1BD4F29C2E2ECBD363341D644F8741D22A3507B38182D06408\r\n\r\n+CMGL: 5,3,38\r\n07911326040000F011000B911316217210F00000FF1BD4F29C2E2ECBD363341D644F8741D22A3507B38182D06408\r\n
gsm_1-1.4_202509101744.log-[2025-09-10 17:44:12] Received: \r\n+CMGL: 6,3,51\r\n07911326040000F011000B911356116755F90000FF2AD4F29C2E2ECBD363341D644F8741D22A3507B38182D064087496BFCB747579CE0249D3E335\r\n
gsm_1-1.4_202509101744.log-[2025-09-10 17:44:12] Received: \r\n+CMGL: 7,0,28\r\n07911326040040F5240b911356116755f90000527090014413800ae872990d3abfcbe410\r\n
gsm_1-1.4_202509101744.log-[2025-09-10 17:44:12] Received: \r\n+CMGL: 8,3,43\r\n07911326040000F011000B911316217210F00000FF21C4341D949E83CA6537885E9ED3C565797A8CA683EC6137481B168BD378\r\n\r\n+CMGL: 9,3,43\r\n07911326040000F011000B911316217210F00000FF21C4341D949E83CA6537885E9ED3C565797A8CA683EC6137481B168BD378\r\n
gsm_1-1.4_202509101744.log-[2025-09-10 17:44:12] Received: \r\n+CMGL: 10,3,43\r\n07911326040000F011000B911316217210F00000FF21C4341D949E83CA6537885E9ED3C565797A8CA683EC6137481B168BD378\r\n\r\n+CMGL: 11,3,43\r\n07911326040000F011000B911316217210F00000FF21C4341D949E83CA6537885E9ED3C565797A8CA683EC6137481B168BD378\r\n
gsm_1-1.4_202509101744.log-[2025-09-10 17:44:12] Received: \r\n+CMGL: 12,3,43\r\n07911326040000F011000B911316217210F00000FF21C4341D949E83CA6537885E9ED3C565797A8CA683EC6137481B168BD378\r\n\r\n+CMGL: 13,3,43\r\n07911326040000F011000B911316217210F00000FF21C4341D949E83CA6537885E9ED3C565797A8CA683EC6137481B168BD378\r\n
gsm_1-1.4_202509101744.log-[2025-09-10 17:44:12] Received: \r\n+CMGL: 14,3,18\r\n07911326040000F011000B911316217210F00000FF04F4F29C0E\r\n\r\n+CMGL: 15,3,27\r\n07911326040000F011000B911316217210F00000FF0EF7B27C5D7683DAEF321DA42E03\r\n
gsm_1-1.4_202509101744.log-[2025-09-10 17:44:12] Received: \r\n+CMGL: 16,3,44\r\n07911326040000F011000B911346019149F80000FF22E730489D5683CA65F71C742FCBD765370B7496BFCB6A7A79CE02319FCC20\r\n
gsm_1-1.4_202509101744.log-[2025-09-10 17:44:12] Received: \r\n+CMGL: 17,3,52\r\n07911326040000F011000B911326442622F70000FF2BD93708FD2E83D8E1301D442EBBD7207519640FBBC3F6B79B0CA2A3EBE939885E06E9D36AF70F\r\n\r\n+CMGL: 18,3,61\r\n07911326040000F011000B911346766402F80000FF35CAB41AC47EBFE174D0FBBD06B5C36139085D2EB341E432881C3E83DAE1B01C542EBB41E27299AE2E83E46F37D9E502\r\n
gsm_1-1.4_202509101744.log-[2025-09-10 17:44:12] Received: \r\n+CMGL: 19,0,23\r\n07911326040040F5040b911346534838f60000527001515051800433192d07\r\n\r\n+CMGL: 20,3,18\r\n07911326040000F011000B911316217210F00000FF04B35A0E07\r\n
gsm_1-1.4_202509101744.log-[2025-09-10 17:44:12] Received: \r\n+CMGL: 21,3,18\r\n07911326040000F011000B911316217210F00000FF04B35A0E07\r\n\r\n+CMGL: 22,3,18\r\n07911326040000F011000B911346534838F60000FF04B35A0E07\r\n
gsm_1-1.4_202509101744.log-[2025-09-10 17:44:12] Received: \r\n+CMGL: 23,3,18\r\n07911326040000F011000B911316217210F00000FF04B35A0E07\r\n\r\nOK\r\n

This last entry indicates a number 23.
That corresponds perfectly with the number in the modem webUI stating that the amount of messages stored and available space is both 23.

So, I do have several questions:

*can I manually reset the SMS storage via the webUI ?
why does gsmctl ends with an error when I try to list or view SMS messages ?
Is the 23 indeed the maximum number of SMS messages the modem can hold ?
Or is that expandable?

I hope someone can help us with this; they seem to be very mice machines, but this is of course an essential part of their usage, so if we don’t get this to work*….

Ydo Ehlers

Hello,

Regarding SMS storage: in WebUI, navigate to Services → Mobile Utilities → Messages → Read Messages. Here, you can select all messages and delete them.

To check how many messages your RUT906 modem can hold, go to Services → Mobile Utilities → Messages → Storage. Next to Memory, you will see how many messages are stored and how much space is available. Note that the Leave free space setting may limit message storage. For example, if your modem can hold 30 messages and Leave free space is set to 7, only 23 messages will actually be stored. When a new message arrives, the oldest one will be deleted to make space.

Regarding the error you’re seeing, it’s difficult to determine the exact cause without further investigation. However, you can try the following steps:

  1. Check the storage settings and delete messages to free up space.
  2. Execute gsmctl --at "AT+CMGF=0" and see if anything changes.
  3. Execute gsmctl --at "AT+CMGF=1" and see if anything changes.

Best regards,

Dear Marija,

thank you for your reply.

The webUI states the following:
Save messages to [ modem storage ]
Memory Used: 23 Available: 23
Leave free space [ 1 ]

So, this would indicate that there are messages stored in the modems memory; yet the tab’s for ‘read messages’ and ‘send messages’ both show zero messages.

Somehow it looks like there is something in memory, but in such a way that neither gsmctl nor the webUI (which may use the same underlying code as gsmctl ??) can read the contents of that memory properly.

The suggested AT commands have no visible impact whatsoever, unfortunately:

root@RUT906:~# gsmctl --at “AT+CMGF=0”
OK
root@RUT906:~#
root@RUT906:~# gsmctl --at “AT+CMGF=1”
OK
root@RUT906:~#
root@RUT906:~#
root@RUT906:~# gsmctl --sms --list new
[gsmctl_read_sms:74] error: ERROR: Failed to parse response
root@RUT906:~#
root@RUT906:~# gsmctl --sms --list all
[gsmctl_read_sms:74] error: ERROR: Failed to parse response
root@RUT906:~#
root@RUT906:~# gsmctl --sms --read 1
[gsmctl_read_sms:74] error: ERROR: Failed to parse response
root@RUT906:~#
root@RUT906:~# gsmctl --sms --read 23
[gsmctl_read_sms:74] error: ERROR: Failed to parse response
root@RUT906:~#

Somehow there is something in the modems message memory that can’t be accessed.

Is there a way to force a clearing of that memory perhaps?
Or would a factory reset be an option as a very last resort?

Ydo Ehlers

Hello,

To delete all messages stored in the modem, please use the command:
gsmctl -A "AT+CMGD=1,23"
This will remove all messages saved in the modem’s storage (from 1 to 23).

Let me know if this helps. If not, please let me know whether anything changes when you select to save messages to the SIM card instead.

Best regards,

Dear Marija,

my sincere apologies for this late reply; things have been a bit hectic around here.

I am glad to inform you that the problems have been resolved.

We have been testing with the RUT906 in all kind of ways, mostly for sending and receiving SMS messages.
These test were conducted with all means available on the router: web interface, API, gsmctl client, direct AT commands to modems device.
During these tests, part of the SIM card’s storage somehow became ‘corrupted’.
As a consequence, the gsmctl client on the router received data that did not match the expected parameters, while reading the stored messages.
So an error was triggered.

In the end we have been able to remove all the messages stored using low level AT commends directly.
Since then we were able to use the gsmctl client as intended to send and receive SMS messages.

Fortunately, the earlier problems never arose again since then.
This does, however, make it impossible to search for a deeper root cause, since we haven’t been able to reproduce the problem

Thank you for the support.
With kind regards,

Ydo Ehlers

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.