How To set up PPP over Bluetooth with GNU/Linux      2003.06.25 @ 8:40:12 PM
The purpose of this guide is to help you quickly set up a PPP connection over Bluetooth on RedHat 8.0 (no Jedi skills required). This assumes that you have upgraded your kernel to 2.4.18-18.8.0. Visit BlueZ homepage for more information.

Step by step Guide:

This guide should also work with kernel 2.4.18-14 (shipped with RedHat 8 ) . First, verify your kernel version with:

uname -r

Download the following files from http://bluez.sourceforge.net/download/redhat/

bluez-bluefw-0.9-1.i386.rpm
bluez-libs-2.3-1.i386.rpm
bluez-pan-1.1pre4-1.i386.rpm
bluez-sdp-1.0rc2-1.i386.rpm
bluez-utils-2.2-1.i386.rpm

Install the packages with:

rpm -ivh bluez-libs-2.3-1.i386.rpm
rpm -ivh bluez-utils-2.2-1.i386.rpm
rpm -ivh bluez-bluefw-0.9-1.i386.rpm
rpm -ivh bluez-pan-1.1pre4-1.i386.rpm
rpm -ivh bluez-sdp-1.0rc2-1.i386.rpm


Add the following lines to your /etc/modules.conf

alias net-pf-31 bluez
alias bt-proto-0 l2cap
alias bt-proto-2 sco
alias tty-ldisc-15 hci_uart
alias bt-proto-3 rfcomm

Now, create the dependencies with:

depmod -a

Manually load the modules with:

modprobe bluez
modprobe hci_usb
modprobe hci_uart
modprobe l2cap
modprobe sco

Connect your Bluetooth USB Dongle, and issue the following attach the device with the following commands:

hcid -f /etc/bluetooth/hcid.conf

hciattach /dev/ttyUB0 csr 115200 flow (you might want to try this again in case it fails)
hciconfig hci0 up


Finally, hcitool should list your device address:

hcitool dev
Devices:
hci0 00:08:1B:00:CA:CE

Repeat this procedure in your remote computer. You should now be able to see your remote device with:

hcitool scan
Scanning ...
00:08:1B:00:B7:67 BlueZ (0)

You can also ping your remote device with l2ping (make sure you replace the remote address with your remote computes's address):

l2ping 00:08:1B:00:CA:CE
Ping: 00:08:1B:00:CA:CE from 00:08:1B:00:B7:67 (data size 20) ...
no response from 00:08:1B:00:CA:CE: id 200
20 bytes from 00:08:1B:00:CA:CE id 201 time 62.37ms
20 bytes from 00:08:1B:00:CA:CE id 202 time 42.54ms
20 bytes from 00:08:1B:00:CA:CE id 203 time 46.60ms
20 bytes from 00:08:1B:00:CA:CE id 204 time 39.74ms


Edit /usr/local/etc/rfcommd.conf on the server side as follows:

options {
psm 3; # Listen on this psm.

ppp /usr/sbin/pppd;
ifconfig /sbin/ifconfig;
route /sbin/route;
firewall /sbin/ipchains;
}

# Network Access
na {
channel 1;
up {
ppp "noauth 10.0.0.1:10.0.0.2";
};
}
Start rfcommd server (ip address 10.0.0.1) with:


# rfcommd -s na

Edit /usr/local/etc/rfcommd.conf on the client side as follows:

options {
psm 3; # Listen on this psm.

ppp /usr/sbin/pppd;
ifconfig /sbin/ifconfig;
route /sbin/route;
firewall /sbin/ipchains;
}

# Network Access
na {
channel 1;
up {
ppp "noauth";
};
}
Start rfcommd client (ip address 10.0.0.2) with:

rfcommd na 00:08:1B:00:B7:67

(replace address with your server's address)

Check /var/log/messages on both computers and make sure that there is no errors.

Now you can get your server to forward ip packets or just install a proxy server in order to share your internet connection.


Enjoy
Julian


All knowledge and software published in this website is released under the GNU General Public License (GPL)