[RFT] CDMA SMS support in QMI modems

Aleksander Morgado aleksander at lanedo.com
Wed Oct 23 23:44:50 PDT 2013


Hey Dan,

>>
>> On 08/27/2013 06:46 AM, Ben Chan wrote:
>>> Yeah, I've Gobi2k and Gobi3k to test with, but need to check if SMS is
>>> enabled in the subscription.
>>>
>>
>> Any luck testing the 3GPP2 SMS support?
> 
> Is there any way to obscure the whole 3GPP vs. 3GPP thing, so that
> clients don't have to know what type of modem they're dealing with when
> they create an SMS?  Most clients just don't care, they just want to
> send a message.  Can we add the teleservice id only when sending if the
> modem is 3GPP2?  The teleservice id should probably default to 'wmt' for
> CDMA messages anyway, unless overridden by the caller.
> 
> Here's what I did:
> 
> # mmcli -m 0 --messaging-create-sms="text='CDMA test message##',number='+1<my phone #>'"
> Successfully created new SMS:
> 	/org/freedesktop/ModemManager1/SMS/0 (unknown)
> # mmcli -s 0 --send
> error: couldn't send the SMS: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Unsupported: Non-3GPP modem doesn't support 3GPP SMS'
> 
> Since the message has to be created with "-m X" and thus has a modem, MM
> knows what the modem capabilities are.  In my case (Sierra 7750 forced
> to 1x/EVDO-only mode) there is no SIM object and the device has no 3GPP
> current capabilties.
> 

I guess we can do this, yes. And if the modem is both 3GPP+3GPP2;
default to 3GPP. Will prepare a patch for the branch.


> Next up, we work around that by setting teleservice-id=wmt, and we get:
> 
> # mmcli -m 0 --messaging-create-sms="text='CDMA test message##',number='+1<my phone #>',teleservice-id='wmt'"
> # mmcli -s 1 --send
> error: couldn't send the SMS: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Unsupported: Cannot create CDMA SMS part: Unsupported character in number: '+'. Cannot convert to DTMF'
> 
> Oof.  I wonder if there's a way to just interpret these numbers
> according to nice standards?  Ideally, as with teleservice-id, the
> client shouldn't have to care about what number formatting to use or
> what teleservice-id is required just because the modem is CDMA.
> Extended attributes maybe, but I feel like the basic stuff should just
> work.
> 


There's probably some additional logic that can be done to support
these. By default the number is encoded in DTMF in the SMS. If we
wanted, we can also support ASCII encoding for the number, but then we
need to explicitly state the 'number type' (e.g. International,
National, ...).


> So final attempt:
> 
> # mmcli -m 0 --messaging-create-sms="text='CDMA test message##',number='<my phone #>',teleservice-id='wmt'"
> # mmcli -s 1 --send
> SUCCESS
> 

Good (I guess). Did you receive the SMS in the other end?


> Now let's try with some random Chinese characters I found on the web:
> 
> # mmcli -m 0 --messaging-create-sms="text='我差点儿摔倒了。Wǒ chàdiǎnr shuāidǎo le.',number='7813306853',teleservice-id='wmt'"
> Successfully created new SMS:
> 	/org/freedesktop/ModemManager1/SMS/3 (unknown)
> # mmcli -s 3 --send
> error: couldn't send the SMS: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Unsupported: Cannot create CDMA SMS part: Error writing bearer data: Unsupported character in text: '4294967270'. Cannot convert to ASCII-7'
> 
> Which I suppose makes sense, though maybe we can figure this out
> earlier, at message create time instead of only at sending, if this is a
> general restriction with CDMA SMS?
> 

It is not a restriction. There's support for UTF-16 encoded messages,
but my implementation currently supports ASCII only. It is actually very
easy to support Unicode, I just need an example valid SMS with Unicode
encoded characters; as the docs were not fully clear w.r.t how they
should be included in the SMS (IIRC I wasn't fully sure of how the
length of the string was specified, whether in bytes or in UTF-16
characters). Can you maybe send an SMS with chinese chars to the modem
and get me the binary dump of its contents to analyze?


> ---
> 
> Also, mailed you a data dump from SMS receipt that goes wrong, seems
> something isn't quite right with the "latin" encoding handling.
> 

Ok, will look at it.

Thanks for the tests!


>>>
>>> On Mon, Aug 26, 2013 at 1:54 PM, Dan Williams <dcbw at redhat.com> wrote:
>>>> On Mon, 2013-08-26 at 20:43 +0200, Aleksander Morgado wrote:
>>>>>>>
>>>>>>> The 'aleksander/cdma-sms' branch in the git repository implements
>>>>>>> CDMA/3GPP2 SMS support in QMI based modems.
>>>>>>>
>>>>>>> The generic SMS interface was extended to include two 3GPP2 specific
>>>>>>> properties:
>>>>>>>  * TeleserviceId
>>>>>>>  * ServiceCategory
>>>>>>>
>>>>>>> Receiving and listing stored SMS messages should work for SMS of any
>>>>>>> category; but only for the limited set of fields that I have currently
>>>>>>> implemented support for.
>>>>>>>
>>>>>>> Sending SMS messages is currently limited to the WMT TeleserviceId,
>>>>>>> which is anyway what you would normally use when sending point-to-point
>>>>>>> SMS messages.
>>>>>>>
>>>>>>> Testing should be pretty straightforward; just grab a CDMA QMI-based
>>>>>>> modem which implements the 'WMS' service, and:
>>>>>>
>>>>>> Should the code just default to WMT for simplicity?  Anyone who needs
>>>>>> something special or to send specific messages can clearly send other
>>>>>> message types by setting teleservice-id.
>>>>>>
>>>>>
>>>>> Right now having a 'teleservice-id' is the way we decide what kind of
>>>>> SMS we create; if there is such parameter we build a 3GPP2 SMS;
>>>>> otherwise a 3GPP SMS. Of course, this is only meaningful in 3GPP2+3GPP
>>>>> capable modems; but in those it's probably just ok to create a 3GPP one.
>>>>> So yeah, defaulting to WMT teleservice by default is something we could do.
>>>>
>>>> I think we have to get Ben to test this.  The only Verizon subscription
>>>> I have is an LTE-capable SIM, and any non-LTE modules don't care about
>>>> SIM cards (and thus the module wouldn't register with the network for
>>>> me) and any LTE modules would probably just use 3GPP mode or somehow
>>>> emulate it.  I could try locking my device into EVDO-only mode and see,
>>>> but that's not a very good test since the firmware might just handle the
>>>> teleservice ID automatically since it's LTE capable...
>>>>
>>>> If Ben has an Gobi2K or Gobi3K devices lying around, that would work
>>>> (like an original Chromebook CR-48 or something).
>>>>
>>>> Dan
>>>>
>>>> _______________________________________________
>>>> ModemManager-devel mailing list
>>>> ModemManager-devel at lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
>>> _______________________________________________
>>> ModemManager-devel mailing list
>>> ModemManager-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
>>>
>>
>>
> 


-- 
Aleksander


More information about the ModemManager-devel mailing list