How to enable PAN on Raspberry

How to enable PAN on Raspberry

How to enable PAN on Raspberry

2 Comments on How to enable PAN on Raspberry

Now that both my devices are paired with each other, its time to connect them using the proper protocols. BNEP is used for delivering network packets on top of L2CAP. This protocol is used by the personal area networking (PAN) profile. My plan is make an android application to control the Raspberry pi, so using a host stack that’s supports TCP/IP protocols really helps with the speed of development. To make this happen, I used a older version of the bluez tools called pand.  So here is how to enable PAN on Raspberry

sudo apt-get install bluez-compat

The hcitool scan command will let you find the device mac address, you will need this again to connect to the phone.

sudo pand –connect 00:25:00:96:13:BB -n

pand connected

Notice the “bnep0 connected” this is the name of the Bluetooth network interface, we need to enable DHCP on this to get a IP address.

dhclient bnep0

dhclient bnep0

That’s it, now you can connect to the Raspberry using a terminal emulator on your android device! Here is a small video showing me connecting to my Raspberry using this setup :

Next up, making everything work at boot time!

Martin Jørgensen

Martin Jørgensen

Got my degree from EAL in 2012 as an IT-Technologist with specialty in network. I enjoy living in a century where I can earn a living doing my hobby. Material I publish here are often part of my small projects.
Martin Jørgensen

Latest posts by Martin Jørgensen (see all)

Related Posts

Back to Top