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

[NTNU] Connecting nRF52 to Raspberry Pi, no stable 6LoWPAN connection

Hi,

I'm trying to connect a nRF52-PREVIEW-DK to a Raspberry Pi 2 model B using 6LoWPAN. The nRF52 is running an HRM example, with LED1 blinking ready to connect. The Raspberry Pi is running Raspbian Jessie with kernel version 4.1.

As far as I understand, this can be done by adding "connect EC:46:xx:xx:xx:xx 1" to the file /sys/kernel/debug/bluetooth/6lowpan_control on the raspberry pi, but I it seems like I am unable to write to this file using echo or nano.

However, if I write

echo "EC:46:xx:xx:xx:xx 1" > 6lowpan_control

the nRF52 will appear in the list of connected devices (writing hcitool con) for a short period of about 15 seconds. The LED1 on nRF52 does not go over to a solid light, but instead continues to blink. After this the list of connections is again empty. The file 6lowpan_control on the raspberry pi remains empty (as far as I can see) this whole period.

It seems to me that the Raspberry Pi wants to connect, but the nRF52 does not "understand" that a connection has been made. Therefore the Pi drops the connection after a short period. Any idea on why this happens, and how to fix it?

Thanks a lot for all answers.

Regards,

Sindre Schei, Master student, Department of Telematics, NTNU Trondheim

Parents
  • Turns out that our main problem was the code on the nRF52. The example code (Nordic_HRM) made LED1 blink as if it was ready to connect, even though it was not.

    When we instead used another example code (for instance ipv6 coap server), we where able to connect by writing echo 1 to 6lowpan_enable as Håkon told us, followed by

    echo "connect EC:46:xx:xx:xx:xx 1" > 6lowpan_control

    to connect the nRF52.

Reply
  • Turns out that our main problem was the code on the nRF52. The example code (Nordic_HRM) made LED1 blink as if it was ready to connect, even though it was not.

    When we instead used another example code (for instance ipv6 coap server), we where able to connect by writing echo 1 to 6lowpan_enable as Håkon told us, followed by

    echo "connect EC:46:xx:xx:xx:xx 1" > 6lowpan_control

    to connect the nRF52.

Children
No Data
Related