Linux 6LoWPAN on BeagleBone Black (BBB)

Here are the steps I used to get the latest version of Linux 6LoWPAN stack running on BeagleBone Black (BBB).   The steps below are a BBB version of what Openlabs did for the Raspberry Pi B.  The goal here is to use the Openlabs 802.15.4 radio on BBB.

First, I loaded the Debian 2015-03-01 Release on my sdcard following the steps found here. 

I strongly suggest that you get that image booted on your BBB first.  This rules out any issues with your setup prior to using the steps below.  You can also go back to the stock Debian image if needed.  This Debian release sets the sdcard up such that we can u-boot different kernels by changing just one line in /boot/uEnv.txt.

One running, we’ll replace the Debian kernel with what is built via the steps below.

The file “beaglebone_defconfig” doesn’t seem to be in this repo.   I copied “beaglebone_defconfig” from “someplace” into the “arch/arm/configs/beaglebone_defconfig” directory.  IIRC I got the file from the “patch” for 3.8 kernel, see http://beagleboard.org/linux.  You only need the beaglebone_defconfig file which will be available after running the patch.sh script.

Now make beaglebone_defconfig:

Configure the kernel for 6LoWPAN.  If you are using the Openlabs radio, you will want to enable that in the kernel too.

I enabled the following via menuconfig, as kernel modules:

Now make the kernel and modules:

We need to append this to the am335x-boneblack.dts file:

then make the dts file:

Unlike Pi, we do not need to add u-boot.  We can also use the existing u-boot configuration in uEnv.txt.  We just need to put our stuff on the BBB with the same names that BBB and u-boot already use to boot and load etc.  The name to use is based on the build.  I find it bylooking at the name of the directory given to the modules just built:

Now use that suffix as shown below:

Edit /boot/uEnv.txt, comment out the current uname variable created by the original Debian image.   Add a new value for your uname, in my case it was “4.0.0-rc7-244801-g35ef6e9”

I also disabled HDMI on BBB.  I’ve read that the BBB P9 header uses some of the pins for HDMI.  Depending on what you read, this is/isn’t an issue unless you plug in the HDMI cable.  Just to be safe, I turned it off.  My full /boot/uEnv.txt is below:

Now copy the modules over to the BBB:

Finally, copy dts files over to BBB:

Now reboot!  When you logon, “uname -a” should show you the image you just built.

The Openlabs 802.15.4 radio was built for Raspberry Pi B.  To work with the BBB, you need to connect the J1 pins of the Openlabs radio to the BBB P9 header as shown here.

In a future post, I’ll talk about installing the wpan-tools that make use of the 802.15.4 radio.

This entry was posted in Beaglebone and tagged , , , . Bookmark the permalink.