Topic: HOWTO setup USB tethering via Huawei E5830/E5830S (hw_cdc_driver)
Hi. I've tested Huawei's cdc driver on trunk/AR71xx. The driver seems work fine on kernel 3.3 (at least in normal situation). I understand this may be a temporarily solution, thankfully, cdc_ether driver is growing everyday. I hope this will help someone who want to use a mobile-router (pocket wifi) both indoors and outdoors. If you have E5830/S and AR71xx device, please try attached ipk.
~ ~ ~ [wlan0: AG300H :wlan1] ~ ~ ~ Internet <--3G--> (E5830/S) <--USB--> [eth2: /OpenWRT :eth0] <--GbLAN--> [PC1]..[PCn]
192.168.1.1: d25hw(E5830S JP_Localized) -- Firewall, DHCP/DNS-Server, Default-gateway
192.168.1.2: WZR-HP-AG300H / Trunk (r32895) -- Bridge-only
Some wireless devices connected to wlan0/1 and wired PCs can share E5830's 3G connection. I always disable WiFi on E5830 indoors.
How to setup
1. Install module and packages.
# Install packages for accessing microsd card.
opkg install kmod-usb-storage opkg install kmod-fs-msdos kmod-fs-vfat opkg install kmod-nls-utf8 kmod-nls-cp437 kmod-nls-iso8859-1
# Install packages for communication between devices.
opkg install usb-modeswitch usb-modeswitch-data opkg install kmod-usb-serial-option kmod-usb-net
# Install hw_cdc_driver package.
(I am afraid you won't success to install this. Please read #4,#6 first.)
2. Adjust bridge configuration.
(or edit luci's bridge setting after reboot)
IFNAME=`uci get network.lan.ifname` uci set network.lan.ifname="$IFNAME eth2" uci commit network
(e5830 is shown in my environment as "eth2")
3. Plug the egg and see outputs.
usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb : Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. usbcore: registered new interface driver usbserial USB Serial support registered for generic usbcore: registered new interface driver usbserial_generic usbserial: USB Serial Driver core USB Serial support registered for GSM modem (1-port) usbcore: registered new interface driver option option: v0.7.2:USB Driver for GSM modems usbcore: registered new interface driver huawei_ether : usb 1-1: new high-speed USB device number 2 using ehci-platform scsi0 : usb-storage 1-1:1.0 usb 1-1: USB disconnect, device number 2 usb 1-1: new high-speed USB device number 3 using ehci-platform option 1-1:1.0: GSM modem (1-port) converter detected usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0 scsi1 : usb-storage 1-1:1.1 device eth2 entered promiscuous mode br-lan: port 4(eth2) entered forwarding state br-lan: port 4(eth2) entered forwarding state br-lan: port 4(eth2) entered disabled state scsi 1:0:0:0: CD-ROM HUAWEI Mass storage ffff PQ: 0 ANSI: 2 scsi 1:0:0:1: Direct-Access HUAWEI Mass storage ffff PQ: 0 ANSI: 2 sd 1:0:0:1: [sda] 3932160 512-byte logical blocks: (2.01 GB/1.87 GiB) sd 1:0:0:1: [sda] Write Protect is off sd 1:0:0:1: [sda] Mode Sense: 00 00 00 00 sd 1:0:0:1: [sda] Asking for cache data failed sd 1:0:0:1: [sda] Assuming drive cache: write through # should to adjust. sd 1:0:0:1: [sda] Asking for cache data failed sd 1:0:0:1: [sda] Assuming drive cache: write through sda: sd 1:0:0:1: [sda] Asking for cache data failed sd 1:0:0:1: [sda] Assuming drive cache: write through sd 1:0:0:1: [sda] Attached SCSI removable disk hw_send_qmi_request: 0 Get response failed hw_send_qmi_request: get the conn status req=22 resp hw_cdc_check_status_work: carrier on br-lan: port 4(eth2) entered forwarding state
4. Test connections from AG300H
ping 192.168.1.1 ping some_internet_host
5. How to access to microsd from AG300H
eg. 2GB microSD (single partition)
mkdir /mnt/microsd mount /dev/sda /mnt/microsd ls /mnt/microsd/
Module's original source code
is included in "Linux_Driver_4.19.07.00.tar.gz". Available at http://www.huaweidevice.com/worldwide/ (Please search the words, "linux driver")
How to build your own module.
I am new to OpenWRT, so please tell me anything if you can make this procedure better and righter.
I think I should to define such a lot of package dependencies in mk file. And I am sorry I know I should to build for all platform when I post. If you interested in this post, please try to compile your own module. Here is how I compiled for AR71xx.
# Get current config for AR71xx and check revision number (e.g. r32991) mkdir work cd ~/work wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/config grep version: config # Get the trunk for latest snapshot svn co -r 32991 svn://svn.openwrt.org/openwrt/trunk/ cd trunk cp ../config target/linux/ar71xx/config32991 mv ../config .config make menuconfig make -j2 V=99 # Get driver source cd ~/work wget <Linux_Driver_4.19.07.00.tar.gz> tar xvf Linux_Driver_4.19.07.00.tar.gz cp driver/ndis_driver/ndis_src/src/hw_cdc_driver.c trunk/build_dir/linux-ar71xx_generic/linux-3.3.8/drivers/net/usb/ # Apply patch wget http://galapago.sakura.ne.jp/openwrt/hw_cdc_driver.patch cd trunk patch -p0 < ~/work/hw_cdc_driver.patch make menuconfig # set 'm' to HW_CDC_DRIVER make -j2 V=99 ls -l bin/ar71xx/packages/kmod-usb/*hw-cdc* ls -l build_dir/linux-ar71xx_generic/packages/ipkg-ar71xx/*hw-cdc*
Thank you for you finished reading my cheap English!:)