I am trying to make a 6lowpan network with raspberry pi device(s) and embedded systems. I enabled bluetooth_6lowpan (modprobe bluetooth_6lowpan
and echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable
) in both raspberry pi devices, where one is installed with radvd and configured as
interface bt0
{
AdvSendAdvert on;
prefix 2001:db8::/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};
I connected other raspberry pi (Pi 4, with kernel ver 5.4.83-v7l+) and an embedded device to this router (Pi W Kernel ver 5.4.79+). I can ping between devices and router from both sides, but unable to ping the one raspberry pi to the other embedded device through the router. Also I cannot open a socket between router and raspberry pi device (I can open an socket from embedded device and it can send data but not receive). This seems that raspberry pi is not forwarding any packets to the bt0 interface.
ip -6 route
from both raspberry pi are below:
device
::1 dev lo proto kernel metric 256 pref medium
2001:db8::/64 dev bt0 proto kernel metric 256 expires 86263sec pref medium
fe80::/64 dev bt0 proto kernel metric 256 pref medium
default via fe80::b827:ebff:fe0e:8ee dev bt0 proto ra metric 1024 expires 1663sec hoplimit 64 pref medium
router
::1 dev lo proto kernel metric 256 pref medium
2001:db8::/64 dev bt0 proto kernel metric 256 pref medium
fe80::/64 dev wlan0 proto kernel metric 256 pref medium
fe80::/64 dev bt0 proto kernel metric 256 pref medium
EDIT 1
When compared with the guide (https://jan.newmarch.name/IoT/LinuxJournal/Routing/, why do we need a lowpan interface!!), I found that the next hope for the default route (using the command route -A inet6
) [::]/0 is the address of the router, fe80::1 in the tutorial, but in my case all next hope is [::]. Is this the problem? How can I solve this?
I tried the following
sudo ip r a 2001:db8::/64 dev bt0
sudo ip r a default via 2100:db8::1
RTNETLINK answers: No route to host
And nothing changed for route -A inet6 output, which is
Kernel IPv6 routing table Destination Next Hop Flag Met Ref Use If localhost/128 [::] U 256 1 0 lo
2001:db8::/64 [::] U 256 2 0 bt0
2001:db8::/64 [::] U 1024 1 0 bt0
fe80::/64 [::] U 256 2 0 wlan0
fe80::/64 [::] U 256 2 0 bt0
[::]/0 [::] !n -1 1 0 lo
localhost/128 [::] Un 0 3 0 lo
2001:db8::/128 [::] Un 0 3 0 bt0
2001:db8::1/128 [::] Un 0 4 0 bt0
fe80::/128 [::] Un 0 4 0 wlan0
fe80::/128 [::] Un 0 3 0 bt0
fe80::98d4:d9d4:4e46:dc6a/128 [::] Un 0 3 0 wlan0
fe80::b827:ebff:fe0e:8ee/128 [::] Un 0 3 0 bt0
ff00::/8 [::] U 256 4 0 wlan0
ff00::/8 [::] U 256 2 0 bt0
[::]/0 [::] !n -1 1 0 lo