Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up a Wireless Internet Connection

From bering-uClibc
Revision as of 11:23, 23 June 2013 by Davidmbrooke (Talk | contribs) (Expanded notes on Huawei E3131)

Jump to: navigation, search
Advanced Topics - Setting Up a Wireless Internet Connection
Prev Bering-uClibc 4.x - User Guide Next



A common use case for a Bering-uClibc installation is to act as a router / firewall serving a local network and providing a connection to the Internet. Most often the Internet connection takes the form of a hard-wired link, for example via a Cable or ADSL modem. This has the advantage of offering a high-quality connection, often also with a high bandwidth. However in some cases a hard-wired Internet connection is not available but Internet connectivity is still desired. Many locations now have 3G (or even 4G) mobile telephony signals available and it is increasingly practical to use these to provide Internet connectivity as a temporary or permanent alternative to a hard-wired connection. Sometimes this is referred to as Mobile Broadband.

This article describes how to use a Mobile Broadband Modem (sometimes informally referred to as a "3G dongle" or "modem stick") with Bering-uClibc 4.x in order to provide an external network connection, either as the only source of Internet connectivity or as a secondary fall-back alongside a hard-wired primary connection.

A fundamental requirement is a hardware device which can connect to a mobile telephony network. Typically these are USB devices containing mobile telephony circuitry and an antenna of some sort (either internal or external). Older devices generally present themselves as a USB Modem which can be configured to run a Point-To-Point TCP/IP network link. Some more modern (higher-speed) devices present themselves as a USB Ethernet adaptor and include a built-in router and DHCP server.

A common complication is that the devices initially present themselves as USB storage devices (containing Windows device drivers) and need to be forced to switch to a different USB "mode" before they will work properly. This switching is performed automatically by Windows device drivers but under Linux a different approach is required, most often using the USB_Modeswitch utility.

Software Installation

Usually the only non-standard software Package required is usb_modeswitch.lrp. This relies on libusb.lrp but that will be installed automatically if not already present.

Software Configuration

All Devices


Devices Which Act Like USB Modems


Devices Which Act Like USB Ethernet Adaptors


Known Working Devices


Huawei E3131

The Huawei E3131 is one of the more modern HSPA+ devices that presents itself as a USB Ethernet adaptor. This uses the cdc_ether kernel Module which depends on the usbnet kernel Module.

When initially connected, this device reports USB ID (Vendor:Product) 12d1:1f01 which is a Mass Storage device using the Uniform CD-ROM driver.

When switched to the Ethernet Adaptor mode it reports USB ID (Vendor:Product) 12d1:14db.

One complication is that the DHCP server built into this device uses network address which clashes with the default network address for the "internal" network on Bering-uClibc, so the default internal network address needs to be changed to e.g. by editing file /etc/network/interfaces.

Huawei E586

The Huawei E586 or "MiFi" Mobile WiFi contains a battery and combines a Mobile Broadband Modem with a Wireless Access Point. A common use case is to enable multiple Tablet Computers without USB ports to access Mobile Broadband over a WiFi connection, but it can also be connected via a short USB cable in which case it behaves like other Mobile Broadband Modem devices.

Debugging Hints and Tips

Can switch on debug output from libusb by setting environment variable USB_DEBUG to 1 (and turn it off again by setting to 0).

Prev Up Next