The easy way in Ubuntu 10.10/11.04/11.10

0. Make sure you have an appropriate data plan with your phone contract

1. Connect ("pair") your bluetooth enabled phone from system bluetooth applet. The connect wizard will ask if you wish to use mobile broadband (dialup) and ask for appropriate settings (country, mobile operator).

2. Connect "Mobile Broadband" network from networkmanager applet.

Note: If you updated from 10.04 and used blueman, remove all blueman phone pairings/settings and then remove the blueman software. Then follow the above instructions.

The easy way in Ubuntu 10.04

0. Make sure you have an appropriate data plan with your phone contract

1. Install blueman (sudo apt-get install blueman)

2. Connect ("pair") your bluetooth enabled phone from bluetooth settings

3. Start blueman, right-click on your (paired) phone, select "Connect to Dial Up Networking"

4. Connect "Mobile Broadband" network. Instructions: https://help.ubuntu.com/10.04/internet/C/connecting-mobile.html

The old, hard way

This page describes how to configure PPP dialup through a Bluetooth-compatible mobile phone. The emphasis is on using GPRS/EDGE services. These instruction were compiled and tested on Ubuntu 6.06 (Dapper Drake) on an IBM ThinkPad T40p with a Samsung T809 phone using T-Mobile's "Unlimited Internet VPN" plan.

Configure mobile phone data profiles

List of web pages providing GPRS details

Getting the data access profile

T-Mobile

T-Mobile accounts generally require separate data profiles for WAP and general data access. (Some people have had success running a regular data connection over the WAP profile.) Getting access to general data access requires a data access plan. Currently, the "Unlimited Internet VPN" is the best deal, as it costs the same as the "Unlimited Internet" plan but gives you a real, public IP address. Incoming connections are blocked on any T-Mobile data plan. T-Mobile does not seem to offer metered data plans anymore.

There are two ways to get the data service profile on your phone. Manual configuration is probably faster and better.

Automatic

T-Mobile can send the data services profile directly to your phone via SMS. Only the "wireless data" customer service people can send the data services profile to your phone. The regular service people can only send the WAP data profile, which will not work for general use. You will have to be transferred once or twice to reach the wireless data division. Once there, simply request that the data service profile for your plan be sent to your phone. (Of course, you'll need to be signed up for a data plan.)

Once you receive the plan information, your phone will ask you where you want to store it. T-Mobile uses profile 1 for the WAP profile, so don't overwrite it. I recommend using profile 2, as it's usually the first empty profile.

After storing the data services profile, your phone will probably set it as the default. This will probably cause your WAP (T-Zones/T-Mobile Internet) to fail for your on-phone browser. Set the WAP data profile (profile 1) to default fix this. See the configuration section below for your phone's brand. Setting the default profile is usually fairly obvious once you've reach the data services configuration screen.

Manual

Access the data profiles configuration for your phone's brand using the instructions under the configuration section below. The order and name for settings is for a Samsung T809. These settings are modified from the SMS T-Mobile sends Unlimited Internet VPN plan users. By adding the DNS and proxy information, you can use this profile for either T-Zones or general web browsing.

Use the following settings for the Unlimited Internet VPN plan:

Other companies

Call your mobile service provider and request information about data plans. Many charge by the megabyte, but unlimited plans are increasingly available. Most of the instruction for T-Mobile will probably apply.

Configuration

Sony Ericsson GSM

This is from my memory of using a T610, but it should apply to any Sony Ericsson phone. Choose the lower-left icon from the main menu.

Samsung GSM

This is tested on a T809, but should apply to any Samsung GSM phone. Enter code *#87927# from the main screen. Select "Current profile" to choose the default profile. Select "Profile settings" to manage profiles.

LG GSM

This is tested on a CU 320 and works. If you have problems authenticating from the machine, discover it from the phone.

Nokia GSM

This is tested on a 5300 XpressMusic with Vodafone Live The Netherlands. I didn't change any settings on the phone.

Installing Bluetooth and dialup packages

sudo apt-get install bluez-utils bluez-pin ppp 

*bluez-utils and bluez-pin is not required in ubuntu 11.10

Listing Bluetooth devices

hcitool scan

Pairing

You can skip this section if you've already paired your phone with your computer. However, consider the final optional step, as your phone might otherwise nag you every time you use if for dialup.

sudo hcitool cc your-phone-mac-address

sudo hcitool auth your-phone-mac-address

sudo passkey-agent --default /usr/bin/bluez-pin

Note: I couldn't pair using the above instructions in Edgy. I had to install bluez-passkey-gnome, launch bt-applet (it's invisible when waiting), then initiate pairing from the phone.

Note: I couldn't pair using the above instructions in Feisty. The pairing instead took place when I dialed the connection for the first time. I could not pair from the phone since my computer was hidden.

Configuring the rfcomm device

sdptool search DUN

sdptool browse your-phone-mac-address

gksudo gedit /etc/bluetooth/rfcomm.conf

rfcomm0 {
        bind yes;
        device your-phone-mac-address;
        channel your-phone-rfcomm-channel;
        comment "Bluetooth PPP Connection";
}

sudo /etc/init.d/bluez-utils restart

Note that on Edgy, Feisty and Hardy the correct command is:

sudo /etc/init.d/bluetooth restart

Note: On the Nokia N95 (and possibly other Symbian S60 phones) the RFCOMM channel number is not consistent, but seems to change from time to time. If you have a phone that behaves like this, and you find youself unable to connect, you will need to re-run sdptool as described above to see if the channel number has changed. Rather than edit rfcomm.conf (and hence have RFCOMM bind to the channel at startup) you may find it more convenient to bind the RFCOMM channel on the command line:

rfcomm bind 0 your-phone-mac-address your-phone-rfcomm-channel

If you get the wrong channel (or if the wrong channel was bound at startup as a result of rfcomm.conf) then you need to release it before you can bind it again:

rfcomm release 0

Configuring PPP

gksudo gedit /etc/ppp/peers/BluetoothDialup

debug
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/BluetoothDialup"
usepeerdns
/dev/rfcomm0 115200
defaultroute
crtscts
lcp-echo-failure 0

gksudo gedit /etc/chatscripts/BluetoothDialup

TIMEOUT 35
ECHO    ON
ABORT   '\nBUSY\r'
ABORT   '\nERROR\r'
ABORT   '\nNO ANSWER\r'
ABORT   '\nNO CARRIER\r'
ABORT   '\nNO DIALTONE\r'
ABORT   '\nRINGING\r\n\r\nRINGING\r'
''      \rAT
OK      'AT+CGDCONT=2,"IP","your-apn-here"'
OK      ATD*99***your-data-profile-number-here#
CONNECT ""

Carrier specific configuration info

Phone specific configuration details

Samsung SGH-X820

This phone seems to have problems with various PPP options. Adding the following options to the relevant file in /etc/ppp/peers seemed to make it work.

nopcomp
noaccomp
nomagic
receive-all
noccp
novj
novjccomp

Authorizing dialout

sudo adduser your-username-here dialout

Connecting

Begin here on subsequent connections.

N.b. I do have NetworkManager installed and have found a work-around so that it doesn't mess with my connection over Bluetooth. I have not tried this in an environment where there are multiple WiFi connections _and_ yet I'm still trying to use the phone as a modem. The work-around is to edit the file /etc/network/interfaces and to add a line at the end of the file that reads:

iface hci0 inet static

pon BluetoothDialup

PPP and TCP/IP troubleshooting

Try these troubleshooting sections in order.

Using the correct data plan

PPP connection

xxx localhost pppd[xxx]: Script /etc/ppp/ip-up finished (pid xxx), status = 0x0

Solution if problem

IP address configuration

9: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc pfifo_fast state UNKNOWN qlen 3
    link/ppp 
    inet a.b.c.d peer e.f.g.h/32 scope global ppp0

Solution if problem

Default route configuration

e.f.g.h dev ppp0 proto kernel scope link src a.b.c.d
default dev ppp0 scope link

Solutions if problem

Preferred method: Manually fix routing table

This needs instructions, as it should be the preferred method

Alternate method: Remove other interfaces

poff BluetoothDialup

sudo ip link set dev your-extra-interface down

pon BluetoothDialup

DNS configuration

nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx

xxx localhost pppd[xxx]: primary DNS address xxx.xxx.xxx.xxx
xxx localhost pppd[xxx]: secondary DNS address xxx.xxx.xxx.xxx

Solution if problem

"pon BluetoothDialup" - Does not connect to phone

sudo gedit /etc/ppp/peers/provider

# Serial device to which the modem is connected.

/dev/modem

change to

/dev/rfcomm0

Then Relase and bind again

rfcomm release 0
rfcomm bind 0 your-phone-mac-address your-phone-rfcomm-channel

Disconnecting

poff BluetoothDialup

Other useful guides


CategoryHardware CategoryBluetooth

BluetoothDialup (last edited 2012-01-09 17:17:29 by 223)