Storage behaviour when sending SMS

Aleksander Morgado aleksander at aleksander.es
Fri Jul 22 08:18:18 UTC 2022


Hey,

> >>> while trying to resolve the issue when sending SMS with specific
> >>> mbim modems
> >>> (https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/562),
> >>> I see different behaviour when sending SMS depending on the modem I
> >>> use:
> >>>
> >>> When I send an SMS using a non-MBIM modem (UBlox Toby L210, RNDIS),
> >>> the SMS is shown (using mmcli) as sent. When I then restart
> >>> ModemManager, the SMS is no longer there. So it seems that the
> >>> message is not stored in SIM or modem.
> >>> When I send an SMS using my MBIM modem (Telit LE910C1-EU), the SMS
> >>> is shown (using mmcli) as sent. When I then restart ModemManager,
> >>> the SMS is still there. So it seems that the message is stored
> >>> immediately when sending (to be precise: Any attempt to send the SMS
> >>> creates an entry in the SMS storage on this modem -- so when I have
> >>> three attempts to send an SMS, two failed and the third succeeded, I
> >>> have two drafts and on sent message in the storage (!?) )
> >>>
> >>> Is ModemManager capable to handle both of these scenarios? It seems
> >>> to me that ModemManager does not expect the second scenario, which
> >>> leads to the issue when deleting messages...
> >>>
> >> The SMS management in the MBIM protocol is extremely bad. There is no
> >> notion of SMS storages or no action to explicitly store SMS messages.
> >> Any SMS management operation on devices using the MBIM protocol
> >> exclusively is really far from ideal.
> >
> > [...]
> >
> > Another possibility (just for my case) would be to delete all sent SMS
> > each time after sending. But there is no support for that in mbimcli,
> > although the MBIM protocol includes such a command. Do you have some
> > guidance where to start if I want to implement it?
>
> I managed to implement bulk-delete in mbimcli using the appropriate
> commands. Of course ModemManager has no chance to get the information
> that the messages have been deleted and still shows them when using
> --messaging-list-sms.
>

Would you like to polish your bulk-delete changes and send them as a
new merge request to libmbim? It would be great to have that.

> So the question is whether we can support these bulk commands in
> ModemManager -- then ModemManager knows that the messages have been
> deleted and can update its internal state of the SMS messages. That
> would be a nice thing anyway, because it is quite painfull to delete SMS
> messages one by one using mmcli (Script can of couse be used, but this
> is quite inefficient and takes quite long compared to using the bulk
> commands). And as far as I can see, AT commands also support that.
>

I have mixed feelings about this.

>From one point of view, we could really just add a new API method to
delete all sent SMS messages, or some other combination of deletion
based on the state of the message (are equivalent operations in AT and
QMI?). But adding this new API should really be a feature by itself,
we should do that only if the operation itself is useful per se (which
I think it probably is really). I don't think we should be adding a
new API like this if it's exclusively to workaround issues in the MBIM
message handling - or maybe we should because there will be cases
where it's otherwise fully broken.

If you're up to drafting a new DBus API with a bulk delete operation,
please do so in the
introspection/org.freedesktop.ModemManager1.Modem.Messaging.xml file
and send it as a merge request to discuss.

Also, please check
https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/721
where there's a suggestion to extend the messaging API to allow
handling independent SMS parts, which may also help solving some of
the original issues you complained about (e.g. leftover SMS parts from
incomplete multipart SMS messages).

-- 
Aleksander


More information about the ModemManager-devel mailing list