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       --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').
257                       Optional 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').
263                       Optional 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       --inhibit
291              Inhibit the specific modem from being used by ModemManager. This
292              method is completely equivalent to  --inhibit-device,  with  the
293              only  difference being that in this case, the modem must be man‐
294              aged by the daemon at the time the inhibition is requested.
295
296              This command will not exit right away, as that would  implicitly
297              remove the inhibition. The user must make sure to stop the mmcli
298              process hitting Ctrl+C in order to un-inhibit the device.
299
300              When a device is inhibited via this  method,  ModemManager  will
301              disable  the  modem  (therefore stopping any ongoing connection)
302              and will no longer use it until it is uninhibited.
303
304

3GPP OPTIONS

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

CDMA OPTIONS

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

SIMPLE OPTIONS

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

LOCATION OPTIONS

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

MESSAGING OPTIONS

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

TIME OPTIONS

535       All time operations require the --modem or -m option.
536
537
538       --time Display  the  current  network  time  from  the  operator.  This
539              includes the timezone which is usually of importance.
540
541

VOICE OPTIONS

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

FIRMWARE OPTIONS

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

SIGNAL OPTIONS

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

OMA OPTIONS

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

SIM OPTIONS

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

BEARER OPTIONS

639       All bearer options require the --bearer or -b option.
640
641
642       -c, --connect
643              Connect to a given bearer.
644
645       -x, --disconnect
646              Disconnect from a given bearer.
647
648

SMS OPTIONS

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

CALL OPTIONS

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

APPLICATION OPTIONS

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

EXAMPLES

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

AUTHORS

965       Written by Martyn Russell <martyn@lanedo.com>  and  Aleksander  Morgado
966       <aleksander@aleksander.es>
967
968

SEE ALSO

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