Huawei works in Hilink mode

This is how I got Huawei M150-2 E3372h-153 4G dongle to work in Hilink-mode in Openwrt. I tried many other ways without success.
Router is Bewan iBox v1.0 Arcadyan Danube ARV7510PW / ARV4510PW (CPU Infineon Danube PSB50702).

Router software downloaded from Openwrt.org.
Firmware Version OpenWrt Barrier Breaker 14.07 / LuCI 0.12 Branch (0.12+git-15.006.29251-d876593)
Kernel Version 3.10.49.

Some dmesg when installed dongle into usb before any changes:

[  326.888000] usb 1-3: new high-speed USB device number 2 using ehci-pci
[  327.068000] usb-storage 1-3:1.0: USB Mass Storage device detected
[  327.080000] scsi0 : usb-storage 1-3:1.0
[  328.096000] scsi 0:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[  328.120000] scsi 0:0:0:1: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[  328.172000] sd 0:0:0:1: [sda] Attached SCSI removable disk
[  328.512000] usb 1-3: USB disconnect, device number 2
[  329.116000] usb 1-3: new high-speed USB device number 3 using ehci-pci
[  329.440000] cdc_ether 1-3:1.0 eth1: register 'cdc_ether' at usb-0000:00:0f.2-3, CDC Ethernet Device, 0c:5b:8f:27:9a:64
[  329.468000] usb-storage 1-3:1.2: USB Mass Storage device detected
[  329.476000] scsi1 : usb-storage 1-3:1.2
[  330.492000] scsi 1:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[  330.528000] sd 1:0:0:0: [sda] Attached SCSI removable disk

No need to change into Stick-mode.
Somehow the dongle is hidden in system with hardware name "eth1". It does not show in logs. Someone might know where it appears ...

First get terminal connection into box with ssh or serial.
Then insert dongle and wait a while, until dmesg shows no more new lines about it.
Last lines may be like "TF CARD STORAGE" or so.
run command "udhcpc -i eth1 -b", that retrieves ip-address from dongle, and sets sefault gateway.
It is alternative to dhclient-command.

root@OpenWrt:~# udhcpc -i eth1 -b
udhcpc (v1.22.1) started
Sending discover...
Sending discover...
Sending select for 192.168.8.100...
Lease of 192.168.8.100 obtained, lease time 86400
udhcpc: ifconfig eth1 192.168.8.100 netmask 255.255.255.0 broadcast +
udhcpc: setting default routers: 192.168.8.1

Testing connection:

root@OpenWrt:~# ping www.example.com
PING www.example.com (93.184.216.34): 56 data bytes
64 bytes from 93.184.216.34: seq=0 ttl=52 time=150.727 ms
64 bytes from 93.184.216.34: seq=1 ttl=52 time=177.529 ms

If that is succesful, maybe all can be made to work automatically.

Next edit /etc/config/network and add these three lines:

config interface 'wan3g'
	option ifname 'eth1'
	option proto 'dhcp'

Commit changes running command "/etc/init.d/network reload".

Running command "ifconfig" should show that eth1 is now there.
And pinging outside world also works?

Then, open router's web page 192.168.n.n and go to Interfaces.
There should be new interface "WAN3G".
Edit it, and in "Firewall settings" put firewall on.
Now internet connection should work without other changes. Dongle management page is at address 192.168.8.1.
There you can change settings, like is PIN-code in use, and other things.


after editing my /etc/config/network:

root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'ff0e:ab42:fa53::/48'

config interface 'lan'
	option force_link '1'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ifname 'eth0.1'
	option macaddr '00:0c:c3:d4:00:58'
	option ipaddr '192.168.0.10'
	option dns '8.8.8.8'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0 1 2 3 4 5t'
	option vid '1'

config atm-bridge 'atm'
	option vpi '1'
	option vci '32'
	option encaps 'llc'
	option payload 'bridged'

config interface 'wan'
	option _orig_ifname 'nas0'
	option _orig_bridge 'false'
	option proto 'dhcp'
	option ifname 'nas0'

config interface 'wan6'
	option ifname '@wan'
	option proto 'dhcpv6'

config interface 'wan3g'
	option ifname 'eth1'
	option proto 'dhcp'

config adsl 'dsl'
	option annex 'a'
	option firmware '/lib/firmware/adsl.bin'
-----------------------
root@OpenWrt:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:00:81:89:F0:00  
          inet6 addr: ff0e::200:ab42:fa53:f000/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8027 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11178 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:948676 (926.4 KiB)  TX bytes:6656516 (6.3 MiB)

eth0.1    Link encap:Ethernet  HWaddr 00:0C:C3:D4:00:58  
          inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: ff0e::200:ab42:fa53:58/64 Scope:Link
          inet6 addr: ff0e::200:ab42::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8027 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11174 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:804190 (785.3 KiB)  TX bytes:6611372 (6.3 MiB)

eth1      Link encap:Ethernet  HWaddr 0C:5B:8F:27:9A:64  
          inet addr:192.168.8.100  Bcast:192.168.8.255  Mask:255.255.255.0
          inet6 addr: ff0e::200:ab42:fa53:9a64/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5575 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4186 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4274946 (4.0 MiB)  TX bytes:555111 (542.1 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:92 errors:0 dropped:0 overruns:0 frame:0
          TX packets:92 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7793 (7.6 KiB)  TX bytes:7793 (7.6 KiB)

nas0      Link encap:Ethernet  HWaddr 00:00:01:00:00:00  
          inet6 addr: ff0e::200:ab42:fa53:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:503 errors:503 dropped:0 overruns:503 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:176328 (172.1 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:0C:C3:D4:00:59  
          inet6 addr: ff0e::200:ab42:fa53:59/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:59 errors:0 dropped:0 overruns:0 frame:0
          TX packets:63 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:10854 (10.5 KiB)  TX bytes:12520 (12.2 KiB)

disabled services:dsl_control miniupnp mjpeg_stream dsl_fs for freeing RAM and lowering stress
removed software: motion kmod_video_core + all other video


/etc/usb-mode.json does not have any match for my dongle Megafon M150-2 aka E3372h-153 Hilink-mode vendor id:12d1 product id:14dc. I did not do any changes into that file, becouse no need to.

I hope this is useful to someone.
regards marco

1 Like