Re: Networking - NetworkServer1
From: Barry Byford <hidden>
Date: 2020-07-22 08:32:46
Hi Luiz, Thanks for the quick response. Very much appreciated. On Wed, 22 Jul 2020 at 00:27, Luiz Augusto von Dentz [off-list ref] wrote:
quoted
= bluetoothd: bnep: Can't add bnep0 to the bridge tether: No such device(19) 21:54:01.138304Well it looks like the bridge (tether) does not exist so we can't add the bnep interface, perhaps the idea is not to have it attached to any bridge in case of GN, PAN and just bring the interface up when an empty string is given as bridge.
An empty string also produced the error.
However, I created a bridge using the bridge utilities package
$ sudo apt install bridge-utils
$ sudo brctl addbr bluez
And then used
server.Register('panu', 'bluez')
This enabled the connection to be accepted from the client to happen
without error.
$ service bluetooth status
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled;
vendor preset: enabled)
Active: active (running) since Tue 2020-07-21 09:27:49 BST; 24h ago
Docs: man:bluetoothd(8)
Main PID: 625 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 2200)
Memory: 3.3M
CGroup: /system.slice/bluetooth.service
└─625 /usr/lib/bluetooth/bluetoothd --experimental
Jul 22 07:27:43 raspberrypi bluetoothd[625]: bnep: bridge bluez:
interface bnep0 added
I think the bridge probably needs more refinement as there does not
appear to be a route between the two devices still.
Any pointers on that appreciated.
Thanks again for your help on this Luiz.
Regards,
Barry
$ brctl show
bridge name bridge id STP enabled interfaces
bluez 8000.b827eb2257e0 no bnep0
$ brctl showstp bluez
bluez
bridge id 8000.b827eb2257e0
designated root 8000.b827eb2257e0
root port 0 path cost 0
max age 20.00 bridge max age 20.00
hello time 2.00 bridge hello time 2.00
forward delay 15.00 bridge forward delay 15.00
ageing time 300.00
hello timer 0.00 tcn timer 0.00
topology change timer 0.00 gc timer 0.00
flags
bnep0 (1)
port id 8001 state disabled
designated root 8000.b827eb2257e0 path cost 100
designated bridge 8000.b827eb2257e0 message age timer 0.00
designated port 8001 forward delay timer 0.00
designated cost 0 hold timer 0.00
flags
$ ifconfig bluez
bluez: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:22:57:e0 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
$ ifconfig bnep0
bnep0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.91.109 netmask 255.255.0.0 broadcast 169.254.255.255
inet6 fe80::ba27:ebff:fe22:57e0 prefixlen 64 scopeid 0x20<link>
inet6 fe80::64d6:60a1:4a0d:3e4 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:22:57:e0 txqueuelen 1000 (Ethernet)
RX packets 111 bytes 20669 (20.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 57 bytes 16084 (15.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.254 0.0.0.0 UG 202 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 233 0 0 bnep0
192.168.1.0 0.0.0.0 255.255.255.0 U 202 0 0 eth0