Telit LE910-NVG

Randy Yates yates at digitalsignallabs.com
Wed Feb 10 05:34:11 CET 2016


Hello List,

First of all, thank you all for your help over the past few days,
especially you, Sebastian. I appreciate it so much.

I now have another problem that is driving me mad. It is probably a
result of my own ignorance. It may well have little or nothing to do
with QMI but I thought I'd ask here.

I have placed code in my project (C++) to start the wwan0 network by
running the command 

  qmicli -d /dev/cdc-wdm0 --wds-start-network=[\"11583.mcs\"]  --client-no-release-cid

via a system() call and then the command

  dhclient wwan0

Yes, yes, I know I should be doing this via library calls... I will
eventually.

This appears to work when I start my project code (a daemon)
interactively as a login session. Note that running it interactively
means I am ssh'ed in and thus I necessarily have booted with the wired
network interface connected since this board doesn't have a working
console (serial port) interface.

By "appears to work" I get the LE910 enumerated on the USB bus (as
evidenced from lsusb) and the wwan0 interface becomes listed (with IP
address) from an "ifconfig" command. 

Since I'm logged in interactively, I have a default route through my
local network router. If, before the dhclient wwan0, I do a "ip route
del default via 192.168.1.44 dev eth0", a new default route is set 
through wwan0 when I dhclient wwan0. 

I can confirm that the network is going through the cellular network by
running "lynx http://ip.imxx.net" (the textual equivalent of
www.whatismyipaddress.com) - I get a AT&T network address, 107.x.y.z. I
also get a route though 107 when I do an "ip route get a.b.c.d".

So I have the following two problems:

  1. If I interactively run my firmware, which is connecting to the
  Telit m2mAir cloud and sending thing properties (and works fine
  through the wired network, i.e., without bringing up the wwan0),
  and then unplug my eth0 wired network cable, wwan0 goes away.
  

  2. In the real operational scenario I run my code at boot as a systemd
  service. I have been testing it by rebooting with the wired eth0 cable
  unplugged thinking wwan0 will come up as the only route and network
  connections will be guaranteed to go through wwan0.

  Unfortunately that DOES NOT work. It appears the device never gets
  enumerated on the USB bus when I bring up power to the LE910 (which is
  identical to the interctive scenario). There is no Telit device in
  response to an lsusb, the qmicli command above fails since there is no
  /dev/cdc-wdm0 directory. I also do not have any /dev/ttyUSBx devices.

I really have no clue why 1 is happening.

I've removed the network.target from my project.service file, so perhaps
problem 2 results from attempting to load the qmi driver before some
other service it depends on is available? Just a wild guess.

Any thoughts?

--Randy


Randy Yates <yates at digitalsignallabs.com> writes:

> Hi,
>
> We have a board that is a derivative of the BeagleBone Black. In 
> fact it is almost identical with the exception of the addition of
> a few components, namely the Telit LE910-NVG cellular module. 
>
> We are running version 4.4 of the linux kernel and the Debian Jesse
> distribution. This is somewhat customized build based on Robert C.
> Nelson's custom build instructions here: 
>
>   https://eewiki.net/display/linuxonarm/BeagleBone+Black
>
> When the system first boots there are no /dev/ttyUSBzz devices listed
> in the device filesystem. I wrote some userland code that performs
> the initialization for the Telit module:
>
>   1) controls the regulator on 
>
>   2) wiggles the ON/OFF# line to the module per the timing specified
>   in section 4.2 of the Telit LE910 Hardware User Guide. 
>
> After running this code, the 910 enumerates on the USB bus. I see
> /dev/ttyUSB0 through /dev/ttyUSB4. I can also connect to /dev/ttyUSB2
> and issue AT commands successfully, e.g., "AT+GSN" and receive the
> IMEI number back.
>
> Also the result of lsusb looks right:
>
>   root at arm:~# lsusb
>   Bus 001 Device 002: ID 1bc7:1201 Telit 
>   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>
> The qmi_wwan kernel module also appears to be loaded as evidenced
> from the lsmod:
>
>   root at arm:~# lsmod
>   Module                  Size  Used by
>   sg                     25685  0 
>   option                 29643  0 
>   usb_wwan                9306  1 option
>   qmi_wwan               11910  0 
>   cdc_wdm                11671  1 qmi_wwan
>   uas                    11809  0 
>   usbserial              34565  2 option,usb_wwan
>   usbnet                 31258  1 qmi_wwan
>   mii                     4596  1 usbnet
>   usb_f_ecm               9400  1 
>   g_ether                 4791  0 
>   usb_f_rndis            22035  2 g_ether
>   u_ether                11013  3 usb_f_ecm,usb_f_rndis,g_ether
>   libcomposite           42737  3 usb_f_ecm,usb_f_rndis,g_ether
>   omap_aes               13361  0 
>   omap_sham              21319  0 
>   snd_soc_davinci_mcasp    15887  0 
>   snd_soc_edma            1290  1 snd_soc_davinci_mcasp
>   snd_soc_omap            3058  1 snd_soc_davinci_mcasp
>   omap_rng                4359  0 
>   rng_core                7254  1 omap_rng
>   snd_soc_core          155574  3 snd_soc_davinci_mcasp,snd_soc_edma,snd_soc_omap
>   snd_pcm_dmaengine       5273  2 snd_soc_core,snd_soc_omap
>   snd_pcm                79420  4 snd_soc_davinci_mcasp,snd_soc_core,snd_soc_omap,snd_pcm_dmaengine
>   snd_timer              17433  1 snd_pcm
>   spi_omap2_mcspi        11203  0 
>   snd                    57634  3 snd_soc_core,snd_timer,snd_pcm
>   soundcore               7029  1 snd
>   evdev                   9907  0 
>   uio_pdrv_genirq         3437  0 
>   leds_gpio               3420  0 
>   uio                     8806  1 uio_pdrv_genirq
>
> We seem to be 90 percent of the way to a working network interface, but
> ifconfig still does not list anything other than the standard lo and eth0 
> interfaces.
>
> What more do I need to do to get our module to show up as a network interface?

-- 
Randy Yates, DSP/Embedded Firmware Developer
Digital Signal Labs
http://www.digitalsignallabs.com


More information about the libqmi-devel mailing list