I am curious how much of this scripting needs to be changed to add PAN AP capacity to Mobian?
http://wiki.maemo.org/Bluetooth_PAN
I have been using PAN for my laptop and tablet when mobile for many years and it works great, almost as power efficient as USB and far better than WiFi on a mobile battery.
I did notice we can already join a bluetooth PAN as a client from Advanced Networking settings.
http://wiki.maemo.org/Bluetooth_PAN
Code:
Install the iptables package:
apt-get install iptables
create the following 2 files:
/etc/udev/rules.d/98-bnep0.rules:
ACTION=="add", SUBSYSTEM=="net", KERNEL=="bnep0", RUN+="/etc/udev/bluenet.sh"
ACTION=="remove", SUBSYSTEM=="net", KERNEL=="bnep0", RUN+="/etc/udev/bluenet.sh"
/etc/udev/bluenet.sh:
#! /bin/sh
if [ $ACTION = "add" ]; then
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING ! -o lo -j MASQUERADE
ifconfig bnep0 192.168.3.1
ifconfig bnep0 up
/usr/sbin/dnsmasq -I lo -z -a 192.168.3.1 -F 192.168.3.64,192.168.3.127 -x /var/run/dnsmasq.pid.bnep0
else
iptables -t nat -D POSTROUTING ! -o lo -j MASQUERADE
if [ -f /var/run/dnsmasq.pid.bnep0 ]; then
DNSMASQ_PID=`cat /var/run/dnsmasq.pid.bnep0`
rm -f /var/run/dnsmasq.pid.bnep0
kill $DNSMASQ_PID
fi
fi
then set /etc/udev/bluenet.sh as executible:
chmod +x /etc/udev/bluenet.sh
I have been using PAN for my laptop and tablet when mobile for many years and it works great, almost as power efficient as USB and far better than WiFi on a mobile battery.
I did notice we can already join a bluetooth PAN as a client from Advanced Networking settings.