Using your Blackberry as a USB Modem


The Blackberry has the ability to act like a Hayes compatible modem, complete with AT commands.

In order to make use of this feature you will need the Barry command line tools installed on your system. See the Install page for more details.

You will need three components to connect to the internet:

  • a working Barry install, version 0.13 or later
  • a working pppd and matching kernel
  • an options file and chatscript for your Blackberry provider

See the Barry Desktop page for more information on using the GUI to manage the modem.

If You Installed Barry's Binary Packages...

If you installed Barry's binary packages, specifically barry-util, then default ppp options and chat scripts are installed automatically for you. Currently there are scripts available for the following providers:

  • AT&T Cingular
  • China Mobile
  • Fido
  • KPN Nederland
  • Manitoba's MTS
  • O2 Ireland
  • Optus AU
  • Orange Spain
  • Orange UK
  • Rogers
  • Sprint
  • Telus
  • T-Mobile US
  • Verizon
  • Vodafone AU
  • and a minimalist script for debugging

For example, to run the default Rogers connection script, use the following command as root:

        pppd call barry-rogers

If none of the default scripts work, see the Troubleshooting section below.

If You Installed Barry From Source...

Configuring PPPD

Sample configurations are provided in the source tarball, and if you are using a binary package, they should already be installed for you under /etc/ppp/peers and (depending on your system) /etc/chatscripts.

Copy the desired options file to /etc/ppp/peers and edit the file, making sure that the paths are referencing the correct files.

  • pty - must point to the location you installed Barry's pppob program.
  • connect - must use the correct chatscript

Establishing a Connection

If you named your options file "barry-rogers", then to connect to the internet, run:

        pppd call barry-rogers

Some systems may provide wrapper scripts for running pppd. For example, Debian uses "pon" and "poff".

If Your Device Needs a Password...

If your device requires a password, you can specify this on the pppob command line. For example, if you are using the barry-rogers PPP script, edit your /etc/ppp/peers/barry-rogers file, so that the pty option says something like this:

        pty "/usr/sbin/pppob -P password"

Testing Your Connection

PPP will display some messages on stdout as it connects. On success, you should see IP address negotiation and the resulting IP address for your machine. PPP will then just wait for network activity.

When testing to see if this works, use your web browser. The usual method of using ping does not work reliably, and some providers may have this blocked.

Check your routing table to make sure that the new default gateway is there.

        /sbin/route -n

Security Concerns

Depending on your provider, you may or may not have a firewall installed when you connect to the internet through a tethered modem. Keep an eye on your open ports, and remember that connecting to the internet this way may not be the same as the network you are used to.

Also keep in mind that if your system is configured to forward packets and you have pppd setup to replace your current default route, and you are still connected to an internal network (say, via ethernet), this could allow outside connections to be routed to your internal network. The default pppd options files installed by Barry do not use the replacedefaultroute setting for this reason. Contact your network administrator for assistance on configuring your mobile network setups.


Some devices don't respond to the PPP commands at first, but after the battery is removed and reinserted, modem functionality works. This is likely due to the protocol not being completely understood, but resetting the device in this manner is enough of a workaround to get it working.

If you still run into trouble, the first task is to increase debug output and to log it. PPPD supports increased logging if you add the following lines to the options file:


Barry's pppob program also supports verbose protocol logging. Change your options file and edit the pppob command line. For example, if your pppob is installed in /usr/sbin, set the pty option to:

        pty "/usr/sbin/pppob -l /tmp/pppob.log -v"

Be sure to remove these options once you have your connection working, as the above causes your entire internet traffic to be logged to the output file.

If your provider is not yet supported by the sample options files, you will need to do a little digging on your own. If you are able to tether your Blackberry using a Windows system, you can duplicate the login information in your chat script.

You may also find example configurations for your provider on the various Blackberry forums available online.

If you are still having trouble, please send an email to the mailing list, including:

  • the version of Barry you are using
  • the output from pppd
  • the log output from pppob
  • the ppp options file and chatscript you used

The logs from pppob can be fairly large, so limit the size to a single run.

Connecting via Bluetooth

If your device has Bluetooth support, it is also possible to tether using Linux's own native Bluetooth serial drivers. There are probably better tutorials on this already on the net, but here are a few notes from Michael Brown to help you get started.

Bluetooth Config

Put the following in your /etc/bluetooth/rfcomm.conf file, replacing the X's with your Bluetooth BADDR.

rfcomm0 {
        bind yes;
        device XX:XX:XX:XX:XX:XX;
        channel 1;
        comment "Blackberry Dialup";

PPP Config

Use the same peer file that you would use for the USB tethering above, but remove the pty line that points to /usr/sbin/pppob. Since you are using the Bluetooth serial port, you don't need pppob. Replace that line with the line of your newly configured rfcomm device. You may also need to specify the baud rate.


Chatscript Config

No change is required. Use the same chatscript you would use for USB above.

Run as usual. For example:

        pppd call barry-rogers