## 3 Key Building Blocks
### IPv6 over Bluetooth Smart  
Bluetooth SMART v. 4.1 [8, 71] is a PAN technology that was introduced to the market by the Bluetooth SIG in 2013. Bluetooth SMART consists of two distinctly different transports called _Basic and Enhanced data rate (BR/EDR, collectively named Classic)_ and _Low energy (LE or Smart)_. Smart supports 2 modes of connection: Non-connected, unidirectional advertisements (broadcast, unicast and scan support); Connected, bidirectional and reliable (maximum theoretical application throughput is 300 kbit/s). The network topology for connection is scatter net where the collector device is typically a master and sensors are slaves. Bluetooth uses 3 channels for service advertisements and 37 channels for data. One reason for having the master role assigned to the collector is that collocation of multiple radios in a mobile handset requires time sharing between radios. The Bluetooth co-existence controller is specified in Core specification 4.1 is particularly important in combination with 4G networks as LTE TDD that occupies a frequency directly adjacent to Bluetooth. LE also improves robustness and co-existence with nearby networks by using _adaptive frequency hopping_. Bluetooth is a hierarchal stack consisting of the following layers and functional units:  
* Radio and link layer (LL) with an AES-128 bit encryption unit;
* Multiplexer. Logical link control and adaption layer protocol (L2 CAP) providing fixed and connection oriented channels together with fragmentation and reassembly (FAR);
* Security Manager (SM);
* Host Controller Interface (HCI). Connects application processor and Bluetooth controller;
* The General Access profile (GAP). Contains a collection of standard procedures;
* Generic attribute profile (GATT) provides an interoperable framework with service discovery and operation. Bluetooth SIG defined service data is characterized by 16 bit universally unique identifiers (uids) while proprietary extensions use randomized 128 uids. The Bluetooth protocol multiplexor (L2 CAP) can be used to add new transport protocols to the Bluetooth SMART stack. L2 CAP is a symmetric protocol which implies that any device can create a bidirectional channel to receive or transmit data. A significant constraint on the multiplexor in Bluetooth 4.0 was the limited MTU. As part of Bluetooth 4.1 the multiplexor has added support for connection oriented channels with credit based flow control that allows for exchanging large data packets with MTU up to 64 kBytes. Bluetooth Smart is intended for very memory constrained devices and flow control was considered essential. To receive data on device has to give the other device credits that indicate the amount of data that can be received. The mechanism supports the full process of segmentation-reassembly (SAR) and fragmentation-recombination and (FAR). Other traffic can be scheduled around segments implying that with well selected parameters a system will not hang due to a long data transfers; rather multiple service traffic can coexist on one radio interface. The architecture of the IP solution will now be shortly described. The IP solution is using Bluetooth merely for two purposes, discovery and transport. Bluetooth is used to either advertise an IP service to other devices/service or finding the service through GATT and as a transport for IP datagrams. Bluetooth 4.1 supports scatter nets, but the most common used topology will be a star where sensors are Peripherals or slaves and e.g., a phone is a Central master, see Figure 13. The architecture cansupport an IP mesh in the future although the first specification is not expected to allow mesh. The topologie and roles in Bluetooth LE pico net are represented in Figure 13. Sensors are 6 LoWPAN nodes (6 LN) and the central is a 6 LoWPAN Border Router (6 LBR), which connects the Pico net into the Internet.