I'm currently trying to implement a PAN connection over bluetooth between two boards.
The first board is a Raspberry Pi Zero and the second a custom one based on Atmel Sama5d2.
Boards are respectively running Linux 4.9.75+ and Linux 4.9.30 and using BlueZ v5.43 and BlueZ v5.46.
I'm able to connect to my phone's tethered bluetooth connection with both boards using bt-panscript.
Here is the trace of a connection to my phone's tethered connection
# bt-pan --debug client 60:45:CB:2F:C6:4C --wait DEBUG:root:Using local device (addr: B8:27:EB:20:54:45): /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
Here is what I have done so far (using rpi as client and custom board as server) :
Boards are paired
[bluetooth]# paired-devices Device B8:27:EB:20:54:45 raspberrypi[/code]
[bluetooth]# paired-devices Device 00:16:A4:0A:15:13 BlueZ 5.46
Setup bridge interface on server side
#brctl addbr bnep0 #brctl setfd bnep0 0 #brctl stp bnep0 off #ip addr add 10.5.0.5/255.255.0.0 dev bnep0 #ip link set bnep0 up
Launch bt-pan script as server on server side
#bt-pan --debug server bnep0 DEBUG:root:Using local device (addr: 00:16:A4:0A:15:13): /org/bluez/hci0 DEBUG:root:Registered uuid 'nap' with bridge/dev: bnep0 / 00:16:A4:0A:15:13
Launch bt-pan script as client on client side
# bt-pan --debug client 00:16:A4:0A:15:13 --wait DEBUG:root:Using local device (addr: B8:27:EB:20:54:45): /org/bluez/hci0 DEBUG:root:Using remote device (addr: 00:16:A4:0A:15:13): /org/bluez/hci0/dev_00_16_A4_0A_15_13 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 210, in main try: iface = net.Connect(opts.uuid) File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__ **keywords) File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking message, timeout) dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "Connect" with signature "s" on interface "org.bluez.Network1" doesn't exist
From what I understand, it seems that my bluetooth device doesn't export the method
Connect for interface
Does anybody knows why the network profile is not supported?
Is there a workaround to solve this error ?