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       --3gpp-disable-facility-lock=FACILITY,CONTROL_KEY
355              Disable selected facility lock using provided control key.
356
357                'FACILITY'
358                       One of the following types of lock:
359                         'net-pers'  - network personalization
360                         'net-sub-pers'  - network subset personalization
361                         'provider-pers' - provider personalization
362                         'corp-pers' - corporate personalization
363
364                'CONTROL_KEY'
365                       Alphanumeric code to unlock facility.
366
367

CDMA OPTIONS

369       All CDMA (Code Division Multiple Access) options require the --modem or
370       -m option.
371
372
373       --cdma-activate=CARRIER
374              Activate  the given modem using OTA (Over the Air) settings. The
375              CARRIER is a code provided by the network for the  default  set‐
376              tings they provide.
377
378

SIMPLE OPTIONS

380       All simple options must be used with --modem or -m.
381
382
383       --simple-connect=['KEY1=VALUE1,KEY2=VALUE2,...']
384              Run a full connection sequence using KEY / VALUE pairs.  You can
385              use the --create-bearer options, plus any of the following ones:
386
387                'pin'  SIM-PIN unlock code.
388
389                'operator-id'
390                       ETSI MCC-MNC of a network to force registration.
391
392       --simple-disconnect
393              Disconnect ALL connected bearers for a given modem.
394
395

LOCATION OPTIONS

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

MESSAGING OPTIONS

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

TIME OPTIONS

552       All time operations require the --modem or -m option.
553
554
555       --time Display the current network time from  the  operator.  This  in‐
556              cludes the timezone which is usually of importance.
557
558

VOICE OPTIONS

560       All voice operations require the --modem or -m option.
561
562
563       --voice-list-calls
564              List calls managed (initiated, received, ongoing) on a given mo‐
565              dem.
566
567       --voice-create-call=['KEY1=VALUE1,...']
568              Create a new outgoing call on a given modem. KEYs can be any  of
569              the following:
570
571                'number'
572                       Number to call.
573
574       --voice-delete-call=[PATH|INDEX]
575              Delete a call from a given modem.
576
577

FIRMWARE OPTIONS

579       All firmware options require the --modem or -m option.
580
581
582       --firmware-status
583              Show firmware update specific details and properties.
584
585       --firmware-list
586              List all the firmware images installed on a given modem.
587
588       --firmware-select=ID
589              Select a firmware image from those installed on a given modem. A
590              list  of  available  firmware  images  can  be  seen  using  the
591              --firmware-list option.
592
593              The ID provided is a UNIQUE identifier for the firmware.
594
595

SIGNAL OPTIONS

597       All signal options require the --modem or -m option.
598
599
600       --signal-setup=[Rate]
601              Setup extended signal quality information retrieval at the spec‐
602              ified rate (in seconds).
603
604              By default this is disabled (rate set to 0).
605
606       --signal-get
607              Retrieve the last extended signal quality information loaded.
608
609

OMA OPTIONS

611       All OMA options require the --modem or -m option.
612
613
614       --oma-status
615              Show the status of the OMA device management subsystem.
616
617       --oma-start-client-initiated-session=[SESSION TYPE]
618              Request to start a client initiated session.
619
620              The given session type must be one of:
621               'client-initiated-device-configure'
622               'client-initiated-prl-update'
623               'client-initiated-hands-free-activation'
624
625       --oma-accept-network-initiated-session=[SESSION ID]
626              Request to accept a network initiated session.
627
628       --oma-reject-network-initiated-session=[SESSION ID]
629              Request to reject a network initiated session.
630
631       --oma-cancel-session
632              Request to cancel current OMA session, if any.
633
634

SIM OPTIONS

636       --pin=PIN
637              Send PIN code to a given SIM card.
638
639       --puk=PUK
640              Send PUK code to a given SIM card. This must be used WITH --pin.
641
642       --enable-pin
643              Enable PIN request for a given SIM card. This must be used  WITH
644              --pin.
645
646       --disable-pin
647              Disable PIN request for a given SIM card. This must be used WITH
648              --pin.
649
650       --change-pin=PIN
651              Change the PIN for a given SIM card. It will be set to PIN. This
652              must be used WITH --pin to supply the old PIN number.
653
654

BEARER OPTIONS

656       All bearer options require the --bearer or -b option.
657
658
659       -c, --connect
660              Connect to a given bearer.
661
662       -x, --disconnect
663              Disconnect from a given bearer.
664
665

SMS OPTIONS

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

CALL OPTIONS

702       --start
703              Initiate an outgoing call.
704
705       --accept
706              Accept an incoming call.
707
708       --hangup
709              Reject an incoming call or hangup an ongoing one.
710
711       --send-dtmf=[0-9A-D*#]
712              Send a DTMF sequence through an ongoing call.
713
714

APPLICATION OPTIONS

716       -J, --output-json
717              Run action with machine-friendly JSON output, to be used e.g. by
718              shell scripts that rely on mmcli operations.
719
720       -K, --output-keyvalue
721              Run action with machine-friendly key-value output,  to  be  used
722              e.g. by shell scripts that rely on mmcli operations.
723
724       -v, --verbose
725              Perform actions with more details reported and/or logged.
726
727       -V, --version
728              Returns the version of this program.
729
730       -a, --async
731              Use  asynchronous methods. This is purely a development tool and
732              has no practical benefit to most user operations.
733
734       --timeout=SECONDS
735              Use SECONDS for the timeout when performing operations with this
736              command. This option is useful when executing long running oper‐
737              ations, like --3gpp-scan.
738
739

EXAMPLES

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

AUTHORS

986       Written by Martyn Russell <martyn@lanedo.com>  and  Aleksander  Morgado
987       <aleksander@aleksander.es>
988
989

SEE ALSO

991       ModemManager(8), NetworkManager(8)
992
993       AT (http://en.wikipedia.org/wiki/AT_commands).
994
995       3GPP (http://en.wikipedia.org/wiki/3GPP).
996
997       MCCMNC (http://en.wikipedia.org/wiki/Mobile_Network_Code).
998
999       USSD      (http://en.wikipedia.org/wiki/Unstructured_Supplementary_Ser
1000       vice_Data).
1001
1002       CDMA (http://en.wikipedia.org/wiki/Code_division_multiple_access).
1003
1004       OTA (http://en.wikipedia.org/wiki/Over-the-air_programming).
1005
1006       GPS (http://en.wikipedia.org/wiki/Global_Positioning_System)
1007
1008       NMEA (http://en.wikipedia.org/wiki/NMEA_0183)
1009
1010
1011
1012GNU                              October 2012                         mmcli(1)
Impressum