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
87              information  you  can  supply DEBUG. Each value above DEBUG pro‐
88              vides less detail. In most cases ERR (for displaying errors) are
89              the 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
101              expecting 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
107              exposed 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
216              cycled.
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
228              operation is only available when ModemManager is  run  in  debug
229              mode.
230
231       --list-bearers
232              List packet data bearers that are available for the given modem.
233
234       --create-bearer=['KEY1=VALUE1,KEY2=VALUE2,...']
235              Create  a new packet data bearer for a given modem. The KEYs and
236              some VALUEs are listed below:
237
238                'apn'  Access Point Name. Required in 3GPP.
239
240                'ip-type'
241                       Addressing type.  Given  as  a  MMBearerIpFamily  value
242                       (e.g.  'ipv4',  'ipv6', 'ipv4v6'). Optional in 3GPP and
243                       CDMA.
244
245                'allowed-auth'
246                       Authentication method to use. Given  as  a  MMBearerAl‐
247                       lowedAuth                  value                  (e.g.
248                       'none|pap|chap|mschap|mschapv2|eap'). Optional in 3GPP.
249
250                'user' User name (if any) required by the network. Optional in
251                       3GPP.
252
253                'password'
254                       Password  (if any) required by the network. Optional in
255                       3GPP.
256
257                'allow-roaming'
258                       Flag to tell whether connection is allowed during roam‐
259                       ing,  given  as  a  boolean  value (i.e 'yes' or 'no').
260                       Optional in 3GPP.
261
262                'rm-protocol'
263                       Protocol of the Rm interface, given as a MMModemCdmaRm‐
264                       Protocol  value (e.g. 'async', 'packet-relay', 'packet-
265                       network-ppp',    'packet-network-slip',     'stu-iii').
266                       Optional in CDMA.
267
268                'number'
269                       Telephone number to dial. Required in POTS.
270
271       --delete-bearer=[PATH|INDEX]
272              Delete bearer from a given modem.
273
274       --set-allowed-modes=[MODE1|MODE2|...]
275              Set allowed modes for a given modem. For possible modes, see the
276              beginning of this section.
277
278       --set-preferred-mode=MODE
279              Set the preferred MODE for the given modem. The MODE MUST be one
280              of the allowed modes as set with the --set-allowed-modes option.
281              Possible MODE arguments are detailed at the  beginning  of  this
282              section.
283
284       --set-current-bands=[BAND1|BAND2|...]
285              Set  bands  to  be  used  for a given modem. These are frequency
286              ranges the modem should use. There are quite a  number  of  sup‐
287              ported bands and listing them all here would be quite extensive.
288              For details, see the MMModemBand documentation.
289
290              An example would be: 'egsm|dcs|pcs|g850' to select all  the  GSM
291              frequency bands.
292
293       --inhibit
294              Inhibit the specific modem from being used by ModemManager. This
295              method is completely equivalent to  --inhibit-device,  with  the
296              only  difference being that in this case, the modem must be man‐
297              aged by the daemon at the time the inhibition is requested.
298
299              This command will not exit right away, as that would  implicitly
300              remove the inhibition. The user must make sure to stop the mmcli
301              process hitting Ctrl+C in order to un-inhibit the device.
302
303              When a device is inhibited via this  method,  ModemManager  will
304              disable  the  modem  (therefore stopping any ongoing connection)
305              and will no longer use it until it is uninhibited.
306
307

3GPP OPTIONS

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

CDMA OPTIONS

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

SIMPLE OPTIONS

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

LOCATION OPTIONS

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

MESSAGING OPTIONS

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

TIME OPTIONS

527       All time operations require the --modem or -m option.
528
529
530       --time Display  the  current  network  time  from  the  operator.  This
531              includes the timezone which is usually of importance.
532
533

VOICE OPTIONS

535       All voice operations require the --modem or -m option.
536
537
538       --voice-list-calls
539              List  calls  managed  (initiated,  received, ongoing) on a given
540              modem.
541
542       --voice-create-call=['KEY1=VALUE1,...']
543              Create a new outgoing call on a given modem. KEYs can be any  of
544              the following:
545
546                'number'
547                       Number to call.
548
549       --voice-delete-call=[PATH|INDEX]
550              Delete a call from a given modem.
551
552

FIRMWARE OPTIONS

554       All firmware options require the --modem or -m option.
555
556
557       --firmware-status
558              Show firmware update specific details and properties.
559
560       --firmware-list
561              List all the firmware images installed on a given modem.
562
563       --firmware-select=ID
564              Select a firmware image from those installed on a given modem. A
565              list  of  available  firmware  images  can  be  seen  using  the
566              --firmware-list option.
567
568              The ID provided is a UNIQUE identifier for the firmware.
569
570

SIGNAL OPTIONS

572       All signal options require the --modem or -m option.
573
574
575       --signal-setup=[Rate]
576              Setup extended signal quality information retrieval at the spec‐
577              ified rate (in seconds).
578
579              By default this is disabled (rate set to 0).
580
581       --signal-get
582              Retrieve the last extended signal quality information loaded.
583
584

OMA OPTIONS

586       All OMA options require the --modem or -m option.
587
588
589       --oma-status
590              Show the status of the OMA device management subsystem.
591
592       --oma-start-client-initiated-session=[SESSION TYPE]
593              Request to start a client initiated session.
594
595              The given session type must be one of:
596               'client-initiated-device-configure'
597               'client-initiated-prl-update'
598               'client-initiated-hands-free-activation'
599
600       --oma-accept-network-initiated-session=[SESSION ID]
601              Request to accept a network initiated session.
602
603       --oma-reject-network-initiated-session=[SESSION ID]
604              Request to reject a network initiated session.
605
606       --oma-cancel-session
607              Request to cancel current OMA session, if any.
608
609

SIM OPTIONS

611       --pin=PIN
612              Send PIN code to a given SIM card.
613
614       --puk=PUK
615              Send PUK code to a given SIM card. This must be used WITH --pin.
616
617       --enable-pin
618              Enable PIN request for a given SIM card. This must be used  WITH
619              --pin.
620
621       --disable-pin
622              Disable PIN request for a given SIM card. This must be used WITH
623              --pin.
624
625       --change-pin=PIN
626              Change the PIN for a given SIM card. It will be set to PIN. This
627              must be used WITH --pin to supply the old PIN number.
628
629

BEARER OPTIONS

631       All bearer options require the --bearer or -b option.
632
633
634       -c, --connect
635              Connect to a given bearer.
636
637       -x, --disconnect
638              Disconnect from a given bearer.
639
640

SMS OPTIONS

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

CALL OPTIONS

677       --start
678              Initiate an outgoing call.
679
680       --accept
681              Accept an incoming call.
682
683       --hangup
684              Reject an incoming call or hangup an ongoing one.
685
686       --send-dtmf=[0-9A-D*#]
687              Send a DTMF sequence through an ongoing call.
688
689

APPLICATION OPTIONS

691       -K, --output-keyvalue
692              Run  action  with  machine-friendly key-value output, to be used
693              e.g. by shell scripts that rely on mmcli operations.
694
695       -v, --verbose
696              Perform actions with more details reported and/or logged.
697
698       -V, --version
699              Returns the version of this program.
700
701       -a, --async
702              Use asynchronous methods. This is purely a development tool  and
703              has no practical benefit to most user operations.
704
705       --timeout=SECONDS
706              Use SECONDS for the timeout when performing operations with this
707              command. This option is useful when executing long running oper‐
708              ations, like --3gpp-scan.
709
710

EXAMPLES

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

AUTHORS

957       Written  by  Martyn  Russell <martyn@lanedo.com> and Aleksander Morgado
958       <aleksander@aleksander.es>
959
960

SEE ALSO

962       ModemManager(8), NetworkManager(8)
963
964       AT (http://en.wikipedia.org/wiki/AT_commands).
965
966       3GPP (http://en.wikipedia.org/wiki/3GPP).
967
968       MCCMNC (http://en.wikipedia.org/wiki/Mobile_Network_Code).
969
970       USSD      (http://en.wikipedia.org/wiki/Unstructured_Supplementary_Ser
971       vice_Data).
972
973       CDMA (http://en.wikipedia.org/wiki/Code_division_multiple_access).
974
975       OTA (http://en.wikipedia.org/wiki/Over-the-air_programming).
976
977       GPS (http://en.wikipedia.org/wiki/Global_Positioning_System)
978
979       NMEA (http://en.wikipedia.org/wiki/NMEA_0183)
980
981
982
983GNU                              October 2012                         mmcli(1)
Impressum