Huawei EC 159 doesn't work in 18777

Post new topic   Reply to topic    DD-WRT Forum Index -> Ralink SoC based Hardware
Author Message
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Sat Mar 24, 2012 16:07    Post subject: Huawei EC 159 doesn't work in 18777 Reply with quote
continued from the Atheros section.

This stick is supported in r18777 and should do an automatic modeswitch.

Please give output from dmesg after starting the router with stick inserted and 3G selected as WAN source without any manual modeswitch commands.


It looks like the stick doesn't switch automatically, if it had done so then your first manual modeswitch would not had worked, usb_modeswitch would not have found the stick as 12d1:1505.

Your first manual modeswitch doesn't work either, if it had worked then your second manual modeswitch cmd would not have found the stick as 12d1:1505.

Both of your manual modeswitch commands would have resulted in "can't find , nothing to do" from usb_modeswitch.

_________________
Kernel panic: Aiee, killing interrupt handler!
Sponsor
AZERTY123
DD-WRT User


Joined: 07 Mar 2012
Posts: 57

PostPosted: Sat Mar 24, 2012 17:10    Post subject: Reply with quote
Here is the log. It does not switch automatically. So I tried manual switch in the first place..

dmesg wrote:
<5>Linux version 3.2.12-rc1-svn18774 (root@dd-wrt) (gcc version 4.6.3 20120201 (
prerelease) (Linaro GCC 4.6-2012.02) ) #396 Mon Mar 19 14:22:05 CET 2012
<7>prom: fw_arg0=00000001, fw_arg1=0372bfb0, fw_arg2=0372c3b0, fw_arg3=00000000
<7>argv[0]= (null) is invalid, skipping
<7>env[0]: memsize=64
<7>env[1]: initrd_start=0x00000000
<7>env[2]: initrd_size=0x0
<7>env[3]: flash_start=0xBF000000
<7>env[4]: flash_size=0x800000
<7>env[0]: memsize=64
<7>env[1]: initrd_start=0x00000000
<7>env[2]: initrd_size=0x0
<7>env[3]: flash_start=0xBF000000
<7>env[4]: flash_size=0x800000
<6>bootconsole [early0] enabled
<6>CPU revision is: 0001964c (MIPS 24KEc)
<6>Ralink RT3052 id:1 rev:3 running at 384.00 MHz
<6>Determined physical RAM map:
<6> memory: 04000000 @ 00000000 (usable)
<4>Zone PFN ranges:
<4> Normal 0x00000000 -> 0x00004000
<4>Movable zone start PFN for each node
<4>early_node_map[1] active PFN ranges
<4> 0: 0x00000000 -> 0x00004000
<7>On node 0 totalpages: 16384
<7>free_area_init_node: node 0, pgdat 802a3200, node_mem_map 81000000
<7> Normal zone: 128 pages used for memmap
<7> Normal zone: 0 pages reserved
<7> Normal zone: 16256 pages, LIFO batch:3
<7>pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
<7>pcpu-alloc: [0] 0
<4>Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
<5>Kernel command line: console=ttyS1,57600n8 root=/dev/mtdblock4 rootfstype=sq
uashfs noinitrd
<6>PID hash table entries: 256 (order: -2, 1024 bytes)
<6>Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
<6>Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
<4>Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
<4>Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
<6>Writing ErrCtl register=0000c10b
<6>Readback ErrCtl register=0000c10b
<6>Memory: 61796k/65536k available (2296k kernel code, 3740k reserved, 405k data
, 164k init, 0k highmem)
<6>NR_IRQS:48
<6>console [ttyS1] enabled, bootconsole disabled
<6>Calibrating delay loop... 255.59 BogoMIPS (lpj=1277952)
<6>pid_max: default: 32768 minimum: 301
<6>Mount-cache hash table entries: 512
<6>NET: Registered protocol family 16
<6>bio: create slab <bio-0> at 0
<5>SCSI subsystem initialized
<6>Switching to clocksource MIPS
<6>NET: Registered protocol family 2
<6>IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
<6>TCP established hash table entries: 2048 (order: 2, 16384 bytes)
<6>TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
<6>TCP: Hash tables configured (established 2048 bind 2048)
<6>TCP reno registered
<6>UDP hash table entries: 256 (order: 0, 4096 bytes)
<6>UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
<6>NET: Registered protocol family 1
<6>squashfs: version 3.0 (2006/03/15) Phillip Lougher
<6>msgmni has been set to 120
<6>io scheduler noop registered
<6>io scheduler deadline registered (default)
<6>Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
<6>serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
<6>serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
<4>Ralink gpio driver initialized
<6>system type: RT3052
<6>boot type: 0
<5>ralink flash device: 0x1000000 at 0xbf000000
<6>Ralink SoC physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
. Manufacturer ID 0x0000c2 Chip ID 0x0022cb
<7>Ralink SoC physically mapped flash: Found an alias at 0x800000 for the chip a
t 0x0
<6>Amd/Fujitsu Extended Query Table at 0x0040
<6> Amd/Fujitsu Extended Query version 1.1.
<5>number of CFI chips: 1
<0>
<0>found squashfs at 141000
<5>Creating 6 MTD partitions on "Ralink SoC physically mapped flash":
<5>0x000000000000-0x000000030000 : "uboot"
<5>0x000000030000-0x000000040000 : "uboot-config"
<5>0x000000040000-0x000000050000 : "factory-defaults"
<5>0x000000050000-0x0000007f0000 : "linux"
<5>0x000000141000-0x0000007f0000 : "rootfs"
<4>mtd: partition "rootfs" must either start or end on erase block boundary or b
e smaller than an erase block -- forcing read-only
<5>0x0000007f0000-0x000000800000 : "nvram"
<6>tun: Universal TUN/TAP device driver, 1.6
<6>tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
<6>PPP generic driver version 2.4.2
<6>PPP BSD Compression module registered
<6>PPP Deflate Compression module registered
<6>NET: Registered protocol family 24
<6>Ralink APSoC Hardware Watchdog Timer
<6>u32 classifier
<6> Actions configured
<6>Netfilter messages via NETLINK v0.30.
<6>nf_conntrack version 0.5.0 (965 buckets, 3860 max)
<6>ctnetlink v0.93: registering with nfnetlink.
<6>IPv4 over IPv4 tunneling driver
<6>ip_tables: (C) 2000-2006 Netfilter Core Team
<6>IPP2P v0.8.2 loading
<6>ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully
<6>TCP bic registered
<6>TCP cubic registered
<6>TCP westwood registered
<6>TCP highspeed registered
<6>TCP hybla registered
<6>TCP htcp registered
<6>TCP vegas registered
<6>TCP scalable registered
<6>NET: Registered protocol family 17
<6>8021q: 802.1Q VLAN Support v1.8
<6>searching for nvram
<6>nvram size = 0
<4>MAC_ADRH -- : 0x00000000
<4>MAC_ADRL -- : 0x00000000
<4>Ralink APSoC Ethernet Driver Initilization. v2.0 256 rx/tx descriptors alloc
ated, mtu = 1500!
<4>NAPI enable, Tx Ring = 256, Rx Ring = 256
<4>MAC_ADRH -- : 0x0000000c
<4>MAC_ADRL -- : 0x43414632
<4>rt3052 access driver initialization.
<6>VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
<6>Freeing unused kernel memory: 164k freed
<4>rt2860v2_ap: module license 'unspecified' taints kernel.
<4>Disabling lock debugging due to kernel taint
<4>
<4>phy_tx_ring = 0x03666000, tx_ring = 0xa3666000
<4>
<4>phy_rx_ring0 = 0x03667000, rx_ring0 = 0xa3667000
<4>RT305x_ESW: Link Status Changed
<4>CDMA_CSG_CFG = 81000007
<4>GDMA1_FWD_CFG = 710000
<6>usbcore: registered new interface driver usbfs
<6>usbcore: registered new interface driver hub
<6>usbcore: registered new device driver usb
<6>dwc_otg: version 2.72a 24-JUN-2008
<6>DWC_otg: Core Release: 2.66a
<6>DWC_otg: Periodic Transfer Interrupt Enhancement - disabled
<6>DWC_otg: Multiprocessor Interrupt Enhancement - disabled
<6>DWC_otg: Using DMA mode
<6>DWC_otg: Device using Buffer DMA mode
<6>dwc_otg lm0: DWC OTG Controller
<6>dwc_otg lm0: new USB bus registered, assigned bus number 1
<6>dwc_otg lm0: irq 26, io mem 0x00000000
<6>DWC_otg: Init: Port Power? op_state=1
<6>DWC_otg: Init: Power Port (0)
<6>hub 1-0:1.0: USB hub found
<6>hub 1-0:1.0: 1 port detected
<6>usbcore: registered new interface driver libusual
<6>Initializing USB Mass Storage driver...
<6>usbcore: registered new interface driver usb-storage
<6>USB Mass Storage support registered.
<6>usb 1-1: new full-speed USB device number 2 using dwc_otg
<6>usbcore: registered new interface driver usblp
<6>scsi0 : usb-storage 1-1:1.0
<5>scsi 0:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 0
<4>sr0: scsi-1 drive
<6>cdrom: Uniform CD-ROM driver Revision: 3.20
<7>sr 0:0:0:0: Attached scsi CD-ROM sr0
<5>sr 0:0:0:0: Attached scsi generic sg0 type 5
<6>device vlan1 entered promiscuous mode
<6>device eth2 entered promiscuous mode
<6>device vlan2 entered promiscuous mode
<6>br0: port 2(vlan2) entering forwarding state
<6>br0: port 2(vlan2) entering forwarding state
<6>br0: port 1(vlan1) entering forwarding state
<6>br0: port 1(vlan1) entering forwarding state
<4>RtmpOSNetDevDetach(): RtmpOSNetDeviceDetach(), dev->name=ra0!
<4>0x1300 = 00064380
<6>device ra0 entered promiscuous mode
<6>br0: port 3(ra0) entering forwarding state
<6>br0: port 3(ra0) entering forwarding state
<6>device ra1 entered promiscuous mode
<6>br0: port 4(ra1) entering forwarding state
<6>br0: port 4(ra1) entering forwarding state
<6>br0: port 2(vlan2) entering forwarding state
<6>br0: port 1(vlan1) entering forwarding state
<6>usbcore: registered new interface driver usbserial
<6>usbserial: USB Serial Driver core
<6>USB Serial support registered for GSM modem (1-port)
<6>usbcore: registered new interface driver option
<6>option: v0.7.2:USB Driver for GSM modems
<6>br0: port 3(ra0) entering forwarding state
<6>br0: port 4(ra1) entering forwarding state
<4>RT305x_ESW: Link Status Changed
<4>RT305x_ESW: Link Status Changed
<4>RT305x_ESW: Link Status Changed
<4>RT305x_ESW: Link Status Changed
<4>RT305x_ESW: Link Status Changed
AZERTY123
DD-WRT User


Joined: 07 Mar 2012
Posts: 57

PostPosted: Sat Mar 24, 2012 17:40    Post subject: Reply with quote
OK, Here is the startup script that seems to automate the modeswitch successfully every-time:
(I know it's blunt brute force Embarassed )
startup wrote:
sleep 30
usb_modeswitch -v 12d1 -p 1505 -V 12d1 -P 140b -d
sleep 5
usb_modeswitch -v 12d1 -p 1505 -V 12d1 -P 140b -R
sleep 5
usb_modeswitch -v 12d1 -p 1505 -V 12d1 -P 140b -d
sleep 5
usb_modeswitch -v 12d1 -p 1505 -V 12d1 -P 140b -R
sleep 5
usb_modeswitch -v 12d1 -p 1505 -V 12d1 -P 140b -d
sleep 5
usb_modeswitch -v 12d1 -p 1505 -V 12d1 -P 140b -R
[/code]
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Sat Mar 24, 2012 17:44    Post subject: Reply with quote
ok, it looks like a failed call to usb_modeswitch.

Can you get it to switch with only 1 usb_modeswitch cmd:

usb_modeswitch -v 0x12d1 -p 0x1505 -M 55534243123456780000000000000011062000000100000000000000000000

?
That is the command that dd-wrt should have sent and which should have switched it over to 12d1:140b.

_________________
Kernel panic: Aiee, killing interrupt handler!
AZERTY123
DD-WRT User


Joined: 07 Mar 2012
Posts: 57

PostPosted: Sat Mar 24, 2012 18:43    Post subject: Reply with quote
LOM wrote:
ok, it looks like a failed call to usb_modeswitch.

Can you get it to switch with only 1 usb_modeswitch cmd:

usb_modeswitch -v 0x12d1 -p 0x1505 -M 55534243123456780000000000000011062000000100000000000000000000


No way by one command. You need to use -R reset OR -d "detach only" in some form.

usb_modeswitch -v 12d1 -p 1505 -V 12d1 -P 140b -R -i 1


seems to be more effective than earlier ones.
However when I use any script as startup it won't work. Need to run manually in web interface or telnet Sad
Looks like you need to reload as loading at startup is faulty somewhere. I am newbie to linux so can't think more specifically than that..

Edit 2
------
Finally got a temporary solution (touch wood Rolling Eyes) for automatic connection at router boot:

In telnet

Code:
nvram set rc_firewall="
sleep 10
usb_modeswitch -v 12d1 -p 1505 -V 12d1 -P 140b -R -i 1 -Q
sleep 10
usb_modeswitch -v 12d1 -p 1505 -V 12d1 -P 140b -R -i 1 -Q
sleep 10
usb_modeswitch -v 12d1 -p 1505 -V 12d1 -P 140b -R -i 1 -Q

nvram commit
"


Any way I hope BS finds a proper solution.
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Sun Mar 25, 2012 13:27    Post subject: Reply with quote
AZERTY123 wrote:


Edit 2
------
Finally got a temporary solution (touch wood Rolling Eyes) for automatic connection at router boot:

In telnet

Code:
nvram set rc_firewall="
sleep 10
usb_modeswitch -v 12d1 -p 1505 -V 12d1 -P 140b -R -i 1 -Q
sleep 10
usb_modeswitch -v 12d1 -p 1505 -V 12d1 -P 140b -R -i 1 -Q
sleep 10
usb_modeswitch -v 12d1 -p 1505 -V 12d1 -P 140b -R -i 1 -Q

nvram commit
"


Any way I hope BS finds a proper solution.


Maybe the modeswitch came too early when you put it in the startup script?
Now that the script is executed later, can you increase the first sleep to 30 or why not 100 and get it to switch with one or two modeswitch commands?
I'm wondering if it is the scsi driver that takes too long time to finalize the scsi interrogation of the cd-rom so that either the stick disregards the modeswitch commands or the scsi driver has some locked ownership of the cd-rom and its id that usb_modeswitch cant release.

Looks very much like a time error, ie modeswitch cmd sent too early.

_________________
Kernel panic: Aiee, killing interrupt handler!
AZERTY123
DD-WRT User


Joined: 07 Mar 2012
Posts: 57

PostPosted: Sun Mar 25, 2012 14:33    Post subject: Reply with quote
AZERTY123 wrote:
Huawei e398 USB modem as WAN

Using startup script, tried insane sleep values even beyond 180 and repeating commands 10 times with interspersed sleeps, but no use. (Initially I mistook that it works Embarassed as I rebooted the router using the dd-wrt interface rather than power cycling).
With firewall script I am online by ~25th second.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Ralink SoC based Hardware 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