Custom AT command support in ModemManager

Daniele Palmas dnlplm at gmail.com
Thu Aug 17 10:36:49 UTC 2017


Hi Shijo and Aleksander,

2017-08-17 12:14 GMT+02:00 Aleksander Morgado <aleksander at aleksander.es>:
> On Thu, Aug 17, 2017 at 2:45 AM, Jose, Shijo <Shijo.Jose at hughes.com> wrote:
>>>> I just realized you're working with a MBIM modem. So the "No AT port
>>>> available to run command" may actually mean there is no AT port
>>>> detected in the modem. Are you able to see a TTY listed in the
>>>> "System/ports" entry when you do "mmcli -m 0"?
>>
>> No, I do not see TTY listed. Snippet of "mmcli -m 0" below -
>>
>>   Hardware |   manufacturer: 'Generic'
>>            |              model: 'MBIM [1BC7:1204]'
>>            |            revision: '17.01.571'
>>            |       supported: 'gsm-umts, lte'
>>            |             current: 'gsm-umts, lte'
>>            | equipment id: '35323806113733'
>>   -------------------------
>>   System   |         device: '/sys/devices/platform/soc/soc:internal-regs/d005e000.usb/usb1/1-1'
>>            |              drivers: 'cdc_mbim'
>>            |                plugin: 'Generic'
>>            |   primary port: 'cdc-wdm0'
>>            |                  ports: 'cdc-wdm0 (mbim), wwan0 (net)'
>>
>
> So the modem doesn't expose any AT capable TTY in this mode? Is there
> any /dev/ttyUSBX exposed that we may not be probing correctly?
>
>>
>>>Also, we'd generally discourage enabling custom AT commands in most situations.  Instead, we'd like to learn more about your use-case and see if we can come up with a more >generic way to do >what you want to do.  It may well be the case that what you want to do has an analogue in the other protocols like MBIM and QMI, and thus we could expose >that functionality generically via D-Bus >rather than doing one-off things for specific modems.
>>
>> One of the custom (vendor) AT commands is to switch the firmware (i.e. reboot using a different firmware) on the LTE modem based on the SIM card information (operator type).  Another one (#USBCFG) is to change the USB configuration mode (such as, enable MBIM) on the modem device.
>>
>
> Is there a configuration mode that has MBIM+AT? You may want to use
> that one instead of the one you currently have, which doesn't seem to
> expose any AT capable TTY.
>

1204 composition indeed has serial ports, but the PID is missing in
option kernel driver.

Regards,
Daniele

> As for the command to reboot with a different firmware; this is
> currently a control flow that ModemManager doesn't expect, so probably
> the best thing would be to chain a ModemManager stop/start sequence
> before/after the firmware update control operation (i.e. ModemManager
> not running at all while your other programs do firmware update,
> including any AT command required to do so).
>
>> I may also need some standard AT commands such as +CRSM to query certain SIM fields such as APN stored on the SIM,  +CGQREQ/ +CGEQOS for quality of service profile and +CGDCONTRDP for PDP Context Parameters.
>>
>
> Some of those we already expose in the interfaces, and some others we
> could include in the interfaces if they're useful enough.
>
>> Just a note that the product is a Telit LTE modem hard-wired to a processor via USB2.0 HS. The requirement is to select the appropriate protocol (MBIM/QMI/PPP) which will provide a control and data path for one or more PDP contexts and also monitor all modem and connection statistics and share this information with other processes or update SNMP MIBs. I am also looking at way for ModemManager to share updates with other processes.
>>
>
> ModemManager has a DBus interface that other processes can use.
> libmm-glib is a client-side C library that allows applications to
> easily integrate with that DBus interface. mmcli for example is an
> application that uses libmm-glib to talk to ModemManager via DBus.
> ModemManager "shares" all updates with other processes via DBus, e.g.
> with DBus property updates; clients can "connect" to the "update
> signals" and get notified right away when the properties change. I'm
> sure there are multiple ways you could try to integrate the flow you
> need; e.g. with a net-snmp agent monitoring ModemManager interfaces
> and publishing your custom OIDs.
>
> --
> 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