Sierra Wireless module Help

Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.)
Author Message
chiefwigms
DD-WRT Novice


Joined: 30 May 2007
Posts: 27

PostPosted: Tue Jul 11, 2017 23:50    Post subject: Sierra Wireless module Help Reply with quote
I've messed around with a couple of the latest BS builds on my WRT1900AC v2 (from what I've read 31899 is fairly stable), but would like to get usb tethering up and running.

I followed a few guides:
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=79336
and
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=985050

but it looks like the sierra wireless driver isn't working for me for either r31899 or r32597.

After inserting usbnet/cdc_ether/sierra_net, dmesg shows:
[ 149.601287] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 149.773341] usb 1-1: config 1 has an invalid interface number: 9 but max is 0
[ 149.780518] usb 1-1: config 1 has no interface number 0
[ 168.258395] usbcore: registered new interface driver cdc_ether
[ 179.996731] usb 1-1: USB disconnect, device number 2
[ 182.191284] usb 1-1: new high-speed USB device number 3 using xhci-hcd
[ 182.363770] usb 1-1: config 1 has an invalid interface number: 9 but max is 0
[ 182.370953] usb 1-1: config 1 has no interface number 0
[ 190.032326] usbcore: registered new interface driver sierra_net
[ 210.190979] usb 1-1: USB disconnect, device number 3
[ 212.521283] usb 1-1: new high-speed USB device number 4 using xhci-hcd
[ 212.692385] usb 1-1: config 1 has an invalid interface number: 9 but max is 0
[ 212.699556] usb 1-1: config 1 has no interface number 0


cat /sys/kernel/debug/usb/devices :
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0846 ProdID=0fff Rev= 0.06
S: Manufacturer=NETGEAR
S: Product=AirCard 779S
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=500mA
I:* If#= 9 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=125us

I built sierra_net driver for kernel 3.18 & 4.9 with toolchain-arm_cortex-a9_gcc-6.1.0_musl-1.1.15_eabi.

Any ideas? modinfo showed no other dependencies, and didn't seem to crash when i insmod it from jffs.
Sponsor
chiefwigms
DD-WRT Novice


Joined: 30 May 2007
Posts: 27

PostPosted: Thu Jul 13, 2017 14:18    Post subject: Reply with quote
Did some more searching - I'll probably need to modify /drivers/net/usb/qmi_wwan.c (http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=3&t=2692). Hopefully that will bring up an interface after a mode switch. I'll try tonight
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Thu Jul 13, 2017 23:57    Post subject: Reply with quote
This is a Sierra device using a Netgear vendor ID, it is included in dd-wrt for mode switching when you have selected Mobile Broadband as WAN but that is also the only thing dd-wrt currently does with it.

The USB ID 0846:68d3, which is the result after mode switching, is currently not included in the mainline linux qmi_wwan driver and that is the reason for it not being fully supported in dd-wrt.
qmi_wwan is btw the only net type interface in it, there is no sierra_net interface.

_________________
Kernel panic: Aiee, killing interrupt handler!
chiefwigms
DD-WRT Novice


Joined: 30 May 2007
Posts: 27

PostPosted: Fri Jul 14, 2017 0:48    Post subject: Reply with quote
So i recompiled qmi_wwan.c w/
{QMI_FIXED_INTF(0x0846, 0x68d3, 8)}, /* Netgear AC779S */

After I try running usb_modeswitch, the router stops responding... you think there's a shot at getting this up and running?

Here's the usb_modeswitch output:
root@DD-WRT:/jffs# usb_modeswitch -v 0x0846 -p 0x0fff -S -W
Take all parameters from the command line


* usb_modeswitch: handle USB devices with multiple modes
* Version 2.4.0 (C) Josua Dietze 2016
* Based on libusb1/libusbx

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x0846
DefaultProduct= 0x0fff
SierraMode=1

Look for default devices ...
found USB ID 1d6b:0002
found USB ID 1d6b:0002
found USB ID 0846:0fff
vendor ID matched
product ID matched
found USB ID 1d6b:0003
Found devices in default mode (1)
Access device 002 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 9

USB description data (for identification)
-------------------------
Manufacturer: NETGEAR
Product: AirCard 779S
Serial No.: <serial#>
-------------------------
Send Sierra control message
-> Run lsusb to note any changes. Bye!
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Fri Jul 14, 2017 1:25    Post subject: Reply with quote
chiefwigms wrote:


After I try running usb_modeswitch, the router stops responding...

-> Run lsusb to note any changes. Bye!


That is a normal usb_modeswitch ending after a successful switch, you should have got the linux cmd prompt afterwards.
Remove the verbose switch (-W) and see if that makes any difference. Do also try without your compiled qmi_wwan driver in case it is that one causing problems.

_________________
Kernel panic: Aiee, killing interrupt handler!
chiefwigms
DD-WRT Novice


Joined: 30 May 2007
Posts: 27

PostPosted: Fri Jul 14, 2017 2:26    Post subject: Reply with quote
LOM wrote:
chiefwigms wrote:


After I try running usb_modeswitch, the router stops responding...

-> Run lsusb to note any changes. Bye!


That is a normal usb_modeswitch ending after a successful switch, you should have got the linux cmd prompt afterwards.
Remove the verbose switch (-W) and see if that makes any difference. Do also try without your compiled qmi_wwan driver in case it is that one causing problems.


Original qmi_wwan:
[ 34.161008] usb 1-1: USB disconnect, device number 2
[ 34.701285] usb 1-1: new high-speed USB device number 3 using xhci-hcd
[ 34.872288] usb 1-1: config 1 has an invalid interface number: 3 but max is 2
[ 34.879469] usb 1-1: config 1 has an invalid interface number: 8 but max is 2
[ 34.886650] usb 1-1: config 1 has no interface number 1
[ 34.891903] usb 1-1: config 1 has no interface number 2
[ 41.152096] usbcore: registered new interface driver usbserial
[ 41.157979] usbcore: registered new interface driver usbserial_generic
[ 41.164565] usbserial: USB Serial support registered for generic
root@DD-WRT:~# usb_modeswitch -v 0x0846 -p 0x0fff -S
Look for default devices ...
No devices in default mode found. Nothing to do. Bye!


Mod qmi_wwan:
[ 119.518521] usbcore: deregistering interface driver qmi_wwan
[ 139.049825] usbcore: registered new interface driver qmi_wwan
[ 174.557132] usb 1-1: USB disconnect, device number 3
[ 271.468827] usbcore: deregistering interface driver qmi_wwan
[ 291.349264] usbcore: registered new interface driver qmi_wwan
[ 302.841289] usb 1-1: new high-speed USB device number 4 using xhci-hcd
[ 303.013301] usb 1-1: config 1 has an invalid interface number: 9 but max is 0
[ 303.020472] usb 1-1: config 1 has no interface number 0

then the router stops responding
chiefwigms
DD-WRT Novice


Joined: 30 May 2007
Posts: 27

PostPosted: Fri Jul 14, 2017 2:34    Post subject: Reply with quote
So as an update - i didn't have USB Storage support enabled.. Enabled Core USB/Storage/USB Over IP (disable: Printer/Automatic Drive Mount)... updated dmesg:

Original qmi_wwan:
[ 36.256902] usbcore: registered new interface driver cdc_acm
[ 36.262633] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 36.292593] usbcore: registered new interface driver cdc_wdm
[ 36.329360] usbcore: registered new interface driver qmi_wwan
[ 36.348347] usbcore: registered new interface driver usbserial
[ 36.354271] usbcore: registered new interface driver usbserial_generic
[ 36.360876] usbserial: USB Serial support registered for generic
[ 36.388279] usbcore: registered new interface driver sierra
[ 36.393929] usbserial: USB Serial support registered for Sierra USB modem
[ 36.409096] usbcore: registered new interface driver option
[ 36.414757] usbserial: USB Serial support registered for GSM modem (1-port)
[ 36.430479] usbcore: registered new interface driver qcserial
[ 36.436343] usbserial: USB Serial support registered for Qualcomm USB modem
[ 104.561294] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 104.732008] usb 1-1: config 1 has an invalid interface number: 9 but max is 0
[ 104.739191] usb 1-1: config 1 has no interface number 0
[ 104.746954] usb-storage 1-1:1.9: USB Mass Storage device detected
[ 104.753216] scsi host2: usb-storage 1-1:1.9
[ 105.762009] scsi 2:0:0:0: CD-ROM Aircard TRU-Install 2.31 PQ: 0 ANSI: 2
[ 117.428696] usb 1-1: USB disconnect, device number 2
[ 117.971294] usb 1-1: new high-speed USB device number 3 using xhci-hcd
[ 118.143386] usb 1-1: config 1 has an invalid interface number: 3 but max is 2
[ 118.150588] usb 1-1: config 1 has an invalid interface number: 8 but max is 2
[ 118.157773] usb 1-1: config 1 has no interface number 1
[ 118.163027] usb 1-1: config 1 has no interface number 2
[ 172.381481] usbcore: deregistering interface driver qmi_wwan

rmmod/insmod new modified qmi_wwan:

[ 187.067817] qmi_wwan 1-1:1.8: cdc-wdm0: USB WDM device
[ 187.073025] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 187.081153] pgd = dcb6c000
[ 187.083877] [00000000] *pgd=1cb2f831, *pte=00000000, *ppte=00000000
[ 187.090201] Internal error: Oops: 17 [#1] SMP ARM
[ 187.094922] Modules linked in: qmi_wwan(+) qcserial option sierra usb_wwan usbserial usbnet cdc_wdm cdc_acm jffs2 lzma_decompress(P) lzma_compress(P) ledtrig_usbport vhci_hcd usbip_host usbip_core pwrseq_simple pwrseq_emmc ahci_mvebu ahci_platform ahci libahci_platform libahci ehci_orion sata_mv usb_storage sd_mod xhci_plat_hcd xhci_pci xhci_hcd ehci_pci ehci_platform ehci_hcd usbcore usb_common btmrvl_sdio btmrvl bluetooth mwifiex_sdio mvsdio sdhci_pxav3 sdhci_pltfm sdhci mmc_block mmc_core mwifiex mwlwifi mac80211 cfg80211 compat mii tmp421 pwm_fan leds_pca963x leds_tlc591xx orion_wdt [last unloaded: qmi_wwan]
[ 187.149933] CPU: 0 PID: 2109 Comm: insmod Tainted: P 4.9.36 #27
[ 187.157183] Hardware name: Marvell Armada 380/385 (Device Tree)
[ 187.163125] task: df6ee180 task.stack: dcb88000
[ 187.167677] PC is at qmi_wwan_bind+0x1d8/0x2a0 [qmi_wwan]
[ 187.173095] LR is at 0xf35002
[ 187.176073] pc : [<bf414638>] lr : [<00f35002>] psr: 60000013
[ 187.176073] sp : dcb89ca8 ip : 00000000 fp : bf414a10
[ 187.187597] r10: bf2ec66c r9 : 00000000 r8 : 00000000
[ 187.192841] r7 : 00000000 r6 : bf416b4c r5 : 00000000 r4 : df6174c0
[ 187.199393] r3 : bf414900 r2 : df617000 r1 : 60000013 r0 : bf2e7b2c
[ 187.205947] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 187.213111] Control: 10c5387d Table: 1cb6c04a DAC: 00000051
[ 187.218878] Process insmod (pid: 2109, stack limit = 0xdcb88210)
[ 187.224907] Stack: (0xdcb89ca8 to 0xdcb8a000)
[ 187.229282] 9ca0: 00000000 00000000 00000000 00000000 00000000 00000000
[ 187.237493] 9cc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 187.245704] 9ce0: 00000000 00000000 dded2800 df617000 df6174c0 dca7f600 df617514 00000000
[ 187.253915] 9d00: df6175d8 bf2ecf20 00000001 c022e580 dcb160f0 c06ba524 00000001 dded2870
[ 187.262127] 9d20: dcb02648 dded2800 dcadf9b0 dca7f620 bf416b80 dca7f600 dded2870 dded2800
[ 187.270338] 9d40: bf414c0c 00000000 00000028 bf1bf6e4 c0962898 dca7f620 00000000 bf416b80
[ 187.278549] 9d60: 00000018 00000001 00000003 c0336d50 dca7f620 bf416b80 dca7f654 00000000
[ 187.286760] 9d80: de6a1f24 c0336f3c 00000000 bf416b80 c0336eb0 c033536c de2ef95c dec76634
[ 187.294972] 9da0: bf416b80 df586a00 bf1cf680 c0336414 bf416b10 00000001 bf416b80 bf416b80
[ 187.303183] 9dc0: bf1cf680 bf416b80 bf416b10 c0337504 bf416b4c bf1cf680 bf416b80 bf1bf1f8
[ 187.311394] 9de0: ffffe000 00000000 bf418000 dcabb1c0 de6a1f24 c0101830 00000001 00000000
[ 187.319605] 9e00: c0980dd8 00000001 c0925580 a0000013 bf416c48 00000000 024000c0 df6e7000
[ 187.327816] 9e20: c0917798 c0682238 c0694f90 e14b0000 e14affff fffff000 024000c0 dcabbf00
[ 187.336028] 9e40: dcabbf00 c09597e8 0001c029 bf416c00 00000001 bf416c00 dcabb1c0 de6a1f24
[ 187.344239] 9e60: 00000001 00000003 00000028 c01962d8 de6a1f00 de6a1f24 00000001 dcb89f44
[ 187.352450] 9e80: 00000001 bf416c00 de6a1f00 c0186d9c bf416c0c 00007fff bf416c00 c0184a94
[ 187.360661] 9ea0: bf416d84 bf416c48 c06025f4 00000000 00000000 c0954bac dcb89edc c0685818
[ 187.368873] 9ec0: c0685974 c0685824 024002c2 dcabbfc0 00400000 c01c63ac 00000005 00000000
[ 187.377083] 9ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 187.385295] 9f00: 00000000 00000000 00000000 00000000 00000000 00000000 be9f1d86 00004c14
[ 187.393506] 9f20: 00000000 005edc24 e14aec14 ffffe000 0007fdc0 00000051 be9f1d86 c01871b4
[ 187.401717] 9f40: de5aeb50 e14aa000 00004c14 e14ae6c4 e14ae56c e14ad3cc 00002dc0 00002e90
[ 187.409928] 9f60: 00000000 00000000 00000000 000008bc 00000020 00000021 00000019 00000000
[ 187.418139] 9f80: 00000015 00000000 00011eb4 0007fd60 0007fda0 00000080 c0107884 dcb88000
[ 187.426351] 9fa0: 00000000 c01076c0 00011eb4 0007fd60 005e9010 00004c14 0007fdc0 0001012c
[ 187.434562] 9fc0: 00011eb4 0007fd60 0007fda0 00000080 0007f6bc 00067ddc 000678db be9f1d86
[ 187.442773] 9fe0: be9f19fc be9f19e0 0001d410 b6f533bc 20000010 005e9010 00000000 00000000
[ 187.451004] [<bf414638>] (qmi_wwan_bind [qmi_wwan]) from [<bf2ecf20>] (_61+0x238/0x820 [usbnet])
[ 187.459838] [<bf2ecf20>] (_61 [usbnet]) from [<bf1bf6e4>] (_369+0x164/0x1b4 [usbcore])
[ 187.467799] [<bf1bf6e4>] (_369 [usbcore]) from [<c0336d50>] (really_probe+0xfc/0x25c)
[ 187.475665] [<c0336d50>] (really_probe) from [<c0336f3c>] (__driver_attach+0x8c/0xb0)
[ 187.483519] [<c0336f3c>] (__driver_attach) from [<c033536c>] (bus_for_each_dev+0x4c/0xa0)
[ 187.491731] [<c033536c>] (bus_for_each_dev) from [<c0336414>] (bus_add_driver+0xe8/0x208)
[ 187.499943] [<c0336414>] (bus_add_driver) from [<c0337504>] (driver_register+0xb8/0xf4)
[ 187.507986] [<c0337504>] (driver_register) from [<bf1bf1f8>] (_377+0x70/0x12c [usbcore])
[ 187.516117] [<bf1bf1f8>] (_377 [usbcore]) from [<c0101830>] (do_one_initcall+0xb8/0x164)
[ 187.524243] [<c0101830>] (do_one_initcall) from [<c01962d8>] (do_init_module+0x60/0x390)
[ 187.532370] [<c01962d8>] (do_init_module) from [<c0186d9c>] (load_module+0x1c1c/0x1f08)
[ 187.540408] [<c0186d9c>] (load_module) from [<c01871b4>] (SyS_init_module+0x12c/0x164)
[ 187.548359] [<c01871b4>] (SyS_init_module) from [<c01076c0>] (ret_fast_syscall+0x0/0x3c)
[ 187.556483] Code: e34b3f41 e5925210 e593e000 e1d3c0b4 (e5950000)
[ 187.562620] ---[ end trace f1c5c2f5eb8bac45 ]---


Last edited by chiefwigms on Fri Jul 14, 2017 3:35; edited 1 time in total
chiefwigms
DD-WRT Novice


Joined: 30 May 2007
Posts: 27

PostPosted: Fri Jul 14, 2017 3:01    Post subject: Reply with quote
Just checked and realized that for the 4.9 branch I checked out, it didn't match 32597 - did an update and it looks like it worked now:

[ 38.644093] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 38.671320] usbcore: registered new interface driver cdc_wdm
[ 38.722149] usbcore: registered new interface driver qmi_wwan
[ 38.742064] usbcore: registered new interface driver usbserial
[ 38.747981] usbcore: registered new interface driver usbserial_generic
[ 38.754562] usbserial: USB Serial support registered for generic
[ 38.783523] usbcore: registered new interface driver sierra
[ 38.789178] usbserial: USB Serial support registered for Sierra USB modem
[ 38.805935] usbcore: registered new interface driver option
[ 38.811601] usbserial: USB Serial support registered for GSM modem (1-port)
[ 38.822973] usbcore: registered new interface driver qcserial
[ 38.828814] usbserial: USB Serial support registered for Qualcomm USB modem
[ 89.647404] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 89.819885] usb 1-1: config 1 has an invalid interface number: 9 but max is 0
[ 89.827058] usb 1-1: config 1 has no interface number 0
[ 89.834226] usb-storage 1-1:1.9: USB Mass Storage device detected
[ 89.847670] scsi host2: usb-storage 1-1:1.9
[ 90.888168] scsi 2:0:0:0: CD-ROM Aircard TRU-Install 2.31 PQ: 0 ANSI: 2
[ 103.288028] usb 1-1: USB disconnect, device number 2
[ 103.827405] usb 1-1: new high-speed USB device number 3 using xhci-hcd
[ 103.999968] usb 1-1: config 1 has an invalid interface number: 3 but max is 2
[ 104.007141] usb 1-1: config 1 has an invalid interface number: 8 but max is 2
[ 104.014329] usb 1-1: config 1 has no interface number 1
[ 104.019585] usb 1-1: config 1 has no interface number 2

modified qmi_wwan:
[ 121.093881] usbcore: deregistering interface driver qmi_wwan
[ 127.467180] qmi_wwan 1-1:1.8: cdc-wdm0: USB WDM device
[ 127.472637] qmi_wwan 1-1:1.8 wwan0: register 'qmi_wwan' at usb-f10f8000.usb3-1, WWAN/QMI device, 76:a7:9f:de:06:b5
[ 127.483090] usbcore: registered new interface driver qmi_wwan

I searched some of the other threads (admittedly briefly) - with Mobile Broadband as the connection, the Dial string reverts to UMTS/3G/3.5G, even if I have Force LTE/4G selected. Is there other configuration needed? I'll search more tomorrow, but I didn't see any new interfaces in ifconfig, and I couldn't ping anything
chiefwigms
DD-WRT Novice


Joined: 30 May 2007
Posts: 27

PostPosted: Fri Jul 14, 2017 23:32    Post subject: Reply with quote
Messed around a little more after researching again...

root@DD-WRT:/jffs# uqmi -d /dev/cdc-wdm0 --start-network broadband --autoconnect
1137903568
root@DD-WRT:/etc/config# uqmi -d /dev/cdc-wdm0 --get-data-status
"connected"

if these aren't set to usb0, ifconfig won't bring up wwan0, and the Mobile Broadband setting seems to overwrite them:
nvram set wan_default=usb0
nvram set wan_iface=usb0
nvram set wan_ifname=usb0
nvram set wan_ifnames=usb0
nvram set wan_ifname2=usb0

root@DD-WRT:/dev# ifconfig
...
wwan0 Link encap:Ethernet HWaddr 7E:9A:E2:80:E0:FA
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:3078 (3.0 KiB)

root@DD-WRT:/jffs# udhcpc -i wwan0
udhcpc: started, v1.26.2
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover

and never gets an IP. If i try manually setting an IP it takes, but I can't ping anything. Any ideas?
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Sat Jul 15, 2017 3:00    Post subject: Reply with quote
chiefwigms wrote:
If i try manually setting an IP it takes, but I can't ping anything. Any ideas?


Did you notice that the user in the usb_modeswitch forum also had to set them manually and that the gateway was his IP address + 1 ?

_________________
Kernel panic: Aiee, killing interrupt handler!
chiefwigms
DD-WRT Novice


Joined: 30 May 2007
Posts: 27

PostPosted: Sat Jul 15, 2017 4:56    Post subject: Reply with quote
LOM wrote:
chiefwigms wrote:
If i try manually setting an IP it takes, but I can't ping anything. Any ideas?


Did you notice that the user in the usb_modeswitch forum also had to set them manually and that the gateway was his IP address + 1 ?


I saw that part - but he also used modemmanager to do some other initialization - not sure how much dd-wrt supports going down that path (uhdhcp vs dhclient, etc). I didn't see mmcli or qmicli on the router
chiefwigms
DD-WRT Novice


Joined: 30 May 2007
Posts: 27

PostPosted: Sat Jul 22, 2017 16:50    Post subject: Reply with quote
Finally solved this, in case anyone else is interested!

Did some more searching: http://tiebing.blogspot.com/2015/03/linux-running-4g-lte-modem.html
and a couple other threads i forgot to save

Basically the modem would come up by default in raw ip mode, rather than 802.3. With the updated qmi_wwan.c in jffs, and having WAN Connection set to "Automatic (DHCP)", this script works most of the time (saved to /jffs/etc/config/modem.startup). Sometimes, uqmi hangs on connect - I up'd the delay to 5 seconds after usb_modeswitch, just to make sure the modem was ready. There's also commented out lines to reset the modem, but I ended up not using it.

For whatever reason, having WAN set to Mobile Broadband and running a subset of the commands (usbnet/cdc-wdm/qmi_wwan get inserted automatically & usb_modeswitch auto runs) wouldn't work - couldn't ping anything from the router or my pc.

modem.startup:
Code:

#!/bin/sh
killall udhcpc
killall uqmi

#Set nvram variables
nvram set wan_ifname=wwan0
nvram set wan_ifname2=wwan0
nvram set wan_ifnames=wwan0
nvram set wan_default=wwan0
nvram set wan_iface=wwan0

#Load kernel modules
insmod usbnet
insmod cdc-wdm
#Modified qmi_wwan.c with Netgear AC779S device id
insmod /jffs/qmi_wwan_4_9_mod.ko
sleep 2

#Run modeswitch on modem
usb_modeswitch -v 0x0846 -p 0x0fff -S
sleep 5

##Reset modem
#uqmi -s -d /dev/cdc-wdm0 --set-device-operating-mode offline
#sleep 2
#uqmi -s -d /dev/cdc-wdm0 --set-device-operating-mode reset
#sleep 30
#usb_modeswitch -v 0x0846 -p 0x0fff -S
#sleep 5

# Stop network to change modes from raw-ip to 802.3, needed for DHCP
uqmi -s -d /dev/cdc-wdm0 --stop-network 0xffffffff --autoconnect > /dev/null
sleep 2
uqmi -s -d /dev/cdc-wdm0 --wda-set-data-format 802.3
sleep 1
uqmi -s -d /dev/cdc-wdm0 --start-network internet --autoconnect > /dev/null
sleep 2

#Bring up wwan0
ifconfig wwan0 up

#DHCP wwan0
udhcpc -n -i wwan0

Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.) All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum