Choffee/ HowTo/ p990 PAN

Bluetooth and the p990i PAN and Ubuntu or Debian

Install bluez-utils

Find your phone

sudo hcitool scan

Get the address of your phone something like: 00:19:63:ED:30:0F

sdptool browse 00:19:63:ED:30:0F

Will show you what your phone can do

Now install dnsmasq and stop the service as you don't really want to run a full dns and dhcp service yet!

sudo update-rc.d -f dnsmasq remove

Create a file /etc/bluetooth/bnep0.up and add script to startup dnsmasq


Script to run stuff as the network comes up

echo 1 > /proc/sys/net/ipv4/ip_forward

ifup bnep0 sleep 2

test -f /var/run/ && kill cat /var/run/

dnsmasq --pid-file=/var/run/ \ --interface=bnep0 \ --localise-queries \ --dhcp-range=,,

00:19:63:B4:52:01 - Bluetooth Mac address.

edit /etc/network/interfaces and add:

iface bnep0 inet static address netmask post-up iptables -t nat -A POSTROUTING -s -j MASQUERADE post-up iptables -A FORWARD -i bnep0 -o eth1 -j ACCEPT post-up iptables -A FORWARD -o bnep0 -i eth1 -j ACCEPT

Note: It should probably add something about getting eth1 to be correct and also adding post-down to remove the firewall.

On the phone create a new bluetooth connection to the linux box and you are off.

Valid XHTML 1.0 Strict Valid CSS! Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.