PAN Server Setup

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PAN Server Setup

Jump to solution
2,479 Views
pbloemer
Contributor I

Hello All,

I am trying to setup a typical Bluez PAN server on an IMX8 Mini, NXP kernel version 4.19.35 and Bluez 5.54. Unfortunately, most of the tutorials for this involve the pand daemon, which was deprecated in Bluez 5. I realize that both of my kernel and Bluez versions are outdated. For internal reasons these are the versions I have to use. 

My command list.

// Start the Bluetooth daemon
cd /usr/libexec/bluetooth
./bluetoothd -d &

// Enable the Network1 and NetworkServer1 D-bus interfaces in /etc/dbus-1/system.d/bluetooth.conf

dbus-send --system --dest=org.bluez /org/bluez/hci0 --type=method_call org.bluez.NetworkServer1.Register string:"nap" string:"tether"

// Create the network bridge that Bluez wants to see.

ip link add name tether type bridge
ip link set tether up

// Start the debug monitor

btmon &

// Launch the PAN server

bluetoothctl
power on
scan on
pairable on
discoverable on
discoverable-timeout 0
agent DisplayYesNo
default-agent

trust (my phone's BT address)

I am able to pair from an Android Smartphone. Upon trying to use the Bluetooth connection as an internet connection, I see ARP packets appear through btmon. The bnep0 interface never appears, however, and the following error message appears in the btmon printout: 

= bluetoothd: bnep: Can't add bnep0 to the bridge tether: Invali.. 302.610684
= bluetoothd: BNEP server cannot be added 302.610724

Upon digging into this error, I found that it was emanating from a SIOCBRADDIF ioctl that was throwing error 22 (Invalid Argument). Has anyone had any luck setting up a basic PAN server on Bluez 5.5X?

 

Labels (2)
Tags (1)
0 Kudos
1 Solution
2,433 Views
IvanRuiz
NXP Employee
NXP Employee

Hello,

 

Please accept my apologies, Bluez is not supported by us but you may find it helpful to refer to the following link: https://raspberrypi.stackexchange.com/questions/108120/host-web-server-on-raspberry-pi-via-bluetooth...

 

BR,

Ivan.

View solution in original post

1 Reply
2,434 Views
IvanRuiz
NXP Employee
NXP Employee

Hello,

 

Please accept my apologies, Bluez is not supported by us but you may find it helpful to refer to the following link: https://raspberrypi.stackexchange.com/questions/108120/host-web-server-on-raspberry-pi-via-bluetooth...

 

BR,

Ivan.