|
|
ViewsHOWTO: Connect to the Internet using Bluetooth via a Linux PCFrom Internet Tablet TalkThis 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"
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:
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"
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; }
/etc/init.d/networking /etc/init.d/dhcp3-server /etc/init.d/bluetooth
install maemo-pan from:
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 !!! |