This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can't find "bt0" on Raspberry Pi 4

Hello, Everyone
I am going to develop an IoT project with nRF52840 and Raspberry Pi 4

My idea is exactly the same as this link
https://visualgdb.com/tutorials/arm/nrf51/6lowpan/
I have followed the below links to build BLE 6LoWPAN environment on my Rpi4

All commands were working fine until echo "connect <mac address of other device> 1" > /sys/kernel/debug/bluetooth/6lowpan_control. As seen from the websites, after this command execution, there should be bt0 interface created. But it is not visible in ifconfig -a.

Also the 6lowpan_control file is empty. But when I try to connect the other device using the command hcitool con after executing the above command, I am able to see the desired connections in the terminal, still no bt0 device available. I have even tried with the command ifconfig bt0 add 2001:db8::1/64 but resulted in the error SIOGIFINDEX: No such device.

How to resolve this problem?

Parents
  • Hi,

    Which OS are you running on the RPi 4? As far as I know, 6LowPAN support should be enabled by default in Raspbian releases the last few years, no need to build the kernel as described in the docs.

    Did you check if a connection was actually established with the device on the address that you passed to 'echo "connect' command? Could you capture a sniffer trace to see what happens on-aur between the RPi and the nRF52840?

    Best regards,
    Jørgen

  • Hi,

    I tested this out on a RPi4 with the same OS version, and a nRF52840 DK running the IoT CoAP server example.

    These commands works on my end:

    pi@raspberrypi:~ $ sudo -i
    
    root@raspberrypi:~# modprobe  bluetooth_6lowpan
    
    root@raspberrypi:~# echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable
    
    root@raspberrypi:~# echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
    
    root@raspberrypi:~# hcitool lescan
    LE Scan ...
    00:F5:E7:B0:90:9A CoAP_SRV
    00:F5:E7:B0:90:9A (unknown)
    
    root@raspberrypi:~# echo "connect 00:F5:E7:B0:90:9A 1" > /sys/kernel/debug/bluetooth/6lowpan_control
    
    root@raspberrypi:~# ifconfig bt0
    bt0: flags=4161<UP,RUNNING,MULTICAST>  mtu 1280
            inet6 fe80::dca6:32ff:fe36:5978  prefixlen 64  scopeid 0x20<link>
            unspec DC-A6-32-36-59-78-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
            RX packets 1  bytes 28 (28.0 B)
            RX errors 0  dropped 2  overruns 0  frame 0
            TX packets 19  bytes 1783 (1.7 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    root@raspberrypi:~# ping -6 fe80::dca6:32ff:fe36:5978
    PING fe80::dca6:32ff:fe36:5978(fe80::dca6:32ff:fe36:5978) 56 data bytes
    64 bytes from fe80::dca6:32ff:fe36:5978%bt0: icmp_seq=1 ttl=64 time=0.132 ms
    64 bytes from fe80::dca6:32ff:fe36:5978%bt0: icmp_seq=2 ttl=64 time=0.085 ms
    64 bytes from fe80::dca6:32ff:fe36:5978%bt0: icmp_seq=3 ttl=64 time=0.073 ms
    64 bytes from fe80::dca6:32ff:fe36:5978%bt0: icmp_seq=4 ttl=64 time=0.070 ms

    Best regards,
    Jørgen

Reply
  • Hi,

    I tested this out on a RPi4 with the same OS version, and a nRF52840 DK running the IoT CoAP server example.

    These commands works on my end:

    pi@raspberrypi:~ $ sudo -i
    
    root@raspberrypi:~# modprobe  bluetooth_6lowpan
    
    root@raspberrypi:~# echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable
    
    root@raspberrypi:~# echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
    
    root@raspberrypi:~# hcitool lescan
    LE Scan ...
    00:F5:E7:B0:90:9A CoAP_SRV
    00:F5:E7:B0:90:9A (unknown)
    
    root@raspberrypi:~# echo "connect 00:F5:E7:B0:90:9A 1" > /sys/kernel/debug/bluetooth/6lowpan_control
    
    root@raspberrypi:~# ifconfig bt0
    bt0: flags=4161<UP,RUNNING,MULTICAST>  mtu 1280
            inet6 fe80::dca6:32ff:fe36:5978  prefixlen 64  scopeid 0x20<link>
            unspec DC-A6-32-36-59-78-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
            RX packets 1  bytes 28 (28.0 B)
            RX errors 0  dropped 2  overruns 0  frame 0
            TX packets 19  bytes 1783 (1.7 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    root@raspberrypi:~# ping -6 fe80::dca6:32ff:fe36:5978
    PING fe80::dca6:32ff:fe36:5978(fe80::dca6:32ff:fe36:5978) 56 data bytes
    64 bytes from fe80::dca6:32ff:fe36:5978%bt0: icmp_seq=1 ttl=64 time=0.132 ms
    64 bytes from fe80::dca6:32ff:fe36:5978%bt0: icmp_seq=2 ttl=64 time=0.085 ms
    64 bytes from fe80::dca6:32ff:fe36:5978%bt0: icmp_seq=3 ttl=64 time=0.073 ms
    64 bytes from fe80::dca6:32ff:fe36:5978%bt0: icmp_seq=4 ttl=64 time=0.070 ms

    Best regards,
    Jørgen

Children
No Data
Related