Mobile Internet Connection

This document is a quick guide to the use of Zeroshell as a router for GPRS, EDGE, UMTS and HSDPA (often called ADSM or ADSL Mobile) mobile connections. To achieve this, a 3G/4G Mobile modem must be available and recognized by Linux Kernel as a USB device or a mobile phone must be connected via USB cable. The possibility of improving mobile connection performance is also discussed by installing several modems on the router and running them simultaneously to balance the load.
This document is divided into the following sections:

Why use a 3G Mobile router?

In most cases, data connections on the mobile phone network occurs via a modem (or mobile phone) directly connected to a laptop. This is justified by the fact that these connections are often used when traveling and home or office wide band connections are not available (ADSL, Wi-Fi or WiMAX). The later certainly provide improved performance, reliability and cost less but are difficult to use when traveling. On the other hand, the problem of Digital Divide concerning the heterogeneous distribution of wide band connections, even within the same country, make data connections to the mobile phone network from the home or office systematic when there are no other alternatives. Lastly, with the introduction of HSDPA, which has a theoretical 14.4 Mbit/s band transmission (in download) and that is gradually replacing the UMTS standard, multimedia content available on the Internet can be used with quality comparable to that in xDSL connections. On HSDPA, even applications like VoIP (Voice over IP) run reasonably well and can be used to make phone calls with rates typical of land lines, often definitely cheaper than mobile phone rates.
That said, we’ll finally answer the question “Why use a 3G Mobile router?”. Simply, rather than using a data access subscription with a mobile phone provider on one PC at a time, it is better to share this resource with several clients simultaneously. Consequently, connecting a PC to a 3G modem with a SIM is not needed since it can be connected to a router that makes IP connections to a mobile phone provider and distributes traffic on Ethernet and Wi-Fi. Any VoIP phones can be directly connected to the router via Ethernet thus eliminating the need of keeping a computer on night and day to receive calls. A router consumes less than one tenth the energy needed for a PC and, above all, has no cooling fans or hard disk that make noise and are subject to wear.
If software like Asterisk is installed on the router to act as a PBX and an FXS interface is available (the FXS interface on a analog phone line is the central side and is identified with the wall socket while the FXO interface is the one behind the analog phone), traditional phones (non VoIP) or even the entire home phone system can be connected to the router.
Another reason why a UMTS/HSDPA router should be used is because it can be placed in positions where the mobile provider’s signal is strongest (for example, in the attic), leaving the user free to connect to Internet via wireless in any room. Furthermore, since mobile modem electromagnetic emissions, similar to those of a mobile phone, shouldn’t be harmful to health, it is always best, as a precaution, to keep these objects as far away as possible if used for prolonged periods of time. Network card and WiFi router electromagnetic emissions are must lower than mobile phone ones and, therefore, it is better to have WiFi device access on your PC than a modem for mobile phone networks. In the latter case, especially for USB modems, an extension cord could be used to keep it away from your body.

Supported 3G modems

Most UMTS/HSDPA modems have a USB interface which is easily recognized by Linux Kernel as a USB-Serial converter without any problems. The same can be said for most PCMCIA and MiniPCI Express modems since they emulate a resident USB host. Even mobile phones connected via USB cable are often recognized in the same way.
Successfully tested USB modems are:

  • Huawei E220
  • Huawei E172
  • Huawei E169
  • Onda MT503HS

While MiniPCI Express ones tested on PC Embedded Alix 6b2 (ideal for these applications since equipped with two slots to house the mobile phone provider’s SIM) are:

  • Novatel 5520 Mobile
  • UMTS/HSDPA Sierra Wireless MC8775

The only tested mobile phone is:

  • N7010 which requires the usbserial.ko Kernel to be manually loaded.

In some cases, like for the HSDPA N7010 mobile phone, the USB-Serial conversion module must be manually linked to the device. For example, the case above used the command

      modprobe usbserial vendor=0x05C6 product=0x6000

To automatically load the Kernel module on boot, simply enter the abovementioned modprobe command in the Pre Boot script using the Zeroshell web interface [Setup][Startup/Cron] section. If you don’t know how to set vendor and product parameters, simply enter the dmesg command a few seconds after connecting the modem to the system. These settings will be displayed by dmesg as idVendor and idProduct.

Setting up a Mobile Connection

To create a Mobile Connection, use the web interface and press the [New 3G Modem] key in the [Setup][Network] section. The setup window illustrated below will appear.

Mobile Connection configuration
Mobile Connection configuration

Now let’s take a look at the meaning of each single setting in this window:

  • Description: This is a description of the connection. It is best to indicate the name of the mobile phone provider in this field.
  • Modem connected to: Select the 3G modem USB connection device from the list. Often, these modems create more than one port but only one is the data port while the others are control ports. Unfortunately, there is no set rule as to how this occurs and therefore several attempts are needed to identify the USB device to be used.
  • APN: also known as Access Point Name, it indicates the access point used by the provider for IP services. This setting thus depends on the mobile phone provider for the connection. Some examples valid for some Italian providers are:
    • internet.wind (Wind Telecomunicazioni)
    • (Vodafone Italia)
    • (Telecom Italia Mobile)
    • (3 Italia)
  • Dial string: indicates the connection number and depends on the modem or mobile phone. It is often *99***1#.
  • Optional AT string: use this field to send the modem or mobile phone an initialization string in AT language. In most cases this field is left blank. You could have to use it if your SIM is protected by a PIN code. In this case, fill this field with the string AT+CPIN=XXXX in wich XXXX is the PIN.
  • Autostart the connection at boot: if set to Yes, it enables automatic connection on system boot. Otherwise, connections are manual.
  • Make this interface the Default Route: selecting Yes, the point-to-point interface (ppp0, ppp1, …) is automatically set as the default route without having to manually set a static route for this purpose. In most cases the default value (Yes) is ok.
  • Enable NAT on this interface: since the provider provides a single IP while we want to connect our router to several clients simultaneously, set this value to Yes to enable NAT (Network Address Translation) on the point-to-point interface.

Load balancing and Failover on several Internet connections

Lastly, since more than one 3G modem can be connected to the router and the Zeroshell Net Balancer module is used, settings can be created to balance connections on several operators and with Failover. This subject is thoroughly discussed in a specific document while the diagram below illustrates a configuration in which Internet access is balanced on one ADSL access and 3 UMTS/HSDPA connections.

Load balancing and Failover with 1 ADSL and 3 Mobile Connections
Load balancing and Failover with 1 ADSL and 3 Mobile Connections