HowTos/BNEPTosa2.6

From OpenZaurus

HowTO Bluetooth PAN Network on Tosa with kernel 2.6

How to use bluetooth to provide a Personal Area Network on SL-6000L/Tosa running OZ 3.5.4.1 with kernel 2.6.x

add these lines to your /etc/network/interfaces file:

 iface bnep0 inet static
         gateway 192.168.101.1
         broadcast 192.168.101.255
         netmask 255.255.255.0
         address 192.168.101.2
   pre-up pand -n --connect 00:02:72:B2:EE:1B
   post-down pand --killall

You also need to

  • fix the /etc/bluetooth/hcid.conf file and set the pin_helper to be /etc/bluetooth/givepin, commenting out the dbus pin helper
  • restart bluetooth
  • create a script called /etc/bluetooth/givepin thus:
 #!/bin/sh
 echo "PIN:1234"

and make it executable with "chmod u=rwx,go= /etc/bluetooth/givepin".

  • run "hcitool scan" to find out the mac of the gateway
  • use "sdptool browse xx:xx:xx:xx:xx:xx" to check that the Z is using the right pin to access the gateway
  • finally Z can execute "ifup bnep0" and then you should have a bnep device in "ifconfig -a" at each end, and just set up masquerading on the gateway as appropriate... remember to turn IP forwarding on!


Note, the author uses SuSE 10 and 10.1 and is assuming that you have already enabled bluetooth PAN and set up a pin on your linux desktop; pretty much any regular USB bluetooth dongle works for this.


If you've got problems connecting that way via pan try to set both devices into noauth and noencrypt mode. Therefore extend your bnep0 config in /etc/network/interfaces file (this should be the first pre-up line!):

 pre-up hciconfig hci0 noauth noencrypt up


You could configure this in /etc/bluetooth/hcid.conf, but the options for auth and encryption didn't work for me. All other features like setting the device name or disabling iscan and pscan (if you dont want to be discoverable by others) worked. So just give it a try.