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

IoT SDK RPi3 - Using Jessie with bluetooth_6lowpan

Hi, I'm planning a project that uses MQTT with Raspberry Pi (RPi) 3 and PCA10040 (nRF52-DK).

I'm planning to use the AWS (Amazon Web Service) EC2 as a MQTT broker.

It's my first time working a project with an RPi, so I have questions about getting started.

/**************************************************************************/

I noticed that,

  1. Debian Jessie has been updated to v4.4 (Release date:2016-05-27).

I saw that the nRF51 IoT SDK provides raspbian-kernel-zip v3.17.4.

However, I think the kernel-zip v3.17.4 cannot control the BCM43438 chip which enables BLE and Wi-Fi for RPi3.

  1. There are tutorials that helps to configure RPi3's Wi-Fi and Bluetooth.

/**************************************************************************/

So my questions are,

  1. Does Nordic provide newly updated raspbian-kernel?

If not, is there a tutorial to build a Debian Jessie image with bluetooth_6lowpan?

Or is it unnecessary to create a new Jessie image to use the Nordic's IoT SDK 0.9?

  1. Did anybody test the IoT examples with the RPi3?

I saw a demo video; IPv6 brewed coffee demo and this uses RPi with Ethernet cable.

Whereas I want to create a project that uses Wi-Fi.

However, I'm worried whether this will work or not.

So did anyone tried an IoT example project with RPi3 or RPi2 with Wi-Fi USB dongle?

-Best Regards, Mango

    1. The IoT documentation is outdated now and was written before they had 6lowpan support in the linux kernel. If you download the newest Raspbian it has 6lowpan support included in the kernel (I've only tried raspbian with kernel version 4.1, it had 6lowpan support. So 4.4 should work as well). No need to build any kernels. It should work pretty much out of the box.

    2. Not tested on RPi3, but I got it working with RPi2 and wlan dongle. Just get a dongle that is supported by Raspbian, which will make things a lot easier.

    EDIT 13.06.16

    I tried IoT SDK with RPi3 with the onboard bluetooth HW now and I was able to connect and ping the kit from the Pi.

    If you download Raspbian Jessie (kernel 4.4) 6lowpan support is included and it is easy to get things up and running. BLE support is working out of the box and I could scan for devices with just the hcitool lescan right away.

    To get 6lowpan up and running you need to activate it with,

    sudo -i
    modprobe bluetooth_6lowpan
    echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable
    

    Now I could connect to one of the IoT examples by writing,

    echo "connect XX:XX:XX:XX:XX:XX 1" > /sys/kernel/debug/bluetooth/6lowpan_contol
    

    If you want to access the kit with a global IP (not just the local IP over the bt0 interface), you need to activate radvd and add a global prefix to the bt0 interface. Please see this guide. But to summarize, all you have to do is:

    apt-get install radvd
    

    Create a file /etc/radvd.conf with this content:

    interface bt0
    {
        AdvSendAdvert on;
        prefix 2001:db8::/64
        {
            AdvOnLink off;
            AdvAutonomous on;
            AdvRouterAddr on;
        };
    };
    

    Then after you have connected to the kit:

    echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
    ifconfig bt0 add 2001:db8::1/64
    service radvd restart
    

    Now you should be able to ping with,

    ping6 2001:db8::2XX:XXFF:FEXX:XXXX
    

    where XX is the last 5 octets of the MAC address of the kit.

    The wifi is also working. I was able to set it up as an access point using this guide: frillip.com/.../

  • Thanks for your reply Stian.

    Good news that I don't have to make a kernel!

    I wish I could work with RPi 2 with WLAN and CSR BLE dongles.

    However, I have a limited budget. So buying those dongles are quite a pain to me.

    Does the Nordic dev team has plans to test with RPi 3?

    I don't want to urge it. I can wait for the dev team's test result.

    I believe there will be customers like me who want to use the latest RPi.

    Any plans for that?

    -Best Regards, Mango

  • I don't think the dev team have any plans on doing that right now, but I can order a RPi3 now and test it. I agree that there might be others interested in this as well. It will maybe take a week before it arrives and I get things up and running. Send me a PM if you don't hear anything.

  • Thanks a million! I will send a PM (personal message) if needed.

    Thanks for your help. Have a nice day!

Related