HOWTO: Connect to the Internet using Bluetooth via a Linux PC

From Internet Tablet Talk

This have been tested with ubuntu 8.04 and n810 chinook

First install following apps to your computer

bluez-utils iptables dhcp3-server bridge-utils

PC configuration: Edit file: /etc/bluetooth/hcid.conf Change the line:

lm accept;

to

lm accept, master;

Edit file: /etc/default/bluetooth Change the line:

PAND_ENABLED=0

to

PAND_ENABLED=1

and line:

PAND_OPTIONS=""

to

PAND_OPTIONS="--listen --role=NAP --devup /etc/bluetooth/pan/dev-up --devdown /etc/bluetooth/pan/dev-down"


Make directory: /etc/bluetooth/pan Make file: /etc/bluetooth/pan/dev-up ja lisää sinne seuraava:

  1. !/bin/sh

echo 1 > /proc/sys/net/ipv4/ip_forward brctl addif panbridge0 $1 ifconfig $1 0.0.0.0 ifup bnep0 sleep 2 /etc/init.d/dhcp3-server restart


Make file: /etc/bluetooth/pan/dev-down ja lisää sinne seuraava:

  1. !/bin/sh

brctl delif panbridge0 $1


Edit file: /etc/network/interfaces Add following to the end of the text file

auto panbridge0 iface panbridge0 inet static pre-up brctl addbr panbridge0 address 192.168.111.1 netmask 255.255.255.0 post-up brctl setfd panbridge0 0 post-up brctl stp panbridge0 off post-up iptables -t nat -A POSTROUTING -s 192.168.111.0/24 -j MASQUERADE post-up iptables -A FORWARD -i panbridge0 -o eth0 -j ACCEPT post-up iptables -A FORWARD -o panbridge0 -i eth0 -j ACCEPT pre-down iptables -D FORWARD -i panbridge0 -o eth0 -j ACCEPT pre-down iptables -D FORWARD -o panbridge0 -i eth0 -j ACCEPT pre-down iptables -t nat -D POSTROUTING -s 192.168.111.0/24 -j MASQUERADE post-down brctl delbr panbridge0


Edit file: /etc/default/dhcp3-server Change the line:

INTERFACES=""

to

INTERFACES="panbridge0"


Edit file: /etc/dhcp3/dhcpd.conf add following lines:

option domain-name "google.com"; option domain-name-servers xxx.xxx.xxx.xxx;

!!! Replace xxx.xxx.xxx.xxx with your own dns address !!!

Add this to the same file:

subnet 192.168.111.0 netmask 255.255.255.0 { range 192.168.111.2 192.168.111.24; option domain-name "bluetoothap.int.somedomainname.com"; option routers 192.168.111.1; option broadcast-address 192.168.111.255; }


Restart apps:

/etc/init.d/networking /etc/init.d/dhcp3-server /etc/init.d/bluetooth


Then n810:

install maemo-pan from:

[1]


Edit file: /usr/lib/maemo-pan/pan-control change the line

BTADDR=`su - $USER -c "gconftool-2 -g /system/osso/connectivity/BT/preferred"`

to

BTADDR="XX:XX:XX:XX:XX"

!!! replace XX:XX:XX:XX:XX with your computers bluetooth mac address !!!


All times are GMT -4. The time now is 08:18 PM.