Monday, 30 January 2017

Raspberry PI Bluetooth PAN (JAN 2017)

Requires:

  • BlueZ 5+
  • Python2.7
  • bt-pan
  • bridge-utils
Get bt-pan here

or

wget https://raw.githubusercontent.com/mk-fg/fgtk/master/bt-pan


Load bluetooth on both devices


systemctl start bluetooth

On the Raspberry Pi


1) Pair devices with bluetoothctl or GUIs

2) Execute this script

brctl addbr pan0
brctl setfd pan0 0
brctl stp pan0 off
ip addr add 10.1.2.3/24 dev pan0
ip link set pan0 up
python2.7 bt-pan --debug server pan0


This will setup the Raspberry Pi to have an IP of 10.1.2.3 and netmask of 255.255.255.0 .

3) If it works then create a systemd service


On client


1) Pair devices with bluetoothctl or GUIs


2) Execute


python2.7 bt-pan --debug client XX:XX:XX:XX:XX:XX --wait



3) If it works then create a systemd service



4) Configure the client IP to be 10.1.2.2 . Netmask is 255.255.255.0 . Gateway is 10.1.2.0 .




No comments:

Post a Comment