2

I'm currently trying to associate my phone and a custom board running Linux through a bluetooth PAN network. My phone being the NAP and my board the PANU.

I followed the following documentation HOWTO-PAN and Bluetooth PAN Network Setup with BlueZ 5.X
I'm using the script bt-pan which can be found here

I'm able to pair devices and to run bt-pan successfully (at least it seems to) but I have no bnep0 network interface raising up.

# bt-pan --debug client 60:45:CB:2F:C6:4C --wait
DEBUG:root:Using local device (addr: 00:16:A4:0A:15:13): /org/bluez/hci0
DEBUG:root:Using remote device (addr: 60:45:CB:2F:C6:4C): /org/bluez/hci0/dev_60_45_CB_2F_C6_4C
DEBUG:root:Connected to network (dev_remote: /org/bluez/hci0/dev_60_45_CB_2F_C6_4C, addr: 60:45:CB:2F:C6:4C) uuid 'nap' with iface: bnep0
Passing in opts.wait

From what I found, the bnep0 interface should show up automatically. I also tried to modify /etc/network/interfaces but no configuration raised bnep0 interface after running bt-pan.

The only bluetoothd logs I have are the following ones

#tail -f /var/log/messages 
Jan  1 03:39:22 linux-board daemon.info bluetoothd[249]: bnep%d connected
Jan  1 03:39:22 linux-board daemon.info bluetoothd[249]: bnep0 disconnected

If I run the script a second time I have the following errors

# bt-pan --debug client 60:45:CB:2F:C6:4C --wait
DEBUG:root:Using local device (addr: 00:16:A4:0A:15:13): /org/bluez/hci0
DEBUG:root:Using remote device (addr: 60:45:CB:2F:C6:4C): /org/bluez/hci0/dev_60_45_CB_2F_C6_4C
Traceback (most recent call last):
  File "/usr/bin/bt-pan", line 238, in <module>
    if __name__ == '__main__': sys.exit(main())
  File "/usr/bin/bt-pan", line 209, in main
    try: iface = net.Connect(opts.uuid)
  File "/usr/lib/python3.6/site-packages/dbus/proxies.py", line 145, in __call__
  File "/usr/lib/python3.6/site-packages/dbus/connection.py", line 651, in call_blocking
dbus.exceptions.DBusException: org.bluez.Error.Failed: Input/output error

And the following logs

#tail -f /var/log/messages 
Jan  1 03:43:19 sama5d2_puv3 daemon.err bluetoothd[249]: bnep: Could not bring up bnep0: No such device(19)
Jan  1 03:43:19 sama5d2_puv3 daemon.err bluetoothd[249]: bnep: Failed to kill connection: No such file or directory (2)
Jan  1 03:43:19 sama5d2_puv3 daemon.err bluetoothd[249]: connect failed Input/output error

If I run it a third time, I have the same result than first exec


Does someone know why the interface is not showing up?

  • Not an answer: I wanted to use the Bluetooth from the RPi Zero W, I cann't do it because the wireless chip were broken (I had to look in a magnified glass) and some pins were disconnected. So: verify you had the hardware working, if is an USB dongle use the lsusb. Hope I can help you, a little at least. – k.Cyborg Feb 7 '18 at 14:16
  • 1
    Thanks for commenting, I'm pretty sure my hardware is working as I'm able to use other BT profiles such as HSP, GATT etc... I suppose I should even not be able to pair with a device if the BT chip was broken – Arkaik Feb 7 '18 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.