1
2mmcli(1)                         User Commands                        mmcli(1)
3
4
5

NAME

7       mmcli - Control and monitor the ModemManager
8
9

SYNOPSIS

11       mmcli [OPTION...]
12
13

DESCRIPTION

15       ModemManager  is  a  DBus-powered Linux daemon which provides a unified
16       high level API for communicating with  (mobile  broadband)  modems.  It
17       acts  as a standard RIL (Radio Interface Layer) and may be used by dif‐
18       ferent connection managers, like NetworkManager. Thanks to the built-in
19       plugin  architecture,  ModemManager  talks  to  very different kinds of
20       modems with very different kinds of ports. In addition to the  standard
21       AT serial ports, Qualcomm-based QCDM and QMI ports are also supported.
22
23

HELP OPTIONS

25       -h, --help
26              Show summary of options by group.
27
28       --help-all
29              Show all groups and options.
30
31       --help-manager
32              Show manager specific options.
33
34       --help-common
35              Show  common  options. These are used for defining the device an
36              option operates on. For example, modems,  bearers,  SIMs,  SMS',
37              etc.
38
39       --help-modem
40              Show modem specific options.
41
42       --help-3gpp
43              Show 3GPP specific options.
44
45       --help-cdma
46              Show CDMA specific options.
47
48       --help-simple
49              Show  simple  options. These are useful for getting connected or
50              disconnected and understanding the state of things  as  fast  as
51              possible without worrying so much about the details.
52
53       --help-location
54              Show location or positioning specific options.
55
56       --help-messaging
57              Show  messaging  specific  options. See also --help-sms which is
58              related.
59
60       --help-time
61              Show time specific options.
62
63       --help-firmware
64              Show firmware specific options.
65
66       --help-oma
67              Show OMA specific options.
68
69       --help-sim
70              Show SIM card specific options.
71
72       --help-bearer
73              Show bearer specific options.
74
75       --help-sms
76              Show SMS specific options. See also  --help-messaging  which  is
77              related.
78
79

MANAGER OPTIONS

81       -B, --get-daemon-version
82              Retrieve  the version of the currently running ModemManager dae‐
83              mon.
84
85       -G, --set-logging=[ERR|WARN|INFO|DEBUG]
86              Set the logging level in ModemManager daemon. For debugging  in‐
87              formation  you can supply DEBUG. Each value above DEBUG provides
88              less detail. In most cases ERR (for displaying errors)  are  the
89              important messages.
90
91              The default mode is ERR.
92
93       -L, --list-modems
94              List available modems.
95
96       -M, --monitor-modems
97              List available modems and monitor modems added or removed.
98
99       -S, --scan-modems
100              Scan  for any potential new modems. This is only useful when ex‐
101              pecting pure RS232 modems, as they are  not  notified  automati‐
102              cally by the kernel.
103
104       -I, --inhibit-device=[UID]
105              Inhibit the specific device from being used by ModemManager. The
106              UID that should be given is the value of the Device property ex‐
107              posed  by  a given modem (i.e. equal to the ID_MM_PHYSDEV_UID if
108              one set, or otherwise equal to the full device sysfs path).
109
110              This command will not exit right away, as that would  implicitly
111              remove the inhibition. The user must make sure to stop the mmcli
112              process hitting Ctrl+C in order to un-inhibit the device.
113
114              When a device is inhibited via this  method,  ModemManager  will
115              disable  the  modem  (therefore stopping any ongoing connection)
116              and will no longer use it until it is uninhibited.
117
118       --report-kernel-event=['KEY1=VALUE1,KEY2=VALUE2,...']
119              Manually report kernel events, instead of relying on udev  (e.g.
120              if  the  daemon  is running with --no-auto-scan or if the system
121              was built without udev support).
122
123              The supported KEYs are:
124
125                'action'
126                       Action to report, one of 'add' or 'remove'. Required.
127
128                'subsystem'
129                       Subsystem of the specific  port  being  reported,  e.g.
130                       'tty' (for serial ports),
131
132                'name' Name  of  the  port  being  reported,  e.g.  'ttyACM0',
133                       'wwan0' or 'cdc-wdm0'.
134
135                'uid'  The specific UID  of  the  device,  equivalent  to  the
136                       ID_MM_PHYSDEV_UID udev tag. All ports reported with the
137                       same 'UID' value will be considered part  of  the  same
138                       device, which may be useful for e.g. modems with multi‐
139                       ple platform TTYs.
140
141
142       --report-kernel-event-auto-scan
143              When built with udev support but  the  daemon  is  running  with
144              --no-auto-scan,  this method may be used to automatically report
145              kernel events based on udev.
146
147              This command will not exit right away. The user must  make  sure
148              to  stop  the  mmcli process hitting Ctrl+C in order to stopping
149              monitoring for new events.
150
151

COMMON OPTIONS

153       All options below take a PATH or INDEX argument. If no action  is  pro‐
154       vided,  the  default information about the modem, bearer, etc. is shown
155       instead.
156
157       The PATH and INDEX are created automatically when the modem is  plugged
158       in. They can be found using mmcli -L. This produces something like (for
159       modems only):
160
161              Found 1 modems:
162                /org/freedesktop/ModemManager1/Modem/4
163
164       In this case, the INDEX is 4 and the PATH is the entire string above.
165
166       However, for the bearers, SIMs and SMS cases, the PATH is slightly dif‐
167       ferent. The Modem is replaced with the object name in use, like Bearer.
168       For example:
169
170              /org/freedesktop/ModemManager1/Bearer/4
171
172
173       -m, --modem=[PATH|INDEX]
174              Specify a modem.
175
176       -b, --bearer=[PATH|INDEX]
177              Specify a bearer.
178
179       -i, --sim=[PATH|INDEX]
180              Specify a SIM card.
181
182       -s, --sms=[PATH|INDEX]
183              Specify an SMS.
184
185

MODEM OPTIONS

187       All of the modem options below make use of the --modem or -m switch  to
188       specify the modem to act on.
189
190       Some  operations  require  a  MODE.  MODE can be any combination of the
191       modes actually supported by the modem. In the perfect case, the follow‐
192       ing are possible:
193
194         '2G'  - 2G technologies, e.g. EDGE, CDMA1x
195         '3G'  - 3G technologies, e.g. HSPA, EV-DO
196         '4G'  - 4G technologies, e.g. LTE
197         'ANY' - for all supported modes.
198
199       -w, --monitor-state
200              Monitor the state of a given modem.
201
202       -e, --enable
203              Enable a given modem.
204
205              This  powers  the  antenna,  starts  the  automatic registration
206              process and in general prepares the modem to be connected.
207
208       -d, --disable
209              Disable a given modem.
210
211              This disconnects the existing connection(s) for  the  modem  and
212              puts it into a low power mode.
213
214       -r, --reset
215              Resets  the  modem  to the settings it had when it was power cy‐
216              cled.
217
218       --factory-reset=CODE
219              Resets the modem to its original factory default settings.
220
221              The CODE provided is vendor specific. Without the correct vendor
222              code,  it's  unlikely this operation will succeed. This is not a
223              common user action.
224
225       --command=COMMAND
226              Send an AT COMMAND to the  given  modem.  For  example,  COMMAND
227              could be 'AT+GMM' to probe for phone model information. This op‐
228              eration is only available when  ModemManager  is  run  in  debug
229              mode.
230
231       --create-bearer=['KEY1=VALUE1,KEY2=VALUE2,...']
232              Create  a new packet data bearer for a given modem. The KEYs and
233              some VALUEs are listed below:
234
235                'apn'  Access Point Name. Required in 3GPP.
236
237                'ip-type'
238                       Addressing type.  Given  as  a  MMBearerIpFamily  value
239                       (e.g.  'ipv4',  'ipv6', 'ipv4v6'). Optional in 3GPP and
240                       CDMA.
241
242                'allowed-auth'
243                       Authentication method to use. Given  as  a  MMBearerAl‐
244                       lowedAuth                  value                  (e.g.
245                       'none|pap|chap|mschap|mschapv2|eap'). Optional in 3GPP.
246
247                'user' User name (if any) required by the network. Optional in
248                       3GPP.
249
250                'password'
251                       Password  (if any) required by the network. Optional in
252                       3GPP.
253
254                'allow-roaming'
255                       Flag to tell whether connection is allowed during roam‐
256                       ing,  given as a boolean value (i.e 'yes' or 'no'). Op‐
257                       tional in 3GPP.
258
259                'rm-protocol'
260                       Protocol of the Rm interface, given as a MMModemCdmaRm‐
261                       Protocol  value (e.g. 'async', 'packet-relay', 'packet-
262                       network-ppp',  'packet-network-slip',  'stu-iii').  Op‐
263                       tional in CDMA.
264
265                'number'
266                       Telephone number to dial. Required in POTS.
267
268       --delete-bearer=[PATH|INDEX]
269              Delete bearer from a given modem.
270
271       --set-allowed-modes=[MODE1|MODE2|...]
272              Set allowed modes for a given modem. For possible modes, see the
273              beginning of this section.
274
275       --set-preferred-mode=MODE
276              Set the preferred MODE for the given modem. The MODE MUST be one
277              of the allowed modes as set with the --set-allowed-modes option.
278              Possible MODE arguments are detailed at the  beginning  of  this
279              section.
280
281       --set-current-bands=[BAND1|BAND2|...]
282              Set  bands  to  be  used  for a given modem. These are frequency
283              ranges the modem should use. There are quite a  number  of  sup‐
284              ported bands and listing them all here would be quite extensive.
285              For details, see the MMModemBand documentation.
286
287              An example would be: 'egsm|dcs|pcs|g850' to select all  the  GSM
288              frequency bands.
289
290       --set-primary-sim-slot=[SLOT]
291              Request to switch the primary SIM slot.
292
293              The  given  SLOT must be a valid slot number in the [1,N] range,
294              where N is the amount of SIM slots available in the system.
295
296       --inhibit
297              Inhibit the specific modem from being used by ModemManager. This
298              method  is  completely  equivalent to --inhibit-device, with the
299              only difference being that in this case, the modem must be  man‐
300              aged by the daemon at the time the inhibition is requested.
301
302              This  command will not exit right away, as that would implicitly
303              remove the inhibition. The user must make sure to stop the mmcli
304              process hitting Ctrl+C in order to un-inhibit the device.
305
306              When  a  device  is inhibited via this method, ModemManager will
307              disable the modem (therefore stopping  any  ongoing  connection)
308              and will no longer use it until it is uninhibited.
309
310

3GPP OPTIONS

312       The  3rd  Generation  Partnership Project (3GPP) is a collaboration be‐
313       tween groups of telecommunications associations. These options  pertain
314       to devices which support 3GPP.
315
316       Included  are  options to control USSD (Unstructured Supplementary Ser‐
317       vice Data) sessions.
318
319       All of the 3GPP options below make use of the --modem or -m  switch  to
320       specify the modem to act on.
321
322       --3gpp-scan
323              Scan for available 3GPP networks.
324
325       --3gpp-register-home
326              Request a given modem to register in its home network.
327
328              This  registers with the default network(s) specified by the mo‐
329              dem,
330
331       --3gpp-register-in-operator=MCCMNC
332              Request a given modem to register on the network  of  the  given
333              MCCMNC  (Mobile  Country Code, Mobile Network Code) based opera‐
334              tor. This code is used for GSM/LTE, CDMA, iDEN, TETRA  and  UMTS
335              public  land mobile networks and some satellite mobile networks.
336              The ITU-T Recommendation E.212 defines mobile country codes.
337
338       --3gpp-ussd-status
339              Request the status of ANY ongoing USSD session.
340
341       --3gpp-ussd-initiate=COMMAND
342              Request the given modem to initiate a USSD session with COMMAND.
343
344              For example, COMMAND could be '*101#' to give your current  pre-
345              pay balance.
346
347       --3gpp-ussd-respond=RESPONSE
348              When  initiating  an USSD session, a RESPONSE may be needed by a
349              network-originated request. This option allows for that.
350
351       --3gpp-ussd-cancel
352              Cancel an ongoing USSD session for a given modem.
353
354

CDMA OPTIONS

356       All CDMA (Code Division Multiple Access) options require the --modem or
357       -m option.
358
359
360       --cdma-activate=CARRIER
361              Activate  the given modem using OTA (Over the Air) settings. The
362              CARRIER is a code provided by the network for the  default  set‐
363              tings they provide.
364
365

SIMPLE OPTIONS

367       All simple options must be used with --modem or -m.
368
369
370       --simple-connect=['KEY1=VALUE1,KEY2=VALUE2,...']
371              Run a full connection sequence using KEY / VALUE pairs.  You can
372              use the --create-bearer options, plus any of the following ones:
373
374                'pin'  SIM-PIN unlock code.
375
376                'operator-id'
377                       ETSI MCC-MNC of a network to force registration.
378
379       --simple-disconnect
380              Disconnect ALL connected bearers for a given modem.
381
382

LOCATION OPTIONS

384       These options detail how to discover your location using  Global  Posi‐
385       tioning  System  (GPS) or directly from your mobile network infrastruc‐
386       ture (either 3GPP or 3GPP2).
387
388       All location options must be used with --modem or -m.
389
390
391       --location-status
392              Show the current status for discovering our location.
393
394       --location-get
395              Show all location information available.
396
397       --location-enable-3gpp
398              Enable location discovery using the 3GPP network.
399
400       --location-disable-3gpp
401              Disable location discovery using the 3GPP network.
402
403       --location-enable-agps-msa
404              Enable A-GPS (MSA) support. This  command  does  not  implicitly
405              start the GPS engine, it just specifies that A-GPS should be en‐
406              abled when the engine is started. Therefore, the user should re‐
407              quest  enabling A-GPS before the raw or NMEA outputs are enabled
408              with --location-enable-gps-raw or --location-enable-gps-nmea.
409
410       --location-disable-agps-msa
411              Disable A-GPS (MSA) support.
412
413       --location-enable-agps-msb
414              Enable A-GPS (MSB) support. This  command  does  not  implicitly
415              start the GPS engine, it just specifies that A-GPS should be en‐
416              abled when the engine is started. Therefore, the user should re‐
417              quest  enabling A-GPS before the raw or NMEA outputs are enabled
418              with --location-enable-gps-raw or --location-enable-gps-nmea.
419
420       --location-disable-agps-msb
421              Disable A-GPS (MSB) support.
422
423       --location-enable-gps-nmea
424              Enable location discovery  using  GPS  and  reported  with  NMEA
425              traces.
426
427              This  command will start the GPS engine, if it isn't started al‐
428              ready.
429
430       --location-disable-gps-nmea
431              Disable location discovery using GPS and NMEA traces.
432
433              If the raw output is not enabled at the same time, the  GPS  en‐
434              gine will be stopped.
435
436       --location-enable-gps-raw
437              Enable  location discovery using GPS and reported with raw (i.e.
438              longitude/latitude) values.
439
440              This command will start the GPS engine, if it isn't started  al‐
441              ready.
442
443       --location-disable-gps-raw
444              Disable location discovery using GPS and raw values.
445
446              If  the NMEA output is not enabled at the same time, the GPS en‐
447              gine will be stopped.
448
449       --location-enable-cdma-bs
450              Enable location discovery using the 3GPP2 network.
451
452       --location-disable-cdma-bs
453              Disable location discovery using the 3GPP2 network.
454
455       --location-enable-gps-unmanaged
456              Enable location discovery using GPS but without  taking  control
457              of  the NMEA tty port. This allows other programs, e.g. gpsd, to
458              use the NMEA tty once the GPS engine has been enabled.
459
460       --location-disable-gps-unmanaged
461              Disable location discovery using GPS and unmanaged port.
462
463       --location-set-gps-refresh-rate=SEC
464              Set the location refresh rate on the DBus interface to SEC  sec‐
465              onds. If set to 0, the new location is published on the DBus in‐
466              terface as soon as ModemManager detects it.
467
468       --location-set-supl-server=[IP:PORT]             or             --loca‐
469       tion-set-supl-server=[FQDN:PORT]
470              Configure the location of the A-GPS SUPL server, either specify‐
471              ing the IP address (IP:PORT) or specifyng a fully qualified  do‐
472              main name ([FQDN:PORT]).
473
474       --location-inject-assistance-data=[PATH]
475              Inject assistance data into the GNSS module, loaded from a local
476              file at PATH. The assistance data should be in a format expected
477              by the device, e.g. downloaded from the URLs exposed by the 'As‐
478              sistanceDataServers' property.
479
480       --location-set-enable-signal
481              Enable reporting location updates  via  DBus  property  signals.
482              This is required if applications rely on listening to 'Location'
483              property updates, instead of explicit queries with  the  policy-
484              protected 'GetLocation' method.
485
486              This DBus property signal updates are by default disabled.
487
488       --location-set-disable-signal
489              Disable reporting location updates via DBus property signals.
490
491

MESSAGING OPTIONS

493       All messaging options must be used with --modem or -m.
494
495
496       --messaging-status
497              Show the status of the messaging support.
498
499       --messaging-list-sms
500              List SMS messages available on a given modem.
501
502       --messaging-create-sms=['KEY1=VALUE1,...']
503              Create  a  new SMS on a given modem. KEYs can be any of the fol‐
504              lowing:
505
506                'number'
507                        Number to which the message is addressed.
508
509                'text' Message text, in UTF-8. When sending, if  the  text  is
510                       larger  than  the limit of the technology or modem, the
511                       message will be broken into multiple parts or messages.
512                       Note  that  text  and  data are never given at the same
513                       time.
514
515                'smsc' Indicates the SMS service center number.
516
517                'validity'
518                       Specifies when the SMS expires in the SMSC.
519
520                'class'
521                       3GPP message class (0..3).
522
523                'delivery-report-request'
524                       Specifies whether delivery  report  is  requested  when
525                       sending the SMS ('yes' or 'no')
526
527                'storage'
528                       Specifies the storage where this message is kept. Stor‐
529                       ages may be 'sm', 'me', 'mt', 'sr', 'bm', 'ta'.
530
531       --messaging-create-sms-with-data=PATH
532              Use PATH to a filename as the data to create a new SMS.
533
534       --messaging-delete-sms=[PATH|INDEX]
535              Delete an SMS from a given modem.
536
537

TIME OPTIONS

539       All time operations require the --modem or -m option.
540
541
542       --time Display the current network time from  the  operator.  This  in‐
543              cludes the timezone which is usually of importance.
544
545

VOICE OPTIONS

547       All voice operations require the --modem or -m option.
548
549
550       --voice-list-calls
551              List calls managed (initiated, received, ongoing) on a given mo‐
552              dem.
553
554       --voice-create-call=['KEY1=VALUE1,...']
555              Create a new outgoing call on a given modem. KEYs can be any  of
556              the following:
557
558                'number'
559                       Number to call.
560
561       --voice-delete-call=[PATH|INDEX]
562              Delete a call from a given modem.
563
564

FIRMWARE OPTIONS

566       All firmware options require the --modem or -m option.
567
568
569       --firmware-status
570              Show firmware update specific details and properties.
571
572       --firmware-list
573              List all the firmware images installed on a given modem.
574
575       --firmware-select=ID
576              Select a firmware image from those installed on a given modem. A
577              list  of  available  firmware  images  can  be  seen  using  the
578              --firmware-list option.
579
580              The ID provided is a UNIQUE identifier for the firmware.
581
582

SIGNAL OPTIONS

584       All signal options require the --modem or -m option.
585
586
587       --signal-setup=[Rate]
588              Setup extended signal quality information retrieval at the spec‐
589              ified rate (in seconds).
590
591              By default this is disabled (rate set to 0).
592
593       --signal-get
594              Retrieve the last extended signal quality information loaded.
595
596

OMA OPTIONS

598       All OMA options require the --modem or -m option.
599
600
601       --oma-status
602              Show the status of the OMA device management subsystem.
603
604       --oma-start-client-initiated-session=[SESSION TYPE]
605              Request to start a client initiated session.
606
607              The given session type must be one of:
608               'client-initiated-device-configure'
609               'client-initiated-prl-update'
610               'client-initiated-hands-free-activation'
611
612       --oma-accept-network-initiated-session=[SESSION ID]
613              Request to accept a network initiated session.
614
615       --oma-reject-network-initiated-session=[SESSION ID]
616              Request to reject a network initiated session.
617
618       --oma-cancel-session
619              Request to cancel current OMA session, if any.
620
621

SIM OPTIONS

623       --pin=PIN
624              Send PIN code to a given SIM card.
625
626       --puk=PUK
627              Send PUK code to a given SIM card. This must be used WITH --pin.
628
629       --enable-pin
630              Enable PIN request for a given SIM card. This must be used  WITH
631              --pin.
632
633       --disable-pin
634              Disable PIN request for a given SIM card. This must be used WITH
635              --pin.
636
637       --change-pin=PIN
638              Change the PIN for a given SIM card. It will be set to PIN. This
639              must be used WITH --pin to supply the old PIN number.
640
641

BEARER OPTIONS

643       All bearer options require the --bearer or -b option.
644
645
646       -c, --connect
647              Connect to a given bearer.
648
649       -x, --disconnect
650              Disconnect from a given bearer.
651
652

SMS OPTIONS

654       All SMS options require the --sms or -s option.
655
656
657       --send Send an SMS.
658
659       --store
660              This option will store the SMS in the default storage defined by
661              the modem, which may be either modem-memory  or  SMS-memory.  To
662              know  what  the  existing  default storage is, see the --messag‐
663              ing-status option.
664
665
666       --store-in-storage=STORAGE
667              This option states which STORAGE to use for SMS messages.   Pos‐
668              sible values for STORAGE include:
669
670                'sm'   SIM card storage area.
671
672                'me'   Mobile equipment storage area.
673
674                'mt'   Sum of SIM and Mobile equipment storages
675
676                'sr'   Status report message storage area.
677
678                'bm'   Broadcast message storage area.
679
680                'ta'   Terminal adaptor message storage area.
681
682       --create-file-with-data=PATH
683              This  option takes an SMS that has DATA (not TEXT) and will cre‐
684              ate a local file described by PATH and store the content of  the
685              SMS there.
686
687

CALL OPTIONS

689       --start
690              Initiate an outgoing call.
691
692       --accept
693              Accept an incoming call.
694
695       --hangup
696              Reject an incoming call or hangup an ongoing one.
697
698       --send-dtmf=[0-9A-D*#]
699              Send a DTMF sequence through an ongoing call.
700
701

APPLICATION OPTIONS

703       -K, --output-keyvalue
704              Run  action  with  machine-friendly key-value output, to be used
705              e.g. by shell scripts that rely on mmcli operations.
706
707       -v, --verbose
708              Perform actions with more details reported and/or logged.
709
710       -V, --version
711              Returns the version of this program.
712
713       -a, --async
714              Use asynchronous methods. This is purely a development tool  and
715              has no practical benefit to most user operations.
716
717       --timeout=SECONDS
718              Use SECONDS for the timeout when performing operations with this
719              command. This option is useful when executing long running oper‐
720              ations, like --3gpp-scan.
721
722

EXAMPLES

724   Send the PIN to the SIM card
725       You'll need first to know which the proper path/index is for the SIM in
726       your modem:
727           $ mmcli -m 0 -K | grep "modem.generic.sim" | awk -F ": "  '{  print
728       $2 }'
729           /org/freedesktop/ModemManager1/SIM/0
730
731       And after that, you can just use the SIM index:
732           $ sudo mmcli -i 0 --pin=1234
733           successfully sent PIN code to the SIM
734
735
736   Simple connect and disconnect
737       You can launch the simple connection process like:
738           $ sudo mmcli -m 0 --simple-connect="pin=1234,apn=internet"
739           successfully connected the modem
740
741       Then, you can disconnect it like:
742           $ sudo mmcli -m 0 --simple-disconnect
743           successfully disconnected all bearers in the modem
744
745
746   3GPP network scan
747       Scanning  for  3GPP networks may really take a long time, so a specific
748       timeout must be given:
749           $ sudo mmcli -m 0 --3gpp-scan --timeout=300
750             ---------------------
751             3GPP scan | networks: 21403 - Orange SP (gprs, unknown)
752                       |           21407 - Movistar (gprs, unknown)
753                       |           21404 - YOIGO (gprs, unknown)
754                       |           21401 - vodafone ES (gprs, unknown)
755
756
757   Creating a new SMS message & storing it
758       Using the “sm” (SIM), you can do this using:
759
760           $ sudo mmcli -m 0  --messaging-create-sms="text='Hello  world',num‐
761       ber='+1234567890'"
762           Successfully created new SMS:
763               /org/freedesktop/ModemManager1/SMS/21 (unknown)
764
765           $ sudo mmcli -s 21 --store-in-storage="sm"
766           successfully stored the SMS
767
768           $ sudo mmcli -s 21
769             -------------------------------
770             General      |           dbus   path:  /org/freedesktop/ModemMan‐
771       ager1/SMS/21
772             -------------------------------
773             Content    |            number: +1234567890
774                        |              text: Hello world
775             -------------------------------
776             Properties |          PDU type: submit
777                        |             state: stored
778                        |              smsc: unknown
779                        |          validity: 0
780                        |             class: 0
781                        |           storage: sm
782                        |   delivery report: not requested
783                        | message reference: 0
784
785           $ sudo mmcli -m 0 --messaging-status
786             ----------------------------
787             Messaging | supported storages: sm, me
788                       |    default storage: me
789
790
791   Sending binary SMS messages from files
792       As you can see  below,  the  important  part  is  the  --messaging-cre‐
793       ate-sms-with-data and the PATH provided.
794
795           $ sudo mmcli -m 0 \
796                  --messaging-create-sms="number='+1234567890'" \
797                  --messaging-create-sms-with-data=/path/to/your/file
798           Successfully created new SMS:
799               /org/freedesktop/ModemManager1/SMS/22 (unknown)
800
801           $ sudo mmcli -s 22 --send
802           successfully sent the SMS
803
804
805   Listing SMS messages
806       When  the  receiver gets all the parts of the message, they can now re‐
807       cover the sent file with another mmcli command  in  their  ModemManager
808       setup:
809
810           $> sudo mmcli -m 0 --messaging-list-sms
811               /org/freedesktop/ModemManager1/SMS/0 (received)
812
813           $> sudo mmcli -s 0 --create-file-with-data=/path/to/the/output/file
814
815
816   GPS location status
817       You first need to check whether the modem has GPS-specific location ca‐
818       pabilities. Note that we’ll assume the modem is exposed as index 0;  if
819       you  have  more  than  one  modem,  just use --list-modems to check the
820       proper modem index:
821
822           $ mmcli -m 0 --location-status
823             ----------------------------
824             Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea
825                      |      enabled: none
826                      |      signals: no
827
828       The output says that the modem supports 3GPP  Location  area  code/Cell
829       ID,  GPS  raw and GPS-NMEA location sources. None is enabled yet, as we
830       didn’t enable the modem, which we can do issuing:
831
832           $ sudo mmcli -m 0 --enable
833           successfully enabled the modem
834
835           $ mmcli -m 0 --location-status
836             ----------------------------
837             Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea
838                      |      enabled: 3gpp-lac-ci
839                      |      signals: no
840
841
842   GPS location technology enabling
843       We can start the GPS engine by enabling the RAW or  NMEA  GPS  location
844       sources:
845
846           $ sudo mmcli -m 0 \
847                        --location-enable-gps-raw \
848                        --location-enable-gps-nmea
849           successfully setup location gathering
850
851       If  we  do check again the status, we’ll see the GPS-specific locations
852       are enabled:
853
854           $ mmcli -m 0 --location-status
855             --------------------------------
856             Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea
857                      |      enabled: 3gpp-lac-ci, gps-raw, gps-nmea
858                      |      signals: no
859
860
861   GPS location retrieval
862       You can query all location information at the same time with  a  single
863       command.   If  any of the specific outputs is not available, the corre‐
864       sponding section will be omitted from the output.
865
866           $ sudo mmcli -m 0 --location-get
867             -------------------------
868             3GPP location   | Mobile country code: 214
869                             | Mobile network code: 3
870                             |  Location area code: 21071
871                             |             Cell ID: 7033737
872             -------------------------
873             GPS NMEA traces | $GPGGA,,,,,,0,,,,,,,,*66
874                             | $GPRMC,,V,,,,,,,,,,N*53
875                             | $GPGSA,A,1,,,,,,,,,,,,,,,*1E
876                             | $GPGSV,4,1,16,24,,,,29,,,,05,,,,18,,,*7A
877                             | $GPGSV,4,2,16,22,,,,14,,,,11,,,,17,,,*7B
878                             | $GPGSV,4,3,16,03,,,,12,,,,30,,,,13,,,*78
879                             | $GPGSV,4,4,16,23,,,,15,,,,27,,,,07,,,*79
880                             | $GPVTG,,T,,M,,N,,K,N*2C
881
882
883   A-GPS support
884       If A-GPS is enabled before starting the GPS engine, and if a data  con‐
885       nection  is  available in the modem, the configured SUPL servers may be
886       used to obtain a faster initial position fix.
887
888       Note that the GPS engine will not be started when just A-GPS capability
889       is  enabled. An explicit output (RAW or NMEA) is required to be enabled
890       in order to start the GPS engine.
891
892           $ mmcli -m 0 --location-status
893             --------------------------------
894             Location |       capabilities:  3gpp-lac-ci,  gps-raw,  gps-nmea,
895       agps-msa, agps-msb
896                      |           enabled: 3gpp-lac-ci
897                      |           signals: no
898             -----------------------------
899             GPS      |      refresh rate: 30 seconds
900                      | a-gps supl server: supl.google.com:7276
901
902           $ sudo mmcli -m 0 --location-enable-agps-msa
903           successfully setup location gathering
904
905           $ sudo mmcli -m 0 --location-enable-gps-nmea
906           successfully setup location gathering
907
908           $ sudo mmcli -m 0 --location-enable-gps-raw
909           successfully setup location gathering
910
911
912   Injecting assistance data
913       If the modem device does not have an ongoing connection (e.g. no mobile
914       network coverage) but the system has other means to access the Internet
915       (e.g.  WiFi), the user may be able to download location assistance data
916       and inject it in the module.
917
918       E.g. If the device supports XTRA assistance data, the user may download
919       it  from  one of the servers listed by ModemManager and manually inject
920       it afterwards. The XTRA assistance data is usually  valid  for  several
921       days.
922
923           $ mmcli -m 0 --location-status
924             --------------------------------
925             Location  |         capabilities: 3gpp-lac-ci, gps-raw, gps-nmea,
926       agps-msa, agps-msb
927                      |              enabled: 3gpp-lac-ci
928                      |              signals: no
929             --------------------------------
930             GPS      |         refresh rate: 30 seconds
931                      |    a-gps supl server: supl.google.com:7276
932                      | supported assistance: xtra
933                      |      assistance    servers:    https://xtrapath3.izat
934       cloud.net/xtra3grcej.bin
935                      |                                https://xtrapath1.izat
936       cloud.net/xtra3grcej.bin
937                      |                                https://xtrapath2.izat
938       cloud.net/xtra3grcej.bin
939
940           $ wget -q https://xtrapath3.izatcloud.net/xtra3grcej.bin
941
942           $     sudo     mmcli     -m     0     --location-inject-assistance-
943       data=./xtra3grcej.bin
944           successfully injected assistance data
945
946           $ sudo mmcli -m 0 --location-enable-gps-nmea
947           successfully setup location gathering
948
949           $ sudo mmcli -m 0 --location-enable-gps-raw
950           successfully setup location gathering
951
952
953   Key-Value output
954       Writing shell scripts that use mmcli to perform operations with the mo‐
955       dem  is  easy when using the --output-keyvalue option. For example, you
956       could gather all the main status information of the modem with a single
957       call and then parse it to read single fields:
958
959           $ STATUS=$(mmcli -m 0 --output-keyvalue)
960           $  echo  "${STATUS}" | grep "modem.generic.state " | awk -F ": " '{
961       print $2 }'
962           failed
963           $ echo "${STATUS}" | grep  "modem.generic.state-failed-reason  "  |
964       awk -F ": " '{ print $2 }'
965           sim-missing
966
967

AUTHORS

969       Written  by  Martyn  Russell <martyn@lanedo.com> and Aleksander Morgado
970       <aleksander@aleksander.es>
971
972

SEE ALSO

974       ModemManager(8), NetworkManager(8)
975
976       AT (http://en.wikipedia.org/wiki/AT_commands).
977
978       3GPP (http://en.wikipedia.org/wiki/3GPP).
979
980       MCCMNC (http://en.wikipedia.org/wiki/Mobile_Network_Code).
981
982       USSD      (http://en.wikipedia.org/wiki/Unstructured_Supplementary_Ser
983       vice_Data).
984
985       CDMA (http://en.wikipedia.org/wiki/Code_division_multiple_access).
986
987       OTA (http://en.wikipedia.org/wiki/Over-the-air_programming).
988
989       GPS (http://en.wikipedia.org/wiki/Global_Positioning_System)
990
991       NMEA (http://en.wikipedia.org/wiki/NMEA_0183)
992
993
994
995GNU                              October 2012                         mmcli(1)
Impressum