Edit: Wordpress messes up the formatting. Use normal quotes, replace — with two -.
First, some details about my setup.
- Very cheap bluetooth adapter - because I didn’t knew if it was going to work with linux
- Nokia 6310i - extremely stable GPRS connection
- Dell Inspiron 1501 notebook running Arch Linux- it doesn’t really matter
- Wap Unlimited from Orange - unlimited access to http hosts - good enough for webmail, blogging, etc
Install the necessary software:
bluez-utils, bluez-libs and wvdial should do. Run
pacman -Sy bluez-utils bluez-libs wvdial
…for Arch Linux or
apt-get install bluez-utils bluez-libs wvdial
…for Debian, Ubuntu and some other distributions. Anyway, you get the point. For other distros read the docs.
After installing it, we configure the software.
First, edit /etc/bluetooth/hcid.conf. Mine looks like this:
options {
autoinit yes;
security auto;
pairing multi;
pin_helper /etc/bluetooth/givepin;
}
device {
name “computer”;
class 0×100;
pkt_type DH1,DM1,HV1;
iscan enable; pscan enable;
lm master;
lp hold,sniff,park;
auth enable;
encrypt enable;
}
Now we need to configure rfcomm. First, find the MAC address of your mobile phone. You can insert the bluetooth adapter, start the HCI daemon by running hcid, and scan using hcitool scan. If you don’t have the file /dev/rfcomm0, create it by running mknod -mode 666 /dev/rfcomm0 c 216 0.
Then create the file /etc/bluetooth/givepin, which will give us a pin number:
#!/bin/sh
echo “PIN:12345″
Change with another, more secure number.
Then edit the file /etc/bluetooth/rfcomm.conf. It should look like below:
rfcomm0 {
# Automatically bind the device at startup
bind yes;
# Bluetooth address of the device
device 00:00:00:00:00:00; #change with the MAC found previously
# RFCOMM channel for the connection
channel 1;
# Description of the connection
comment “Bluetooth modem”;
}
Next we configure wvdial. Add at the end of /etc/ppp/peers/wvdial the following lines:
lcp-echo-failure 0
lcp-echo-interval 0
The main conf file for wvdial, /etc/wvdial should look like the one below. Replace wap in the init string with your access point’s name.
[Dialer Defaults]
Modem = /dev/rfcomm0
Baud = 115200
Init1 = ATZ
Init2 = AT+cgdcont=1,,”wap”
Carrier Check = no
Stupid Mode = no
Phone = *99***1#
New PPPD = yes
ISDN = 0
Modem Type = Analog Modem
Username = ”
Password = ”
When you first connect your phone, you need to pair it with the computer. Run passkey-agent –default your_pin first.
Start the HCI daemon by running hcid.
Connect to your phone by running rfcomm connect rfcomm0.
When you do this the first time, your phone will probably ask permission for pairing and a PIN number. Use the PIN you entered above.
Connect to GPRS by running wvdial.
Set the correct DNS servers by running cp /etc/ppp/resolv.conf /etc/.
If necessary, set the browser to use a proxy server. For Orange Romania, use 82.217.247.252:8799.