OpenWrt Forum Archive

Topic: Trying to get Netgear/Sierra AirCard 340U AT&T BEAM USB Modem working

The content of this topic has been archived on 5 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all I am trying to get the 340U  modem working on attitude adjustment or  barrier breaker.

I was informed in another thread that I am to use QMI. However I seem to be finding limited information on that .

https://forum.openwrt.org/viewtopic.php?id=47796

Any additional details or assistances would be highly appreciated.

* Such as should I be using barrier breaker or attitude adjustment.
* How should my /etc/config/network look like.
* Which packages I should be using.

Here is a little environmental I've been testing with where I couldn't get it working.
Hardware

Modem  Netgear/Sierra AirCard 340U AT&T BEAM USB Modem

Modem Firmware - _SWI9X15C_01.05.11.52_00_ATT_002.004_000  - Downloaded from Netgear site labeled 340U for Linux

 Buffalo WZR-HP-G300NH2 

Version

 ATTITUDE ADJUSTMENT (12.09, r36088) 

Output of lsusb

root@OpenWrt:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 1199:9051 Sierra Wireless, Inc.

Output of /dev/ttyUSB

root@OpenWrt:~# /dev/ttyUSB
ttyUSB0  ttyUSB1  ttyUSB2  ttyUSB3  ttyUSB4

Output of /etc/config/network

3G
config interface 'wan2'
        option _orig_ifname 'wwan0'
        option _orig_bridge 'false'
        option proto '3g'
        option apn 'broadband'
        option metric '20'
        option service 'umts'
        option device '/dev/ttyUSB2'

Out of /etc/modules.d/60-usb-serial

root@OpenWrt:~# cat /etc/modules.d/60-usb-serial
usbserial vendor=0x1199 product=0x9051

Out of logread when modem is plugged into USB

kern.info kernel: [10888.260000] usb 1-1: new high-speed USB device number 5 using ehci-platform
kern.warn kernel: [10888.410000] usb 1-1: config 1 has an invalid interface number: 8 but max is 4
kern.warn kernel: [10888.410000] usb 1-1: config 1 has an invalid interface number: 9 but max is 4
kern.warn kernel: [10888.420000] usb 1-1: config 1 has no interface number 1
kern.warn kernel: [10888.430000] usb 1-1: config 1 has no interface number 4
kern.info kernel: [10888.440000] usbserial_generic 1-1:1.0: generic converter detected
kern.info kernel: [10888.440000] usb 1-1: generic converter now attached to ttyUSB0
kern.info kernel: [10888.450000] usbserial_generic 1-1:1.2: generic converter detected
kern.info kernel: [10888.460000] usb 1-1: generic converter now attached to ttyUSB1
kern.info kernel: [10888.460000] usbserial_generic 1-1:1.3: generic converter detected
kern.info kernel: [10888.470000] usb 1-1: generic converter now attached to ttyUSB2
kern.info kernel: [10888.480000] usbserial_generic 1-1:1.8: generic converter detected
kern.info kernel: [10888.480000] usb 1-1: generic converter now attached to ttyUSB3
kern.info kernel: [10888.500000] usbserial_generic 1-1:1.9: generic converter detected
kern.info kernel: [10888.500000] usb 1-1: generic converter now attached to ttyUSB4
user.notice usb-modeswitch: 1-1:1.0: Manufacturer=Sierra_Wireless,_Incorporated Product=AirCard_340U 
user.notice usb-modeswitch: 1-1:1.2: Manufacturer=Sierra_Wireless,_Incorporated Product=AirCard_340U 
user.notice usb-modeswitch: 1-1:1.3: Manufacturer=Sierra_Wireless,_Incorporated Product=AirCard_340U 
user.notice usb-modeswitch: 1-1:1.8: Manufacturer=Sierra_Wireless,_Incorporated Product=AirCard_340U 
user.notice usb-modeswitch: 1-1:1.9: Manufacturer=Sierra_Wireless,_Incorporated Product=AirCard_340U 

(Last edited by cititechs on 21 Jan 2014, 18:55)

what is gcom respond?

gcom -d /dev/ttyUSB2

test also all another interfaces.

Hi Neryba,

Thanks for a prompt response. gcom doesn't respond to any of the interfaces that appear. Below is the output.

root@OpenWrt:~# gcom -d /dev/ttyUSB
ttyUSB0  ttyUSB1  ttyUSB2  ttyUSB3  ttyUSB4
root@OpenWrt:~# gcom -d /dev/ttyUSB0
 ***SIM ERROR***
Check device port configuration.
Check SIM is inserted
Test SIM in a mobile phone?
root@OpenWrt:~# gcom -d /dev/ttyUSB1
 ***SIM ERROR***
Check device port configuration.
Check SIM is inserted
Test SIM in a mobile phone?
root@OpenWrt:~# gcom -d /dev/ttyUSB2
 ***SIM ERROR***
Check device port configuration.
Check SIM is inserted
Test SIM in a mobile phone?
root@OpenWrt:~# gcom -d /dev/ttyUSB3
 ***SIM ERROR***
Check device port configuration.
Check SIM is inserted
Test SIM in a mobile phone?
root@OpenWrt:~# gcom -d /dev/ttyUSB4
 ***SIM ERROR***
Check device port configuration.
Check SIM is inserted
Test SIM in a mobile phone?
root@OpenWrt:~#

Hmm, here 3 possible problems:
1. Yours SIM not respond - Check this USB on another PC or use "gcom info -d /dev/ttyUSB2" for all interfaces, if device respond correctly, that means SIM not connected propertly.
2. install another driver - install kmod-usb-serial-option the comment or remove line "usbserial vendor=0x1199 product=0x9051" on /etc/modules.d/60-usb-serial and run

echo "1199 9051" > / sys/bus/usb-serial/drivers/option1/new_id

and test connection again on all ports.
3. maybe you need install QMI driver.

There is currently no driver support at all in linux for 1199:9051, I guess the dongle is just too new and no one has been able to test and add driver support for it. You can probably use it in ppp serial modem mode and /dev/ttyUSB2 is the most likely modem device.

The higher interface numbers (8 and 9) which the serial driver has created ttyUSB3 and ttyUSB4 from are direct net interfaces, sierra_net and qmi_wwan are likely driver candidates for them but they do currently not support 1199:9051.
There is anyway no use in trying to get a response from these two interfaces with gcom.

nerbya,

I was able to get the modem going with your suggestion. Removing it from /etc/modules.d/60-usb-serial and loading it manually after rebooting the router seemed to be the trick. There seems to be a timing issue when this device is plugged as upon reboot. The tty are detected but don't work. But if you reboot and load manually seems to work.

The timing issue on this card is mentioned in this thread.
https://forum.openwrt.org/viewtopic.php?id=47796

Then Proxicast states purchasing there USBHub helps with the know timing issue.  See Note 2 towards bottom in red.
http://www.proxicast.com/AbsoluteFM/afm … ?faqid=268

As JonnyM stated I was able to get it to connect in ppp serial modem mode using ttyUSB2. However when I connect that way the LCD no longer reports the current usage which was the whole point I wanted this modem. It seems once I connect via PPP the usage disappears.

If I test the modem in my Windows 7 PC with the Driver loaded. It works and the usage continues to display correctly as it's actively being used.

I know there are firmware such as Rooters that track usage via anything that flows out that device. I would almost prefer an AT command I could send to get actual usage.  But the LCD on the modem  is what I really want to get going. I guess who or how do we request a driver ?  Is this an Openwrt community thing or Sierra as it seems others having it working on Ubuntu .

http://ubuntuforums.org/showthread.php?t=2188883

cititechs wrote:

I know there are firmware such as Rooters that track usage via anything that flows out that device. I would almost prefer an AT command I could send to get actual usage.  But the LCD on the modem  is what I really want to get going. I guess who or how do we request a driver ?  Is this an Openwrt community thing or Sierra as it seems others having it working on Ubuntu .

http://ubuntuforums.org/showthread.php?t=2188883

In the ubuntuforums post the usb id of his AC340U is not the same as yours and he has got additional high numbered interfaces (12 and 13), interfaces which are not on yours and this is probably due to the flashing you did with the linux firmware for the dongle. His dongle is handled by the mbim driver which is a MS Win8 standard but I think Netgear made it easy for themselves with the Linux firmware and removed the mbim function.

Linux has recently got a cdc_mbim driver but mbim support is afaik not yet available in OpenWRT, the communication libraries and command line application (the ubuntuforums guy uses  mbim-network) has to be re-written, they are huge and would occupy too much of a routers flash.

If #8 is typically a QMI function on Sierra devices. I'll add 1199:9051 to the qmi_wwan and qcserial drivers in mainline.  It will take some time before this flows back to OpenWRT though....

Hi Cititechs, I'm trying to retrace your steps in Attitude Adjustment and thus far I'm not getting any /dev/ttyUSB devices. I can see the same output as yours for lsusb but that's where my luck runs out. Do you happen to recall what set of packages you were using and any specific configs you did? I'm working on getting a 340U to work under MBIM with Chaos Calmer (which is awesome) and I expect that will work without too much difficulty. However it would be extremely useful if I could get it working under Attitude Adjustment as well, any help you or anyone else can offer is much appreciated. Cheers!

Hi HalLogan,

Sounds like your missing a package that creates the ttyUSB I cant recall the exact one you need but it has to do with serial modems. You can try installing the  one below  but am not a 100% sure if this is the one I used .  Use opkg to install it.

kmod-usb-serial-sierrawireless

Also the article below has some other packages that you may have to install. To make it appear.

http://wiki.openwrt.org/doc/howtobuild/ … -3g-dongle

Thanks Cititechs. This eventually worked for me under AA. For me the /dev/ttyUSBx device didn't show until I did the echo command in neryba's comment. After that a service network restart had me in business. Cheers!

Continuing down the thread of messing with the AirCard 340U. I've been trying to get it to work now with QMI .
Following the directions posted on the wiki . http://wiki.openwrt.org/doc/recipes/ltedongle

It almost works it gets connected but it doesn't receive an IP .
I saw this thread between neryba and bmork that states the device needs to use  802.3
https://forum.openwrt.org/viewtopic.php?id=54233

However whenever I try to put the device 802.3 mode using the uqmi command of

uqmi -s -d "$device" --wda-set-data-format 802.3 .
It doesn't set during my active session nor during reboot .

Here are some log entries I also noticed.

qmi_wwan 1-1.2:1.8: wdm_int_callback - 0 bytes
qmi_wwan 1-1.2:1.8: nonzero urb status received: -71

Any guidance on how to get it to set on 802.3 mode would be appreciated. Router I am using is the TP-LINK N750 AKA 4300. Tried with BB and with CHAOS.

(Last edited by cititechs on 22 Aug 2015, 02:21)

I could still use help on this. Is it possible to find libqmi 1.10 I believe it works with that version but its not in the package repo.

So finally got the modem to connect but I cant get an IP from DHCP.


ifconfig

wwan0     Link encap:Ethernet  HWaddr A6:6F:F7:60:00:44
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:6840 (6.6 KiB)


root@OpenWrt:~# uqmi -d /dev/cdc-wdm0 --get-data-status
"connected"


root@OpenWrt:~# udhcpc
udhcpc (v1.24.1) started
Sending discover...
Sending discover...
Sending discover...

Logread

Mon Jan 25 12:40:20 2016 daemon.notice netifd: Interface 'WAN3' is enabled
Mon Jan 25 12:40:20 2016 daemon.notice netifd: Network device 'wwan0' link is up
Mon Jan 25 12:40:20 2016 daemon.notice netifd: Interface 'WAN3' has link connectivity
Mon Jan 25 12:40:20 2016 daemon.notice netifd: Interface 'WAN3' is setting up now
Mon Jan 25 12:40:20 2016 daemon.notice netifd: WAN3 (10998): udhcpc (v1.24.1) started
Mon Jan 25 12:40:20 2016 daemon.notice netifd: WAN3 (10998): Sending discover...
Mon Jan 25 12:40:23 2016 daemon.notice netifd: WAN3 (10998): Sending discover...
Mon Jan 25 12:40:26 2016 daemon.notice netifd: WAN3 (10998): Sending discover...
root@OpenWrt:~#

I did manage to get this working thanks to a large degree to this post. The key is setting the data format to 802.3 vs. raw-IP.

Here is the script that I use in the /etc/hotplug.d/usb/misc folder to do this at boot:
#!/bin/sh
device="/dev/cdc-wdm0"

# Disconnect
uqmi -s -d "$device" --stop-network 0xffffffff    --autoconnect > /dev/null

# Configure and Bring Up
sleep 5
uqmi -s -d "$device" --wda-set-data-format 802.3
uqmi -s -d "$device" --start-network "broadband" --autoconnect > /dev/null


I'm running on the 01.13.12.13 firmware as I couldn't get the 01.13.12.14 update to take.

The discussion might have continued from here.