Telit LE910-NVG

Bjørn Mork bjorn at mork.no
Sun Feb 7 11:29:22 CET 2016


Take a look at the qmi-network script bundled with libqmi. It shows how
to start a network connection using qmicli, with no AT commands involved
at all.

But qmi-network is only a demo. For production you'll want a more robust
and flexible management application on top of libqmi.  ModemManager is
the obvious choice on desktop systems.  OpenWRT have their own 3g/lte
management system, using uqmi as backend for QMI modems.  Don't know
where you'd like to place your system... You should probably check out
all alternatives and figure out for yourself what features you
need/want/dislike.  I suggest playing with qmicli for a while and see
what it does and can do.  Reading the libqmi docs is also good.  Lots of
hint about the underlying QMI there.  Which you won't find anywhere
else, since this apparently is one of Qualcomm's trade secrets.

Randy Yates <yates at digitalsignallabs.com> writes:

> Hello Sebastian and the list,
>
> I finally found the proper APN now and verified it manually via minicom.
> That is, I can successfully activate. However, I still cannot bring
> the wwan0 interface up. 
>
> I have a few more questions please:
>
> 1. How are customizations like this (the APN) specified to the qmi_wwan
> driver? Can someone please elaborate? Namely, is it up to the user to
> supply the AT_CGDCONT command (and any other custom commands) in a
> script file somewhere?

You pass the APN as a TLV in the QMI_WDS "start network" reqest.  No
need for any AT command based config.

> 2. I've noticed via ifconfig -a that I have TWO new network interface
> names: usb0 and wwan0. I'm guessing wwan0 is the cellular module, but
> what is usb0?

Something else :)

It showed up in your dmesg log:

[   31.919716] usb0: HOST MAC 84:eb:18:ea:28:c9
[   32.016997] usb0: MAC 84:eb:18:ea:28:c0
[   32.021776] using random self ethernet address
[   32.026384] using random host ethernet address
[   32.050768] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[   32.057595] g_ether gadget: g_ether ready

This is the device side of an USB ethernet adapter, allowing you to
connect as a USB device to another host, running ethernet over the USB
link.  Not related to mobile at all...

> 3. I don't understand precisely how the wwan0 network interface is
> supposed to be brought up. For example, if the driver is loaded
> correctly, is it supposed to automatically bring it up when the device
> is enumerated on the bus? Or am I required to perform an "ifup wwan0"?
> And does the network interface have to be entered into the (debian) 
> /etc/network/interfaces file? 

The driver won't do anything automatically.  There are just too many
choices for that to make any sense. All the magic happens in some
"management application", which could be a simple script or a full
flegded combo of NetworkManager and ModemManager.

"Something" will have to bring up the wwan0 interface when the
connection is ready. I'm not going to tell you how you want that to be
triggered :)

It is possible to use /etc/network/interfaces along with pre-up and
post-down scripts taking care of the network connection, just like it is
possible to do this for WiFi.  But a wireless link is not as reliable
and stable as a wired link, so you might want to make a bit more out of
monitoring and dealing with errors.  This is difficult to integrate into
/etc/network/interfaces.  Which is why that is rarely done on Debian
based desktop systems.

> 4. We purchased static IP addresses for our account. Is there a command
> to query the IP address for a specific SIM? 

You cannot query it without making a connection, I believe.  But it
should be available in the same way as a dynamic address when the
connection is active.  I think.  Must admit, though, that I have no
experience with static addresses for mobile links...  

The modem will normally run a DHCP server.  If so then you can configure
addresses with DHCP (it will still be static - the modem "pool" is the
single address it received from the operator).  If the modem doesn't
support DHCP, then you can query the address configuration with
 qmicli --wds-get-current-settings  and use the output for manual
config. 

And as the address is static, you can of course choose to do this only
on the first connection with that SIM, and then enter those values into
/etc/network/interfaces or whatever.

> 5. If a wwan0 interface is required to be placed into the
> /etc/network/interfaces file, how would it be specified, seeing
> as how we are supposed to have static IP addresses? An interface
> with a static IP address is supposed to be specified in the file - is
> this necessary?

Nope, that is up to you to decide.

IMHO it is simpler and safer to retrieve as much config as possible from
the modem, which gets it from the operator at connection time. The more
you configure statically on your end, the more bugs you'll have due to
typos etc. And there is more to update if you switch SIMs or whatever.


Bjørn


More information about the libqmi-devel mailing list