Problems with Huawei E353 modem on TP-LINK WR703N

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page Previous  1, 2
Author Message
fixdoc
DD-WRT Novice


Joined: 30 Jan 2010
Posts: 15

PostPosted: Sat Jul 07, 2012 20:39    Post subject: Reply with quote
I have tried to get the cdc_ether driver up and running with my 12d1:1f01 E353 USB modem, with some success.

I have:

* Downloaded cdc_ether.ko and usbnet.ko to my PC from
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=79336&postdays=0&postorder=asc&start=0
* WAN connection typ set to "Disabled"
* Activated JFFS2 service in Administration->Management menu
* Activated SSHd in Services->Services menu
* Installed and used WinSCP program on my PC to transfer cdc_ether.ko and usbnet.ko to my /JFFS/ router directory
* Installed Putty on my PC for Telnet access to the router

* I then ran a sequence of commands to get the cdc_ether driver up and running with my modem:

insmod /jffs/usbnet.ko
insmod /jffs/cdc_ether.ko
usb_modeswitch -v 0x12d1 -p 0x1f01 -V 0x12d1 -P 0x14db -M "55534243123456780000000000000011062000000000000100000000000000"

This is enough to get a eth2 device:

cat /proc/bus/usb/devices

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=12d1 ProdID=14db Rev= 1.02
S: Manufacturer=HUAWEI
S: Product=HUAWEI HiLink
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether
E: Ad=8f(I) Atr=03(Int.) MxPS= 64 Ivl=2ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=06 Prot=00 Driver=cdc_ether
E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms

dmesg

usb 1-1: new high speed USB device using ehci_hcd and address 3
usb 1-1: configuration #1 chosen from 1 choice
eth2: register 'cdc_ether' at usb-0000:00:04.1-1, CDC Ethernet Device, 58:2c:80:13:92:63

I then take the eth2 device up and running:

ifconfig eth2 up
brctl addif br0 eth2



Then we take a look at the available interfaces by running ifconfig

br0 Link encap:Ethernet HWaddr 00:26:F2:BA:D5:E6
inet addr:192.168.4.1 Bcast:192.168.4.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3409 errors:0 dropped:0 overruns:0 frame:0
TX packets:4251 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:287244 (280.5 KiB) TX bytes:3567590 (3.4 MiB)

br0:0 Link encap:Ethernet HWaddr 00:26:F2:BA:D5:E6
inet addr:169.254.255.1 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

eth0 Link encap:Ethernet HWaddr 00:26:F2:BA:D5:E6
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3338 errors:0 dropped:0 overruns:0 frame:0
TX packets:4297 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:349630 (341.4 KiB) TX bytes:3592472 (3.4 MiB)
Interrupt:4 Base address:0x2000

eth1 Link encap:Ethernet HWaddr 00:26:F2:BA:D5:E8
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:3 Base address:0x1000

eth2 Link encap:Ethernet HWaddr 58:2C:80:13:92:63
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:71 errors:0 dropped:0 overruns:0 frame:0
TX packets:79 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11050 (10.7 KiB) TX bytes:11959 (11.6 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MULTICAST MTU:16436 Metric:1
RX packets:378 errors:0 dropped:0 overruns:0 frame:0
TX packets:378 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:21924 (21.4 KiB) TX bytes:21924 (21.4 KiB)

vlan1 Link encap:Ethernet HWaddr 00:26:F2:BA:D5:E6
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3338 errors:0 dropped:0 overruns:0 frame:0
TX packets:4297 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:289546 (282.7 KiB) TX bytes:3592472 (3.4 MiB)


OK, the ethernet driver seems to work properly. According to the sequence described in my previous post, we should now run the udhcpc (WAN DHCP client) towards eth2 to get an IP address from the USB dongle. This is where I am stuck now. I have tried, through Telnet, to run

udhcpc -i eth2 -p /var/run/udhcpc/pid -s /tmp/udhcpc

but the command never seem to finish, and I do not get the Telnet prompt back without aborting, using Ctrl-Z.

Need som help please...
Sponsor
fixdoc
DD-WRT Novice


Joined: 30 Jan 2010
Posts: 15

PostPosted: Thu Jul 12, 2012 21:59    Post subject: Reply with quote
Finally I have got my darn Huawei E353 device to allow me internet access through DD-WRT Very Happy

To summarize this issue, the E353 Hilink USB modem, the 12d1:1f01 version, does not offer any serial modem interface (supported by DD-WRT), but instead a CDC ethernet adapter. Basic support for this new ethernet adapter can be added by adding the precomplied usbnet.ko and cdc_ether.ko packages to the router, and run a few script commands.

Quote:
insmod /jffs/usbnet.ko
insmod /jffs/cdc_ether.ko
usb_modeswitch -v 0x12d1 -p 0x1f01 -V 0x12d1 -P 0x14db -M "55534243123456780000000000000011062000000000000100000000000000"
sleep 5
ifconfig eth2 up
brctl addif br0 eth2


I my case, running a rev 19277 build, v24-sp2 (05/20/12) stdkong on a Netgear WNR-3500L unit, this means that a new "eth2" interface was added. The script work very well, and if saved as a startup script, it will create an eth2 interface at every startup.

The remaining task is to assign an IP address to eth2, and to redirect the WAN ethernet interface vlan2 traffic through the newly added interface.

The E353 acts a gateway and DHCP server at 192.168.1.1, creates a 192.168.1.x network. Other persons dealing with the same modem have run an DHCP client on the interface to obtain an IP address:
http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?t=775&sid=b8547f152ef64ce974ed7e0ff6349ab9.

A far as I understand, in DD-WRT that means using the udhcpc module, but as I stated in my previous post, I have been having problem with this.

I try to run:

Quote:

udhcpc -i eth2 -p /var/run/udhcpc.pid -s /tmp/udhcpc


This command does only work in the following sequence:

* Startup script to create eth2 is used
* WAN connection typ set to "Disabled"
* Restart router
* Router gets up and running
* Set WAN connection type to "DHCP"
* Set WAN connection typ set to "Disabled"
* Then manually run the udhcpc command described above.
* The udhcpc command then completes, however with errors:
Quote:

root@DD-WRT:~# udhcpc -i eth2 -p /var/run/udhcpc.pid -s /tmp/udhcpc
eth2: No such process
/usr/sbin/wl:-i eth2 interference 3 ->wl driver adapter not found
/usr/sbin/wl:-i eth2 interference 3 ->wl driver adapter not found
/usr/sbin/wl:-i eth2 interference 3 ->wl driver adapter not found
/usr/sbin/wl:-i eth2 interference 3 ->wl driver adapter not found
/usr/sbin/wl:-i eth2 interference 3 ->wl driver adapter not found
/usr/sbin/wl:-i eth2 interference 3 ->wl driver adapter not found
/usr/sbin/wl:-i eth2 interference 3 ->wl driver adapter not found
[1]+ Killed udhcpc -i eth2 -p /var/run/udhcpc.pid -s /tmp/udhcpc
root@DD-WRT:~#


Now it works to do the last part, redirecting from vlan2 to eth2, which can be accomplished by the following sequence:

Quote:
route add default gw 192.168.1.1 eth2
ifconfig eth2 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255
iptables --table nat --append POSTROUTING --out-interface eth2 -j MASQUERADE
iptables --append FORWARD --in-interface br0 -j ACCEPT


The internet connection throung my eth2 E353 modem then works!

When it works, the routing table looks like this:

Quote:
Destination LAN NET Subnet Mask Gateway Interface
192.168.4.0 255.255.255.0 0.0.0.0 LAN & WLAN
192.168.1.0 255.255.255.0 0.0.0.0 eth2
169.254.0.0 255.255.0.0 0.0.0.0 LAN & WLAN
0.0.0.0 0.0.0.0 192.168.1.1 eth2


and dmesg
Quote:

Linux version 2.6.24.111 (bluebat@linux-vm-os64) (gcc version 4.1.2) #132 Sun May 20 20:34:46 CEST 2012
CPU revision is: 00019740
Found a 8MB ST compatible serial flash
Determined physical RAM map:
memory: 04000000 @ 00000000 (usable)
Entering add_active_range(0, 0, 16384) 0 entries of 256 used
Zone PFN ranges:
Normal 0 -> 16384
HighMem 16384 -> 16384
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0 -> 16384
On node 0 totalpages: 16384
Normal zone: 0 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 16384 pages, LIFO batch:3
HighMem zone: 0 pages used for memmap
Movable zone: 0 pages used for memmap
Built 1 zonelists in Zone order. Total pages: 16384
Kernel command line: console=ttyS0,115200 root=1f02 rootfstype=squashfs noinitrd
Primary instruction cache 32kB, physically tagged, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, linesize 32 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 512 (order: 9, 2048 bytes)
CPU: BCM4716 rev 1 at 453 MHz
Using 226.500 MHz high precision timer.
console [ttyS0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 58616k/65536k available (3550k kernel code, 6856k reserved, 1377k data, 188k init, 0k highmem)
Calibrating delay loop... 226.09 BogoMIPS (lpj=1130496)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Generic PHY: Registered new driver
PCI: Using membase 8000000
PCI: Disabled
PCI: no core
PCI: Fixing up bus 0
NET: Registered protocol family 2
Time: MIPS clocksource has been installed.
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
WNR3500V2 GPIO Init
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
squashfs: version 3.0 (2006/03/15) Phillip Lougher
io scheduler noop registered
io scheduler deadline registered (default)
HDLC line discipline: version $Revision: 4.8 $, maxframe=4096
N_HDLC line discipline registered.
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x0 (irq = Cool is a 16550A
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
MPPE/MPPC encryption/compression module registered
NET: Registered protocol family 24
PPPoL2TP kernel driver, V1.0
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
et_module_init: passivemode set to 0x0
PCI: Setting latency timer of device 0000:00:02.0 to 64
eth0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 5.100.138.9
PCI: Setting latency timer of device 0000:00:01.0 to 64
pflash: found no supported devices
bootloader size: 262144
nvram size: 32768
sflash: Filesystem type: squashfs, size=0x51b17c
partition size = 5370880
Creating 6 MTD partitions on "sflash":
0x00000000-0x00040000 : "cfe"
0x00040000-0x007b0000 : "linux"
0x001a0c00-0x006c0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
0x007f0000-0x00800000 : "nvram"
0x006c0000-0x007a0000 : "ddwrt"
0x007b0000-0x007f0000 : "board_data"
Broadcom Watchdog Timer: 0.07 initialized.
u32 classifier
Actions configured
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
ctnetlink v0.93: registering with nfnetlink.
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
ip_tables: (C) 2000-2006 Netfilter Core Team
ClusterIP Version 0.8 loaded successfully
TCP bic registered
TCP cubic registered
TCP westwood registered
TCP highspeed registered
TCP hybla registered
TCP htcp registered
TCP vegas registered
TCP scalable registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Welcome to PF_RING 3.2.1
(C) 2004-06 L.Deri <deri@ntop.org>
NET: Registered protocol family 27
PF_RING: bucket length 128 bytes
PF_RING: ring slots 4096
PF_RING: sample rate 1 [1=no sampling]
PF_RING: capture TX No [RX only]
PF_RING: transparent mode Yes
PF_RING initialized correctly.
PF_RING: registered /proc/net/pf_ring/
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
decode 1f02
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 188k freed
roboswitch: Probing device eth0: found a 53115!
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
USB20H mdio control register : 0x80000010
PCI: Setting latency timer of device 0000:00:04.1 to 64
ehci_hcd 0000:00:04.1: EHCI Host Controller
ehci_hcd 0000:00:04.1: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:04.1: irq 5, io mem 0x18004000
ehci_hcd 0000:00:04.1: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
USB Universal Host Controller Interface driver v3.0
ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
USB20H mdio control register : 0x80000010
PCI: Setting latency timer of device 0000:00:04.0 to 64
ohci_hcd 0000:00:04.0: OHCI Host Controller
ohci_hcd 0000:00:04.0: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:04.0: irq 5, io mem 0x18009000
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usb 1-1: new high speed USB device using ehci_hcd and address 2
usb 1-1: configuration #1 chosen from 1 choice
SCSI subsystem initialized
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
br0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
device vlan1 entered promiscuous mode
device eth0 entered promiscuous mode
device eth1 entered promiscuous mode
br0: port 2(eth1) entering learning state
br0: port 1(vlan1) entering learning state
device vlan2 entered promiscuous mode
scsi 0:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
usb-storage: device scan complete
br0: topology change detected, propagating
br0: port 2(eth1) entering forwarding state
br0: topology change detected, propagating
br0: port 1(vlan1) entering forwarding state
usbcore: registered new interface driver cdc_ether
usb 1-1: usbfs: process 1371 (usb_modeswitch) did not claim interface 0 before use
usb 1-1: USB disconnect, address 2
usb 1-1: new high speed USB device using ehci_hcd and address 3
usb 1-1: configuration #1 chosen from 1 choice
eth2: register 'cdc_ether' at usb-0000:00:04.1-1, CDC Ethernet Device, 58:2c:80:13:92:63
device eth2 entered promiscuous mode
br0: port 3(eth2) entering learning state
br0: topology change detected, propagating
br0: port 3(eth2) entering forwarding state
device vlan1 left promiscuous mode
br0: port 1(vlan1) entering disabled state
device eth1 left promiscuous mode
br0: port 2(eth1) entering disabled state
device vlan1 entered promiscuous mode
br0: port 1(vlan1) entering learning state
device eth1 entered promiscuous mode
br0: port 2(eth1) entering learning state
device vlan2 left promiscuous mode
br0: topology change detected, propagating
br0: port 1(vlan1) entering forwarding state
br0: topology change detected, propagating
br0: port 2(eth1) entering forwarding state
device vlan2 entered promiscuous mode
device vlan2 left promiscuous mode
br0: port 2(eth1) entering disabled state
br0: port 1(vlan1) entering disabled state
br0: port 3(eth2) entering disabled state
device vlan1 left promiscuous mode
br0: port 1(vlan1) entering disabled state
device eth1 left promiscuous mode
br0: port 2(eth1) entering disabled state
device eth2 left promiscuous mode
br0: port 3(eth2) entering disabled state
br0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
device vlan1 entered promiscuous mode
device eth1 entered promiscuous mode
br0: port 2(eth1) entering learning state
br0: port 1(vlan1) entering learning state
device vlan2 entered promiscuous mode
br0: topology change detected, propagating
br0: port 2(eth1) entering forwarding state
br0: topology change detected, propagating
br0: port 1(vlan1) entering forwarding state


Back to the problem:

Why does it only work after the disable WAN->enable WAN->disable WAN sequence?

Do I need the udhcpc, or can I assign a static address instead?

What command logs do you need from me?
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7647

PostPosted: Fri Jul 13, 2012 5:10    Post subject: Reply with quote
fixdoc wrote:
Finally I have got my darn Huawei E353 device to allow me internet access through DD-WRT Very Happy

To summarize this issue, the E353 Hilink USB modem, the 12d1:1f01 version, does not offer any serial modem interface (supported by DD-WRT), but instead a CDC ethernet adapter. Basic support for this new ethernet adapter can be added by adding the precomplied usbnet.ko and cdc_ether.ko packages to the router, and run a few script commands.

Quote:
insmod /jffs/usbnet.ko
insmod /jffs/cdc_ether.ko
usb_modeswitch -v 0x12d1 -p 0x1f01 -V 0x12d1 -P 0x14db -M "55534243123456780000000000000011062000000000000100000000000000"
sleep 5
ifconfig eth2 up
brctl addif br0 eth2


I my case, running a rev 19277 build, v24-sp2 (05/20/12) stdkong on a Netgear WNR-3500L unit, this means that a new "eth2" interface was added. The script work very well, and if saved as a startup script, it will create an eth2 interface at every startup.



I think your problem stems from eth2 being reserved within dd-wrt for a second wifi radio, the sequence of wl -i commands is dd-wrt trying to get the radio info.
I guess it would work much better if you have had a dual radio router in which case your Huawei stick would become the eth3 device.


Your connection has a private ip address, much the same as what you get from an ADSL modem unless you configure the modem for bridged mode.
What settings are available in the sticks internal web server that Uffe mentioned?
Does the stick have a built in ppp client which connects using logon credential which you enter in the web server?
When running the stick under windows, do you get a private or a public ip address on the win computer?

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


Joined: 30 Jan 2010
Posts: 15

PostPosted: Fri Jul 13, 2012 21:49    Post subject: Reply with quote
Quote:
Your connection has a private ip address, much the same as what you get from an ADSL modem unless you configure the modem for bridged mode.


Yepp, it acts very much like an ADSL modem (or router) with DHCP server enabled.

Quote:
What settings are available in the sticks internal web server that Uffe mentioned?


Web configuration interface is at 192.168.1.1.
There is a tab "Network Settings", but the only thing there is Registration Mode selector that is greyed out and set to "Automatic". Since the web page is branded to "3", I guess they may have chosen to lock it to avoid support issues.


Quote:
Does the stick have a built in ppp client which connects using logon credential which you enter in the web server?


Nope, no credentials. It asked for pin once, and ever since it is just to insert the stick.

The normal use in a Windows PC is to insert the stick, wait approx 15 seconds, and then a web browser is open automatically, showing the "3.se" as start page. Then it is just to start surfing, it is really simple to use.

It shows up as a "Windows Mobile-based Internet Sharing Device" under network connections (same thing when I look at the corresponding windows USB devices).

Quote:
When running the stick under windows, do you get a private or a public ip address on the win computer?


The connection gets the address via DHCP, everything looks the same as for any standard ethernet connection with DHCP.


C:\Documents and Settings\Administratör>ipconfig /all


Ethernet-kort 3 dongle:

Anslutningsspecifika DNS-suffix . :
Beskrivning . . . . . . . . . . . : Windows Mobile-based Internet Sharing Device
Fysisk adress . . . . . . . . . . : 58-2C-80-13-92-63
DHCP aktiverat . . . . . . . . . : Ja
Autokonfiguration aktiverat . . . : Ja
IP-adress . . . . . . . . . . . . : 192.168.1.100
Nätmask . . . . . . . . . . . . . : 255.255.255.0
Standard-gateway . . . . . . . . : 192.168.1.1
DHCP-server . . . . . . . . . . . : 192.168.1.1
DNS-servrar . . . . . . . . . . . : 192.168.1.1
192.168.1.1
Lånet erhölls . . . . . . . . . . : den 13 juli 2012 23:07:25
Lånet upphör . . . . . . . . . . : den 14 juli 2012 23:07:25

This is exactly the same settings as I get from the dongle when I manage to complete the udhcpc command.

Is there any workaround you can see regarding the eth2 collision?
fixdoc
DD-WRT Novice


Joined: 30 Jan 2010
Posts: 15

PostPosted: Sun Jul 15, 2012 20:46    Post subject: Reply with quote
I managed to move the e353 ethernet device to eth3 by first creating a new dummy bridge device called "eth2":

brctl addbr eth2
ifconfig eth2 up
usb_modeswitch -v 0x12d1 -p 0x1f01 -V 0x12d1 -P 0x14db -M "55534243123456780000000000000011062000000000000100000000000000"
...

but that did not change anything. Eth3 also works after the WAN disable -> WAN DHCP -> WAN disable sequence, otherwise not (see qoute below for response, it it same as with eth2)

My conclusion is that eth2 or eth3 does not matter, that is not the problem in this case.


Ok, I have experimented with udhcpc, and i think that the problem lays in the "-s" script that is referenced.

I the man page for udhcpc, and different DD-WRT places, the script file "default.script" is referenced, so I looked it up and added it to the router. With this script, I was able to get a dhcp address every time from the E353, but internet access did not work.

That file is however not used i current DD-WRT, instead /tmp/udhcpc is a symbolic link to /sbin/rc. I guess
that means that /sbin/rc is run whenever you run the udhcpc command. Regarding this, I must ask why

Quote:
root@DD-WRT:/tmp# udhcpc -i eth3 -p /var/run/udhcpc.pid -s /tmp/udhcpc
eth3: No such process
/usr/sbin/wl:-i eth2 interference 3 ->wl driver adapter not found
/usr/sbin/wl:-i eth2 interference 3 ->wl driver adapter not found
/usr/sbin/wl:-i eth2 interference 3 ->wl driver adapter not found
/usr/sbin/wl:-i eth2 interference 3 ->wl driver adapter not found
/usr/sbin/wl:-i eth2 interference 3 ->wl driver adapter not found
/usr/sbin/wl:-i eth2 interference 3 ->wl driver adapter not found
/usr/sbin/wl:-i eth2 interference 3 ->wl driver adapter not found
root@DD-WRT:/tmp#


works but

Quote:
root@DD-WRT:/tmp# udhcpc -i eth3 -p /var/run/udhcpc.pid -s /sbin/rc
root@DD-WRT:/tmp#


does not give the same result. What is special with that symbolic link that make the /sbin/rc "run" properly?

My conclusion now is that something happens when the /sbin/rc "script" is run, that makes my internet connection work, under certain circumstances. Is /sbin/rc really a script, that file looks more like complied code than a script to me?

Exactly what does that file do?
vytasm
DD-WRT Novice


Joined: 04 Jul 2013
Posts: 1

PostPosted: Thu Jul 04, 2013 8:02    Post subject: Reply with quote
I know the topic is quite old, but seraching the net I have found it as was looking solution for E353 HiLink modem to use it on TP-Link router so hope this will help to somebody:

Copied from: http://blog.phoenixhaven.net/2012/09/11/huawei-e3131-disabling-hilink-and-turning-into-a-dialup-modem/

Disabling HiLink and turning into a dialup modem.

For a while been searching for the holy grail of disabling HiLink and reverting my new Huawei E3131 dongles back to the dialup modem based operation of previous dongles.

First step is to enable the serial console. To do this plug in your dongle and visit the following webpage

Quote:
http://192.168.1.1/html/switchProjectMode.html


The modem will now restart and present a couple of serial interfaces instead.

Connect to the fist of the two interfaces, eg /dev/ttyUSB0 with a Baud rate of 9600bps using a terminal client of your choice. I used minicom, which is available in most distros repos. And type the modem the following commands.

Quote:

AT^U2DIAG=0
AT+CFUN=4
AT+CFUN=6


If this is succesful it will respond with OK.
This will cause the device to permamently function in modem mode when plugged in. To restore its HiLink functionality. Do the same and send the following commands instead.

Quote:

AT^U2DIAG=119
AT+CFUN=4
AT+CFUN=6


Once the device has had its mode changed in this way. It requires removing and plugging back in to take effect.

Operating in modem mode it will change its product ID and should look like this (lsusb)

Quote:
Bus 001 Device 082: ID 12d1:1c05 Huawei Technologies Co., Ltd. E173s 3G broadband stick (modem on)


If you don’t have the virtual tty’s created upon device insertion. Then manually bind it too the option module like follows (As root obviously)

Quote:
echo “12d1 1c05″ > /sys/bus/usb-serial/drivers/option1/new_id


From there you can dial out as accustomed using the first created virtual tty. eg, /dev/ttyUSB0

Updated above text according to working solution using windows 7: http://mybroadband.co.za/vb/showthread.php/507680-Huawei-HiLink-modems-%28E303-E3131-etc-%29?s=3babd54325800d116efbd52582cf7d8a&p=10250878&viewfull=1#post10250878

Tested with E353 HiLink USB stick.
Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC 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