Hi. I've tested cdc_ncm driver on 12.09-rc1/AR71xx. The driver seems work fine on kernel 3.3 (at least in normal situation). I hope this will help someone who want to use a mobile-router (pocket wifi) both indoors and outdoors. If you have an E587 and an AR71xx device, please enjoy this how to.
I just cherry picked from another forum.:) Thanks Tommy, Bjørn and Olof!
How to use my Huawei E3276 4G modem on Ubuntu 12.04
https://answers.launchpad.net/ubuntu/+s … ion/211095
My environment
~ ~ ~ [wlan0: AG300H :wlan1] ~ ~ ~
Internet <--3G--> (E587) <--USB--> [wwan0: /OpenWRT :eth0] <--LAN--> [PC1]..[PCn]
192.168.1.1: E587 -- Firewall, DHCP/DNS-Server, Default-gateway
192.168.1.2: WZR-HP-AG300H / AA rc1 (r34185) -- Bridge-only
192.168.1.5: PC1
Some wireless devices connected to wlan0/1 and wired PCs can share E587's 3G connection. I always disable WiFi on E587 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 cdc_ncm package.
opkg -nodeps install http://galapago.sakura.ne.jp/openwrt/12_09_rc1/kmod-usb-net-cdc-ncm_3.3.8-1_ar71xx.ipk
# Install modeswitch's parameter file for E587
cd /etc/usbmodeswitch.d
wget -O 12d1:1c1b http://galapago.sakura.ne.jp/openwrt/12_09_rc1/12d1_1c1b
2. Plug the egg and see outputs.
usb 1-1: new high-speed USB device number 5 using ehci-platform
scsi3 : usb-storage 1-1:1.0
usb 1-1: USB disconnect, device number 5
usb 1-1: new high-speed USB device number 6 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
scsi4 : usb-storage 1-1:1.1
usb 1-1: MAC-Address: 0xNN:0xNN:0xNN:0xNN:0xNN:0xNN
cdc_ncm 1-1:1.2: wwan0: register 'cdc_ncm' at usb-ehci-platform-1, Mobile Broadband Network Device, NN:NN:NN:NN:NN:NN
scsi 4:0:0:0: CD-ROM HUAWEI Mass storage ffff PQ: 0 ANSI: 2
scsi 4:0:0:1: Direct-Access HUAWEI Mass storage ffff PQ: 0 ANSI: 2
sd 4:0:0:1: [sdb] 3868672 512-byte logical blocks: (1.98 GB/1.84 GiB)
sd 4:0:0:1: [sdb] Write Protect is off
sd 4:0:0:1: [sdb] Mode Sense: 0f 00 00 00
sd 4:0:0:1: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sdb: sdb1
sd 4:0:0:1: [sdb] Attached SCSI removable disk
3. Adjust bridge configuration.
(or edit luci's bridge setting on LAN's physical settings section)
uci set network.lan.ifname="$(uci get network.lan.ifname) wwan0"
uci commit network
(e587 is shown in my environment as "wwan0")
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
mkdir /mnt/microsd
mount /dev/sdb1 /mnt/microsd
ls /mnt/microsd/
How to build your own module.
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. r34185)
mkdir work
cd ~/work
wget http://downloads.openwrt.org/attitude_adjustment/12.09-rc1/ar71xx/generic/config.ar71xx_generic
grep version: config.ar71xx_generic
# Get the sources for AA-rc1
svn co -r 34185 svn://svn.openwrt.org/openwrt/branches/attitude_adjustment
cd attitude_adjustment
cp ../config.ar71xx_generic .config
make menuconfig
make -j2 V=99
# Apply patch
cd ~/work
wget http://galapago.sakura.ne.jp/openwrt/12_09_rc1/aa_rc1_cdc_ncm.patch
cd attitude_adjustment
patch -p1 < ../aa_rc1_cdc_ncm.patch
make menuconfig # set 'm' to USB_NET_CDC_NCM
make -j2 V=99
ls -l bin/ar71xx/packages/*cdc-ncm*
Thank you for you finished reading my cheap English!:)
(Last edited by cawcaw on 15 Dec 2012, 16:17)