Differences

This shows you the differences between two versions of the page.

doc:howtobuild:wireless-router-with-a-3g-dongle [2012/12/08 23:00]
ajo
doc:howtobuild:wireless-router-with-a-3g-dongle [2014/10/14 14:58] (current)
alive4ever umbim addition, small layout modification, serial debugging
Line 1: Line 1:
-====== Wireless router with a 3G dongle and multiwan for failover on Wired, Wireless client (routed) and 3G======+====== Building image with support for 3g/4g and usb tethering ======
-Please check [[doc:recipes:3gdongle]] 
-With this recipe you can create a wireless router which is connected to either a wired, a wireless or a 3G wireless connection. The multiwan package is used to do the failover between the three WAN variants.+===== Preparing build environment =====
-I have this running on a ASUS WL-500g Premium v1 with an Atheros wireless card. The 3G dongle is a K3565-Z from Vodafone. Latest Backfire is used and build by myself from subversion __without__ a WebUI.+First of all, you need a complete build environment, either physical or virtual system, as described on the [[doc/howto/buildroot.exigence|OpenWrt buildroot exigence]].
-If you wish to get Leadtek Flash OFDM working on this router, please check https://www.accalio.com/index.php?id=301+You need to [[doc/howto/buildroot.exigence#downloading.sources|clone OpenWrt git repository]] on your build system and [[doc/howto/buildroot.exigence#downloading.and.installing.feeds|synchronize all package feeds]] with your config file.
-===== Building OpenWrt =====+Be sure to understand the [[doc/howto/build|build procedure]] to prevent build failure.
-  - [[doc:howto:buildroot.exigence|OpenWrt Buildroot – Installation]] +===== Configuring packages =====
-  - [[doc:howto:build|OpenWrt Buildroot – Usage]]+
 +==== Selecting target architecture and profile ====
 +
 +Run ''make menuconfig'' to [[doc/howto/build#image.configuration|configure OpenWrt packages]].
 +
 +Select your architecture on which you would put your compiled OpenWrt image. Then select your target profile, according your hardware type.
 +
 +If you have selected correct value for target system, target profile, and target images, go to next step.
 +
 +
 +==== Selecting kernel modules for usb networking support. ====
 +
 +Go to ''Kernel Modules -> USB Support''.
 +
 +Select the following modules by pressing ''y'' to include the modules within the compiled image.
<code> <code>
-svn checkout svn://svn.openwrt.org/openwrt/branches/backfire wl-500gpv1+Kernel Modules -> USB Support 
 +<*> kmod-usb2 
 +<*> kmod-usb-ohci 
 +<*> kmod-usb-uhci 
 +<*> kmod-usb-acm # For ACM based modem, such as Nokia Phones 
 +<*> kmod-usb-net # For tethering and rndis support
</code> </code>
-Backport the 6in4 package to Backfire:+**kmod-usb-net** -> to support usb networking interface. 
 + 
 +Select all subsets if you want perfect support for usb network interfaces, including Android and iPhone tethering. Some newer 4g dongles use usb network interface (rndis) instead of legacy serial protocol.
<code> <code>
-svn export svn://svn.openwrt.org/openwrt/trunk/package/6in4 package/6in4; svn add package/6in4+<*> kmod-usb-net............... Kernel modules for USB-to-Ethernet convertors 
 +  <*>  kmod-usb-net-asix...... Kernel module for USB-to-Ethernet Asix convertors   
 +  <*>  kmod-usb-net-cdc-eem..................... Support for CDC EEM connections   
 +  -*-  kmod-usb-net-cdc-ether.............. Support for cdc ethernet connections   
 +  <*>  kmod-usb-net-cdc-mbim..................... Kernel module for MBIM Devices   
 +  -*-  kmod-usb-net-cdc-ncm..................... Support for CDC NCM connections   
 +  <*>  kmod-usb-net-cdc-subset...... Support for CDC Ethernet subset connections   
 +  <*>  kmod-usb-net-dm9601-ether........ Support for DM9601 ethernet connections   
 +  <*>  kmod-usb-net-hso.. Kernel module for Option USB High Speed Mobile Devices   
 +  <*>  kmod-usb-net-ipheth..................... Apple iPhone USB Ethernet driver   
 +  <*>  kmod-usb-net-kalmia................... Samsung Kalmia based LTE USB modem   
 +  <*>  kmod-usb-net-kaweth.. Kernel module for USB-to-Ethernet Kaweth convertors   
 +  <*>  kmod-usb-net-mcs7830                                                       
 +  <*>  kmod-usb-net-pegasus                                                       
 +  <*>  kmod-usb-net-qmi-wwan.................................... QMI WWAN driver   
 +  <*>  kmod-usb-net-rndis......................... Support for RNDIS connections   
 +  <*>  kmod-usb-net-sierrawireless.......... Support for Sierra Wireless devices   
 +  <*>  kmod-usb-net-smsc95xx. SMSC LAN95XX based USB 2.0 10/100 ethernet devices 
 +  </code> 
 + 
 +**kmod-usb-serial** -> to support legacy 3g dongles. 
 + 
 +Select all subsets to ensure that your dongle works. Most 3g dongles use the option driver or generic serial driver to work. Note that option driver has better capability of distinguishing between modem serial interfaces and storage interface than generic usb serial driver. 
 +<code> 
 +<*> kmod-usb-serial..................... Support for USB-to-Serial converters     
 +  <*>  kmod-usb-serial-ark3116........ Support for ArkMicroChips ARK3116 devices   
 +  <*>  kmod-usb-serial-belkin........................ Support for Belkin devices   
 +  <*>  kmod-usb-serial-ch341.......................... Support for CH341 devices   
 +  <*>  kmod-usb-serial-cp210x........... Support for Silicon Labs cp210x devices   
 +  <*>  kmod-usb-serial-cypress-m8.............. Support for CypressM8 USB-Serial   
 +  <*>  kmod-usb-serial-ftdi............................ Support for FTDI devices   
 +  <*> kmod-usb-serial-ipw.................... Support for IPWireless 3G devices     
 +  <*> kmod-usb-serial-keyspan........ Support for Keyspan USB-to-Serial devices     
 +  <*> kmod-usb-serial-mct.............. Support for Magic Control Tech. devices     
 +  <*> kmod-usb-serial-mos7720.............. Support for Moschip MOS7720 devices     
 +  <*> kmod-usb-serial-motorola-phone............ Support for Motorola usb phone     
 +  <*> kmod-usb-serial-option................... Support for Option HSDPA modems     
 +  <*> kmod-usb-serial-oti6858...... Support for Ours Technology OTI6858 devices     
 +  <*> kmod-usb-serial-pl2303............... Support for Prolific PL2303 devices     
 +  <*> kmod-usb-serial-qualcomm................. Support for Qualcomm USB serial     
 +  <*> kmod-usb-serial-sierrawireless....... Support for Sierra Wireless devices     
 +  <*> kmod-usb-serial-ti-usb...................... Support for TI USB 3410/5052     
 +  <*> kmod-usb-serial-visor............... Support for Handspring Visor devices     
 +  -*- kmod-usb-serial-wwan..................... Support for GSM and CDMA modems 
 +  <;/code> 
 + 
 +==== Additional packages required for 3g functionality ==== 
 + 
 +=== ppp, chat, and uqmi === 
 +Go to ''Network'' section. Select `uqmi` to support qmi interface and `ppp` to support standard point-to-point protocol. ''chat'' is needed to establish serial communication to prepare PPP link negotiation. 
 +<code> 
 +Network 
 +  <*>chat 
 +  <*>ppp 
 +  <*>uqmi
</code> </code>
-Checkout the packages feed and symlink (install in menuconfig) only usb-modeswitch, usb-modeswitch-data, usbutils and multiwan packages from the packages feed.+=== mbim === 
 +Some dongles are using mbim protocol. To make use of mbim protocol, install ''umbim'' package.
<code> <code>
-./scripts/feeds update packages +Network 
-./scripts/feeds install usb-modeswitch usb-modeswitch-data usbutils multiwan+ <*>umbim
</code> </code>
-Now run ''make menuconfig'' and select at least the packages in the list below.+=== comgt and usb-modeswitch === 
 +Go to ''Utilities'' section. Select ''comgt'' to provide control over 3g interface and ''usb-modeswitch'' to provide mode switching between virtual cd-rom interface to serial interface. 
 +<code> 
 +Utilities 
 +  <*>comgt 
 +  <*>usb-modeswitch 
 +</code>
-  * Target System: Broadcom BCM947xx/953xx +=== minicom, picocom, and screen === 
-  * Target Profile: ASUS WL-500g Premium v1 (Atheros WiFi)+If you want to debug serial communication, you may want to install serial terminal. There are several choices of serial terminal, such as minicom, picocom, and screen. I recommend ''picocom'' because of its small size. 
 +<code> 
 +Utilities --> Terminal 
 +  <*>picocom 
 +</code> 
 +Screen can be used as persistent session manager. Minicom has a nice interface, optimized for serial communication. 
 +<code> 
 +Utilities 
 +  < >screen 
 +Utilities --> Terminal 
 +  < >minicom 
 +</code>
-  * Base System +For devices with 4MB flash, ''picocom'' is the only serial terminal that can be installed.
-    * qos-scripts: <*>+
-  * Network +==== Web Interface Support ====
-    * multiwan: <*> +
-    * wpad: <*>+
-  * Kernel modules +If you want to control your 3g dongle with Luci web interface, go to Luci. 
-   * USB Support +<code> 
-     * kmod-usb-serial: <*> +Luci 
-       * kmod-usb-serial-option: <*>+1. Collections 
 +  <*> luci 
 +3. Applications 
 +  <*> luci-app-multiwan (optional to support multiple 3g dongles) 
 + <*> luci-app-qos (optional to provide QOS support) 
 +6. Protocols 
 +  <*> luci-proto-3g 
 + -*- luci-proto-ppp 
 +</code>
-  * Utilities +===== Build process ===== 
-   * comgt: <*+Continue selecting packages as needed. When you are done, run the build process 
-   * usb-modeswitch: &lt;*&gt+<code
-     * usb-modeswitch-data: <*> +time make V=s download &amp;&amp
-   * usbutils: <*>+time make V=s 
 +</code>
-Finally run ''make'' to build OpenWrt Backfire.+Faster build time can be achieved by enabling multiple build jobs. In case of quad-core cpu((Optimal build performance can be achieved by [[https://source.android.com/source/building-running.html#build-the-code|doubling the number of cpu cores]])). 
 +<code> 
 +time make -j8 V=s 
 +</code> 
 +If build process is successful, your firmware images will be located on ''bin/target-platform/''.
 +If your hardware-specific image name could not be found, it's possible that you added too many packages that don't fit your hardware flash memory. Try reducing packages and restart [[doc/howto/build| the build process]] if such case happens.

Back to top

doc/howtobuild/wireless-router-with-a-3g-dongle.1355004009.txt.bz2 · Last modified: 2012/12/08 23:00 by ajo