Read Me
btlowpan - An implementation of draft-ietf-6lowpan-btle for Linux
*****************************************************************
Copyright (C) Marcel De Kogel <marcel.dekogel@yahoo.com>
This is work in progress; many features are not fully, or not all, implemented.
Compilation and installation
============================
In order to compile this program you need following software packages:
- Patched version of the Linux kernel (see below)
- BlueZ libraries and tools (I used version 4.99, I'm not sure if 5.x will work)
- GCC compiler
- pthreads library
- OpenVPN
- iproute2
- automake
- autoconf
Patching and compiling the kernel:
Get the linux kernel source code for your distribution. For kernel versions
3.2, 3.3 and 3.4, apply the patch in the directory kernel/3.4.10. For kernel
versions 3.5 and later, apply the patch in the directory kernel/3.7.2.
Build and install the kernel, and reboot.
To configure run:
./autogen.sh
To compile and install run:
make && make install
To run:
Copy the scripts in the directory src/scripts to your working directory.
Run ifup.sh, followed by slave.sh on the BTLE slave and master.sh on the
BTLE master. If you're not using hci0 and tun0, pass arguments to the
scripts accordingly - see the comments in the scripts for details.
The slave should now automatically get configured with a unique local
address, with the fd00::1111/64 prefix. The prefix can be set in the
master-connection.cc source file.
If you want to use a random address on the slave, set the random address
in both get_link_local_addr-rand.sh and slave-rand.sh and use ifup-rand.sh
and slave-rand.sh instead of ifup.sh and slave.sh. Using a random address
on the master is not supported.
Known Issues
============
Currently the program uses L2CAP CID 4, the CID reserved for attribute protocol.
At a later stage, support for a CID dedicated for lowpan use will be added. For now,
should it be needed to use a different CID, the CID value in bt-le-controller.cc needs
to be changed, along with the L2CAP_CID_LE_DATA value in include/net/bluetooth/l2cap.h
in the kernel source directory.
Bluez 4.99 does not use the LE_Read_Buffer_Size command to read the maximum size of
HCI LE ACL packets; instead it uses a shared buffer with BR/EDR ACL. This shouldn't
cause any problems when only using GATT, but IPv6 requires L2CAP fragmentation
support. If your controller uses a separate buffer for HCI LE ACL packets,
you may need to override the ACL MTU in Bluez. I need to use "hciconfig hci0 27:1".
Further Information
===================
For additional information about the project visit the btlowpan web site:
http://sourceforge.net/p/btlowpan