Establishing connections to multiple PDPs simultaneously with MBIM
Bjørn Mork
bjorn at mork.no
Wed Aug 5 11:02:37 PDT 2015
Dan Williams <dcbw at redhat.com> writes:
> Neal, can you try the attached patch to libmibm?
>
> ip link add link wwan0 name wwan0.1 type vlan id 1
> mbimcli -d /dev/cdc-wdm0 --connect=1:<apn>
> < assign IP and stuff to wwan0.1 >
> mbimcli -d /dev/cdc-wdm0 --query-connect-status=1
> mbimcli -d /dev/cdc-wdm0 --disconnect=1
>
> See if that works, I haven't tested it myself. And Bjorn may show up to
> tell us we're all crazy and this isn't how it's done...
Looks mostly good to me. I'm still missing the 'IP type' option so that
I could actually make these APNs behave differently, but the session
mapping seems to work for connect and disconnect:
bjorn at nemi:~$ mbimcli -d /dev/cdc-wdm0 --no-close --no-open=3 --connect=0:telenor.smart
[/dev/cdc-wdm0] Successfully connected
[/dev/cdc-wdm0] Connection status:
Session ID: '0'
Activation state: 'activated'
Voice call state: 'none'
IP type: 'ipv4'
Context type: 'internet'
Network error: 'unknown'
[/dev/cdc-wdm0] IPv4 configuration available: 'address, gateway, dns'
IP [0]: '10.130.121.151/24'
Gateway: '10.130.121.1'
DNS [0]: '193.213.112.4'
DNS [1]: '130.67.15.198'
[/dev/cdc-wdm0] IPv6 configuration available: 'none'
[/dev/cdc-wdm0] Session not closed:
TRID: '5'
bjorn at nemi:~$ mbimcli -d /dev/cdc-wdm0 --no-close --no-open=3 --connect=1:telenor
[/dev/cdc-wdm0] Successfully connected
[/dev/cdc-wdm0] Connection status:
Session ID: '1'
Activation state: 'activated'
Voice call state: 'none'
IP type: 'ipv4'
Context type: 'internet'
Network error: 'unknown'
[/dev/cdc-wdm0] IPv4 configuration available: 'address, gateway, dns'
IP [0]: '10.125.165.117/24'
Gateway: '10.125.165.1'
DNS [0]: '193.213.112.4'
DNS [1]: '130.67.15.198'
[/dev/cdc-wdm0] IPv6 configuration available: 'none'
[/dev/cdc-wdm0] Session not closed:
TRID: '5'
Note that I prefer to use the optional session #0 to VLAN ID 4094
mapping for consistency. But I use a .0 name matching the MBIM session
ID:
ip link add link wwan0 name wwan0.0 type vlan id 4094
ip link add link wwan0 name wwan0.1 type vlan id 1
ip link set wwan0 up
ifconfig wwan0.0 10.130.121.151/24
ifconfig wwan0.1 10.125.165.117/24
ip route add 198.145.20.140 dev wwan0.0
ip route add 72.51.34.34 dev wwan0.1
ping 198.145.20.140
ping 72.51.34.34
wwan0 Link encap:Ethernet HWaddr 8e:64:d0:65:2c:e9
inet6 addr: fe80::8c64:d0ff:fe65:2ce9/64 Scope:Link
UP BROADCAST RUNNING NOARP MULTICAST MTU:1428 Metric:1
RX packets:78 errors:0 dropped:0 overruns:0 frame:0
TX packets:126 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4656 (4.5 KiB) TX bytes:7536 (7.3 KiB)
wwan0.0 Link encap:Ethernet HWaddr 8e:64:d0:65:2c:e9
inet addr:10.130.121.151 Bcast:10.130.121.255 Mask:255.255.255.0
inet6 addr: fe80::8c64:d0ff:fe65:2ce9/64 Scope:Link
UP BROADCAST RUNNING NOARP MULTICAST MTU:1428 Metric:1
RX packets:45 errors:0 dropped:0 overruns:0 frame:0
TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2616 (2.5 KiB) TX bytes:5908 (5.7 KiB)
wwan0.1 Link encap:Ethernet HWaddr 8e:64:d0:65:2c:e9
inet addr:10.125.165.117 Bcast:10.125.165.255 Mask:255.255.255.0
inet6 addr: fe80::8c64:d0ff:fe65:2ce9/64 Scope:Link
UP BROADCAST RUNNING NOARP MULTICAST MTU:1428 Metric:1
RX packets:33 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2040 (1.9 KiB) TX bytes:3392 (3.3 KiB)
Looks like something went wrong with the connection-state part of the
patch:
bjorn at nemi:~$ mbimcli -v -d /dev/cdc-wdm0 --no-close --no-open=3 --query-connection-state=1
[05 Aug 2015, 19:58:03] [Debug] opening device...
[05 Aug 2015, 19:58:04] [Debug] [/dev/cdc-wdm0] Queried max control message size: 512
[05 Aug 2015, 19:58:04] [Debug] MBIM Device at '/dev/cdc-wdm0' ready
Segmentation fault
Bjørn
More information about the libmbim-devel
mailing list