Handling received SMS

colin.helliwell at ln-systems.com colin.helliwell at ln-systems.com
Mon Feb 13 08:13:03 UTC 2017


All I'm seeing in the logs is "+CIEV: message,1". 
Checking back through the logs for unsolicited event setups, I also see
[src/mm-broadband-modem.c:5888] set_messaging_unsolicited_events_handlers(): (ttyMux0) Setting messaging unsolicited events handlers
[src/mm-port-serial.c:1347] _close_internal(): (ttyMux0) device open count is 1 (close)
[src/mm-iface-modem-messaging.c:867] enable_unsolicited_events_ready(): Couldn't enable unsolicited events: 'SMS settings don't accept [2,1] <mode>'

That inner error message seems to originate in the Cinterion plugin's messaging_enable_unsolicited_events (). From what I can make out, that function is looking for a supported mode in the response to "AT+CNMI=?". 
Doing this from the command line gives the response " +CNMI: (0-3),(0,1),(0,2,3),(0,2),(1) ". Furthermore a "AT+CNMI=2" also from the command line - which I think the plugin would have otherwise tried to do if it had found the mode - does give an OK response.

But I think I need to switch back to the Generic plugin, for simplicity, and see how that behaves. I have though already seen some incompatibilities which I'll need to address - and these may be related to this problem. E.g. a parameter used for 'AT+CMER=3,0,0,1 ; and also param value problems with 'AT+CNMI=2,1,2,1,0'.  In the case of the latter, the code looks like it is written to have 3 forms of this command to try - cnmi_sequence[] - but although my modem fails the first " +CMS ERROR: 500 ", the other two aren't then tried instead?

-----Original Message-----
From: ModemManager-devel [mailto:modemmanager-devel-bounces at lists.freedesktop.org] On Behalf Of Aleksander Morgado
Sent: 10 February 2017 17:49
To: colin.helliwell at ln-systems.com
Cc: ModemManager (development) <modemmanager-devel at lists.freedesktop.org>
Subject: Re: Handling received SMS

On Fri, Feb 10, 2017 at 3:40 PM,  <colin.helliwell at ln-systems.com> wrote:
> I’m digging into SMS reception, and trying understand how MM deals with it.
>
> I can see that it/mmcli reads the messages when the modem is enabled. 
> When a new SMS is then received, I can see the modem sending a “+CIEV: message,1”
> [but only the first time, if the first message isn’t then read?].
>
> I kind of expected/hoped MM would then fetch the message out and 
> update its internal list, but it doesn’t seem to. Nor does mmcli have 
> an option to re-read SMS’s from the modem?
>
> Is there this facility in the library, if not in mmcli, and/or am I 
> missing something?

MM should be updating its internal list on every received SMS; if it's not doing that please grab debug logs while reproducing the issue and we'll try to see why.

--
Aleksander
https://aleksander.es
_______________________________________________
ModemManager-devel mailing list
ModemManager-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel



More information about the ModemManager-devel mailing list