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

6lowPAN on nrf51822

I use this step-by-step guide to run nrf51 Iot SDK example on nRF51822.

First I modified app_ipv6_coap_client_pca10028 such that I can run it on nRF51822. I downloaded latest RPI Raspbian Debian Wheezy Kernel v3.18. After that I update it to Linux raspberrypi 3.18.9-v7+ which has 6lowpan support included. So I don't need to do steps 4.c, 5 and 6.d-e, 7 in "Installing required packages on the Raspberry Pi" part.

Next I got account on Sixxs(aiccu) to be able to ping device over internet because my provider don't use ipv6. So I need tunnel. I addded Sixxs prefix to interface bt0

{
AdvSendAdvert on;
prefix <Sixxs prefix>/64
{
AdvOnLink off;
AdvAutonomous on;
AdvRouterAddr on;
};
};

I also add /sbin/ip addr add ::1/64 dev bt0

After that I connected to device and can ping but after some minutes connection lost and I need do connect to device again. So auto connection is needed! And I don't know the reason why connection lost. Device lies close to RPI.

Could anybody suggest how to do auto connect and find reason of disconnection?

  • We have seen some similar behavior here when we are using the hcitool. It seems like there's a small bug or issue with 6lowPAN and Raspian for doing scanning while in a connected state. At least what we have seen occasionally and reported that if you are in a connection and does a hciscan, the Raspberry sometimes lock up. Is it possible that you are doing something similar?

    If we avoid doing scans once you are connected, it seems to be more stable.

  • No It looks like if data exchange doesn't take place a connection will be lost maybe due to power save state. Maybe I said something silly.

    But when I use hcidump connection is stable. The question is how do autoreconnection implement?

    In any case it is possible that problem in my HW but connection may lost due to many reasons. I would like somethink like bonding. If I connect to device as hcitool lecc <bdaddr> I see "BLE link established, IPv6 interface down".

    Only echo "connect 00:AA:BB:XX:YY:ZZ 1" > /sys/kernel/debug/bluetooth/6lowpan_control works.

    So is it possible to make 6lowPAN bonding or pairing not only connection to quickly reconnect?

Related