# How to connect via qmi\_wwan on Ubuntu?

**URL:** <https://forum.sierrawireless.com/t/how-to-connect-via-qmi-wwan-on-ubuntu/7365>\
**Category:** MC/EM Series\
**Created:** [August 5, 2014, 7:42am UTC](https://forum.sierrawireless.com/t/how-to-connect-via-qmi-wwan-on-ubuntu/7365 "2014-08-05T07:42:25Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![aleksander0m](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/aleksander0m/32/1774_2.png) [@aleksander0m](https://forum.sierrawireless.com/u/aleksander0m)\
**Post date:** [March 3, 2015, 5:13pm UTC](https://forum.sierrawireless.com/t/how-to-connect-via-qmi-wwan-on-ubuntu/7365/4 "2015-03-03T17:13:06Z")

</div>

> [@ljbade](#):
>
> I managed to figure it out thanks to this nugget of gold [lists.freedesktop.org/archives/l … 00875.html](http://lists.freedesktop.org/archives/libqmi-devel/2014-July/000875.html):
> 
> > [@](#):
> >
> > Newer Sierra modems like the MC73XX series will expose two pairs of  
> > /dev/cdc-wdm (QMI) and wwan ports (usb interfaces 8 and 10). If you  
> > try to play with both you’ll likely see that both reply to QMI but  
> > only one of the pairs gets correctly connected…
> > 
> > The thing is that one pair comes by default with 802.3 ethernet frames  
> > configuration in the wwan interface, which is the one that the  
> > qmi\_wwan kernel driver expects. The other pair comes with raw-ip  
> > packet configuration in the wwan interface, so you won’t be able to  
> > use that pair directly with the qmi\_wwan driver, _unless_ you request  
> > to change that via e.g. qmicli  
> > –device-open-net=“net-802-3|net-no-qos-header” or qmicli  
> > –wda-set-data-format=“802-3”. ModemManager does the device-open-net  
> > setup itself, so it can use both pairs directly.
> 
> [lists.freedesktop.org/archives/l … 00876.html](http://lists.freedesktop.org/archives/libqmi-devel/2014-July/000876.html):
> 
> > [@](#):
> >
> > In Sierra MC73XX (also in newer MC71XX) interfaces 8 and 10 are both  
> > QMI+WWAN, with different setups as I said in a previous email. There’s  
> > also interface 13, which exposes kind of what it could look like a  
> > QMI+WWAN pair, but we ended up blacklisting that one in the kernel  
> > driver because we couldn’t make it talk QMI at all. That interface, we  
> > don’t know what’s for.
> 
> Turns out that the first interface was raw-IP and I had to use the second interface to connect. 😃
> 
> Is this documented somewhere in the MC7304 technical docs? I read them but did not see anything about this.
> 
> So basically anyone using MC73xx need to be sure to use the second interface.

Well, or, instead of just using always the second interface, you can switch the data format being used in the network interface before using it. E.g. you can run this unconditionally before running the WDS Start Network command (using qmicli+libqmi+qmi\_wwan):

```auto
$ qmicli -d /dev/cdc-wdm0 --wda-set-data-format=802-3
```

Or for older devices which don’t support the WDA service:

```auto
$ qmicli -d /dev/cdc-wdm0 --wds-noop --device-open-net="net-802-3|net-no-qos-header"
```

> [@](#):
>
> Only question left is why my cdc\_wcm and wwan interfaces to not align (cdc starts at 1, wwan at 0). Only does this on boot, replugging or resetting the modem causes cdc to start a 0.

The alignment is something that isn’t guaranteed by the kernel (although they usually are aligned). If you want a quick check of which WWAN interface corresponds to which cdc-wdm port you can use (only with libqmi git master):

```auto
$ qmicli -d /dev/cdc-wdm0 --get-wwan-iface
```

Or, otherwise looking at sysfs, but I just find that new command quicker.

---

_[View the full topic](https://forum.sierrawireless.com/t/how-to-connect-via-qmi-wwan-on-ubuntu/7365)._
