Note: The page supports GPRS in the main OpenBTS release. For the fairwaves release see here.

GPRS

GPRS service is available in OpenBTS for all tranceivers. Enabling it is relatively simple. We first need to configure OpenBTS to handle GPRS traffic. We then need to configure the machine to route traffic correctly.

OpenBTS Configuration

To enable GPRS service, run the following command in the CLI:

config GPRS.Enable 1

Machine Configuration

In the public release of GPRS, the machine running OpenBTS acts as a router for handset network requests. To support this, we've provided an iptables rule that will do this, located in OPENBTS_TRUNK/apps/iptables.rules. First, this script must be modified to target the network interface you wish to route traffic over. For the following line in iptables.rules, wlan0 should be changed to that interface.

-A POSTROUTING -o wlan0 -j MASQUERADE

Following this change, you can load the rules by doing the following from the apps directory.

sudo iptables-restore < iptables.rules

To auto-load the configuration with your network settings, add the following to an interface definition in /etc/network/interfaces (on Debian based systems, such as Ubuntu):

pre-up iptables-restore < /path/to/iptables.rules

Potential Problems

Phones do not connect

Many phones do not "roam" for data access, and if your network MCC/MNC do not match the SIM, they will not connect. Either change the SIM or change the MNC/MCC to match the existing SIM.

IP Works, URLs are not resolved

In some cases DNS is not detected properly by OpenBTS. If the machine running OpenBTS is able to resolve DNS queries (i.e., browsing) then a temporary solution for this problem is to manually edit /etc/resolv.conf and change nameserver to:

nameserver 8.8.8.8

Now you should be able to resolve DNS queries in your device.

Notice that this change will be lost when the computer is restarted. To make sure a DNS server is always available edit /etc/resolvconf/resolvconf.d/head and add:

nameserver 8.8.8.8