@@ -294,6 +294,7 @@ There are 4 main types of interfaces:
294294* **wireless interfaces **: must be of type ``wireless ``
295295* **bridge interfaces **: must be of type ``bridge ``
296296* **dialup interfaces **: must be of type ``dialup ``
297+ * **modem manager interfaces **: must be of type ``modem-manager ``
297298
298299Interface object extensions
299300~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1259,6 +1260,83 @@ Will be rendered as follows::
12591260 option password 'jf93nf82o023$'
12601261 option mtu '1448'
12611262
1263+ Modem Manager settings
1264+ ----------------------
1265+
1266+ Interfaces of type ``modem-manager `` contain a few options
1267+ that are specific to modem-manager interfaces (2G, 3G, 4G, LTE, etc).
1268+
1269+ These are the ``OpenWrt `` backend NetJSON extensions for Modem Manager interfaces:
1270+
1271+ +--------------+---------+-----------------+--------------------------------------------+
1272+ | key name | type | default | allowed values |
1273+ +==============+=========+=================+============================================+
1274+ | ``proto `` | string | ``modemanager `` | ``modemanager `` |
1275+ +--------------+---------+-----------------+--------------------------------------------+
1276+ | ``apn `` | string | empty | APN, can be left blank |
1277+ +--------------+---------+-----------------+--------------------------------------------+
1278+ | ``pin `` | string | empty | PIN code, can be left blank |
1279+ +--------------+---------+-----------------+--------------------------------------------+
1280+ | ``device `` | string | empty | path to device (see note below) |
1281+ +--------------+---------+-----------------+--------------------------------------------+
1282+ | ``password `` | string | empty | password, can be left blank |
1283+ +--------------+---------+-----------------+--------------------------------------------+
1284+ | ``username `` | string | empty | username, can be left blank |
1285+ +--------------+---------+-----------------+--------------------------------------------+
1286+ | ``metric `` | integer | ``50 `` | metric, can be left blank |
1287+ +--------------+---------+-----------------+--------------------------------------------+
1288+ | ``iptype `` | string | ``ipv4 `` | One of ``ipv4 ``, ``ipv6 ``, ``ipv4v6 `` |
1289+ +--------------+---------+-----------------+--------------------------------------------+
1290+ | ``lowpower `` | boolean | ``False `` | low power mode |
1291+ +--------------+---------+-----------------+--------------------------------------------+
1292+
1293+ .. note ::
1294+ ``device `` is a required property but can be left empty so that
1295+ the default value supplied by the hardware itself and already
1296+ present on the device can be left untouched by merging the
1297+ configuration generated with netjsonconfig
1298+ (instead of fully overwriting it).
1299+
1300+ Modem Manager interface example
1301+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1302+
1303+ The following *configuration dictionary *:
1304+
1305+ .. code-block :: python
1306+
1307+ {
1308+ " interfaces" : [
1309+ {
1310+ " type" : " modem-manager" ,
1311+ " apn" : " apn.operator.com" ,
1312+ " pin" : " 1234" ,
1313+ " device" : " /sys/devices/platform/ahb/1b000000.usb/usb1/1-1" ,
1314+ " username" : " user123" ,
1315+ " password" : " pwd123456" ,
1316+ " metric" : 50 ,
1317+ " lowpower" : False ,
1318+ " name" : " modem0" ,
1319+ " mtu" : 1500
1320+ }
1321+ ]
1322+ }
1323+
1324+ Will be rendered as follows::
1325+
1326+ package network
1327+
1328+ config interface 'modem0'
1329+ option apn 'apn.operator.com'
1330+ option device '/sys/devices/platform/ahb/1b000000.usb/usb1/1-1'
1331+ option ifname 'wwan0'
1332+ option lowpower '0'
1333+ option metric '50'
1334+ option mtu '1500'
1335+ option password 'pwd123456'
1336+ option pincode '1234'
1337+ option proto 'modemmanager'
1338+ option username 'user123'
1339+
12621340Radio settings
12631341--------------
12641342
0 commit comments