[PATCH 0/2] support multiple bearers over MBIM

Bjørn Mork bjorn at mork.no
Thu Jun 5 04:51:13 PDT 2014


MBIM modems can multiplex IP sessions over a single data port.
This series is an attempt to implement the missing parts.  Example
output with these patches applied and two bearers connected:

bjorn at nemi:~$ mmcli -m 0 

/org/freedesktop/ModemManager1/Modem/0 (device id 'd4f9081cf51f562690a9c873a7bda6706ccff777')
  -------------------------
  Hardware |   manufacturer: 'Generic'
           |          model: 'MBIM [1199:A001]'
           |       revision: 'FIH7160_V1.1_MODEM_01.1349.12'
           |      supported: 'gsm-umts, lte'
           |        current: 'gsm-umts, lte'
           |   equipment id: '013937000536191'
  -------------------------
  System   |         device: '/sys/devices/pci0000:00/0000:00:1d.7/usb3/3-4'
           |        drivers: 'cdc_acm, cdc_mbim'
           |         plugin: 'Generic'
           |   primary port: 'cdc-wdm0'
           |          ports: 'cdc-wdm0 (mbim), wwan0 (net), ttyACM0 (at)'
  -------------------------
  Numbers  |           own : 'unknown'
  -------------------------
  Status   |           lock: 'none'
           | unlock retries: 'sim-pin (3)'
           |          state: 'connected'
           |    power state: 'on'
           |    access tech: 'lte'
           | signal quality: '25' (cached)
  -------------------------
  Modes    |      supported: 'allowed: 2g, 3g, 4g; preferred: none'
           |        current: 'allowed: 2g, 3g, 4g; preferred: none'
  -------------------------
  Bands    |      supported: 'unknown'
           |        current: 'unknown'
  -------------------------
  IP       |      supported: 'ipv4, ipv6, ipv4v6'
  -------------------------
  3GPP     |           imei: '013937000536191'
           |  enabled locks: 'sim, fixed-dialing'
           |    operator id: '24201'
           |  operator name: 'N Telenor'
           |   subscription: 'provisioned'
           |   registration: 'home'
  -------------------------
  SIM      |           path: '/org/freedesktop/ModemManager1/SIM/0'

  -------------------------
  Bearers  |          paths: '/org/freedesktop/ModemManager1/Bearer/1, /org/freedesktop/ModemManager1/Bearer/0'


bjorn at nemi:~$ mmcli -b 1
Bearer '/org/freedesktop/ModemManager1/Bearer/1'
  -------------------------
  Status             |   connected: 'yes'
                     |   suspended: 'no'
                     |   interface: 'cdc-wdm0'
                     |  IP timeout: '20'
  -------------------------
  Properties         |         apn: 'telenor'
                     |     roaming: 'allowed'
                     |     IP type: 'ipv4'
                     |        user: 'none'
                     |    password: 'none'
                     |      number: 'none'
                     | Rm protocol: 'unknown'
  -------------------------
  IPv4 configuration |   method: 'static'
                     |  address: '10.122.207.60'
                     |   prefix: '24'
                     |  gateway: '10.122.207.1'
                     |      DNS: '193.213.112.4', '130.67.15.198'
  -------------------------
  IPv6 configuration |   method: 'unknown'
bjorn at nemi:~$ mmcli -b 0
Bearer '/org/freedesktop/ModemManager1/Bearer/0'
  -------------------------
  Status             |   connected: 'yes'
                     |   suspended: 'no'
                     |   interface: 'cdc-wdm0'
                     |  IP timeout: '20'
  -------------------------
  Properties         |         apn: 'telenor.mobil'
                     |     roaming: 'allowed'
                     |     IP type: 'ipv6'
                     |        user: 'none'
                     |    password: 'none'
                     |      number: 'none'
                     | Rm protocol: 'unknown'
  -------------------------
  IPv4 configuration |   method: 'unknown'
  -------------------------
  IPv6 configuration |   method: 'static'
                     |  address: 'fe80::1c:a445:f001'
                     |   prefix: '120'
                     |  gateway: 'fe80::1c:a445:f002'
                     |      DNS: '2001:4600:4:fff::54', '2001:4600:4:1fff::54'


bjorn at nemi:~$ ifconfig wwan0
wwan0     Link encap:Ethernet  HWaddr 7e:82:d4:49:31:cc  
          inet6 addr: fe80::7c82:d4ff:fe49:31cc/64 Scope:Link
          UP BROADCAST RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:51 errors:0 dropped:0 overruns:0 frame:0
          TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:8346 (8.1 KiB)  TX bytes:4709 (4.5 KiB)

bjorn at nemi:~$ ifconfig wwan0.0
wwan0.0   Link encap:Ethernet  HWaddr 7e:82:d4:49:31:cc  
          inet6 addr: 2a02:2121:1:8360:7c82:d4ff:fe49:31cc/64 Scope:Global
          inet6 addr: fe80::7c82:d4ff:fe49:31cc/64 Scope:Link
          UP BROADCAST RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:33 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7338 (7.1 KiB)  TX bytes:2809 (2.7 KiB)

bjorn at nemi:~$ ifconfig wwan0.1
wwan0.1   Link encap:Ethernet  HWaddr 7e:82:d4:49:31:cc  
          inet addr:10.122.207.60  Bcast:10.122.207.255  Mask:255.255.255.0
          inet6 addr: fe80::7c82:d4ff:fe49:31cc/64 Scope:Link
          UP BROADCAST RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:18 errors:0 dropped:0 overruns:0 frame:0
          TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1008 (1008.0 B)  TX bytes:2726 (2.6 KiB)


There is currently no way to figure out the corresponding MBIM session ID,
short of guessing.  It is saved as a private property of the MMBearerMbim
object, but should probably be made available through the cli somehow.



Bjørn Mork (2):
  broadband-modem-mbim: allow "max_sessions" bearers
  bearer-mbim: all bearers share one MBIM data port

 src/mm-bearer-mbim.c          |  4 +---
 src/mm-broadband-modem-mbim.c | 39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 3 deletions(-)

-- 
2.0.0



More information about the ModemManager-devel mailing list