Editing Bluetooth PAN

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 83: Line 83:
  run-standalone.sh dbus-send --system --type=method_call --dest=com.nokia.icd_ui /com/nokia/icd_ui com.nokia.icd_u
  run-standalone.sh dbus-send --system --type=method_call --dest=com.nokia.icd_ui /com/nokia/icd_ui com.nokia.icd_u
  # Selecting and establishing connection takes time
  # Selecting and establishing connection takes time
-
sleep 2
+
sleep 2
  # Verbose mode. You can remove it when you're using widget to activate this script
  # Verbose mode. You can remove it when you're using widget to activate this script
 +
  set -x
  set -x
 +
  IP_ADDR="192.168.3.1"
  IP_ADDR="192.168.3.1"
  NETMASK="255.255.255.0"
  NETMASK="255.255.255.0"
Line 91: Line 93:
  RUNFILE="/var/run/btpan_tethering.pid"
  RUNFILE="/var/run/btpan_tethering.pid"
  DNSMASQ="/usr/sbin/dnsmasq"
  DNSMASQ="/usr/sbin/dnsmasq"
 +
  # Load modules
  # Load modules
  modprobe ipt_MASQUERADE
  modprobe ipt_MASQUERADE
 +
  # flush old rules
  # flush old rules
  iptables -F
  iptables -F
  iptables -t nat -F
  iptables -t nat -F
 +
  iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
  iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
 +
  # forward IPs
  # forward IPs
  echo 1 > /proc/sys/net/ipv4/ip_forward
  echo 1 > /proc/sys/net/ipv4/ip_forward
 +
  # Setup bnep0
  # Setup bnep0
  ifconfig bnep0 down
  ifconfig bnep0 down
  ifconfig bnep0 up
  ifconfig bnep0 up
  ifconfig bnep0 $IP_ADDR netmask $NETMASK up
  ifconfig bnep0 $IP_ADDR netmask $NETMASK up
 +
  # Setup DNS and DHCP
  # Setup DNS and DHCP
  start-stop-daemon -S -p $RUNFILE -m -b -x $DNSMASQ -- -k -I lo -z -a $IP_ADDR -F $DHCP_RANGE -b
  start-stop-daemon -S -p $RUNFILE -m -b -x $DNSMASQ -- -k -I lo -z -a $IP_ADDR -F $DHCP_RANGE -b
 +
  run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:'Bluetooth PAN Activated'
  run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:'Bluetooth PAN Activated'
  fi
  fi
Line 113: Line 122:
  chmod +x /etc/udev/bluenet.sh
  chmod +x /etc/udev/bluenet.sh
-
cd /etc/udev/rules.d/  
+
then cd /etc/udev/rules.d/  
command vi 98-bnep0.rules and press R
command vi 98-bnep0.rules and press R

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)