mmcli connectin with IPv4 works, question about keys

Aleksander Morgado aleksander at lanedo.com
Mon Aug 27 02:02:04 PDT 2012


> hpmini:~ # mmcli -m 0 --simple-connect="apn=internet.telekom,ip-type=ipv4" --
> verbose
> [24 Aug 2012, 20:56:25] [Debug] Forcing request to be run asynchronously
> [24 Aug 2012, 20:56:25] [Debug] Assuming '0' is the modem index                         
> [24 Aug 2012, 20:56:25] [Debug] ModemManager process found at ':1.25'                   
> [24 Aug 2012, 20:56:25] [Debug] Modem found at 
> '/org/freedesktop/ModemManager1/Modem/0' 
>                                                                                         
> [24 Aug 2012, 20:56:25] [Debug] Asynchronously connecting the modem...
> successfully connected the modem                                                         
> 
>                                                                                                   
>   dhcpcd wwan0                                                                                    
>                                                                                                   
>              NETWORK is free to use                                                                      
> 
>   dhcpcd -x wwan0
> 
> 
> hpmini:~ # mmcli -m 0 --simple-disconnect
> successfully disconnected all bearers in the modem
> 

Good.

> 
> Where can I find a list of valid keys/values, like apn and ip-type?
> 

For the list of keys, check the Connect() method here:
http://www.lanedo.com/~aleksander/modem-manager/api-20120827/gdbus-org.freedesktop.ModemManager1.Modem.Simple.html

If the value of the key is given as an enum, you'll need to pass the
value as a string representing the enum, just get the suffix of the enum
and lowercase it (what glib-mkenums does to get the 'nick' of the enum).
For the 'bands', just provide a list of those lowercase suffixes
enclosed in singlequotes. E.g.:

simple-connect="bands='egsm,dcs,pcs,g850',ip-type=ipv4"



> Is there a possibility to force 3g-mode?
> 

It should be doable passing:
    "allowed-mode=3g"

'allowed-modes' is also a list, so you can also pass:
    "allowed-modes='2g,3g,4g'"

Note that setting allowed modes is not always supported, so it may not work.

If you could test those with your modem it would be great :-)

Cheers!

-- 
Aleksander


More information about the libqmi-devel mailing list