Wiki

Clone wiki

ptp-wpan-6lowpan / Home

Installation

The entire setup assumes that the beaglebone black nodes are mounted to a controller through Network File Sharing (NFS). All the code (kernel & userspace) is maintained and compiled at a controller. The beaglebone nodes are NFS mounted to the controller and boot up by taking their Kernel from the controller. These nodes automatically get the changes in executables and other relevant code.

Build Kernel

Checkout the bb-kernel code on your controller,

$> git clone https://github.com/RobertCNelson/bb-kernel.git -b 4.1.12-bone-rt-r16
$> cd bb-kernel
Then, build the kernel,

$> ./build_kernel.sh

Apply the patches given at /ptp-wpan-6lowpan/4.1.12-bb-kernel/patchset to the kernel and build the kernel again,

$> ./tools/rebuild.sh

Prepare an sd card image for the Beaglebone black to be NFS mounted to controller. Use this kernel to boot up the nodes.

Build & Install

Check out the ptp-wpan-6lowpan code on the controller,

$> git clone git@bitbucket.org:rose-line/ptp-wpan-6lowpan.git
$> cd ptp-wpan-6lowpan

Initialize the linuxptp code

$> git submodule init
$> git submodule update

The entire project is cmake-driven, and so the following should suffice:

$> mkdir -p build % Do this in the top most project directory %
$> pushd build
$> ccmake ..
$> make
$> sudo make install
This will compile the kernel module (DW1000) as well as the userspace code. This will also copy the userspace executables to the nodes.

Install kernel modules

In the top most project directory (\ptp-wpan-6lowpan) run,

$> make
$> sudo make install

After installing the kernel modules (dw1000.ko) and the device tree binary files (dtbo), you might need to run depmod on the nodes.

Configuration

Firstly, SSH into a node of choice:

If you type capes on the command line you should see four slots as empty:

root@arm:~# capes
 0: PF----  -1 
 1: PF----  -1 
 2: PF----  -1 
 3: PF----  -1 

When you installed the kernel module a DTBO file was copied to /lib/firmware. This is a device tree overlay file that tells the BeagleBone how to multiplex its I/O pins, and which kernel module to load after it has done so. To apply the overlay use the capes command.

$> capes DW1000

The output of the capes command should now be this:

root@arm:~# capes
 0: PF----  -1 
 1: PF----  -1 
 2: PF----  -1 
 3: PF----  -1 
 4: P-O-L-   0 Override Board Name,00A0,Override Manuf,DW1000

Once the device tree is up, load the kernel modules,

root@arm:~# cd /lib/modules/4.1.12-bone-rt-r16/kernel/drivers/net/ieee802154
root@arm:~# insmod dw1000.ko

Running PTP Synchronization

Run the PTP daemon for 6LoWPAN interface,

$> ptpdaemon -v

Development

This code is maintained by University of California Los Angeles (UCLA) on behalf of the RoseLine project. If you wish to contribute to development, please fork the repository, submit your changes to a new branch, and submit the updated code by means of a pull request against origin/master.

Support

Questions can be directed to Fatima Anwar (fatimanwar@ucla.edu).

Updated