Originally Published: Tuesday, 16 October 2001 Author: Devang Shah and Anurag Phadke
Published to: enhance_articles_hardware/Hardware News Page: 2/6 - [Printable]

The Commands Remain the Same: BlueTooth Technology and Linux

Linux.com is pleased to publish this well researched look at the emerging field of wireless networking, focusing on Bluetooth technology and Linux. Learn all about Bluetooth and even modifying the kernel (when needed) to support it.

Link Manager Protocol  << Page 2 of 6  >>

Link Manager Protocol (LMP) :

Basic functions performed by a LMP:

  1. Piconet management
  2. Link configuration
  3. Security functions

The device which get's initialized first becomes the master while the remaining seven become its slaves. Using SCO/ACL links the devices communicate with one another, the master sharing the channel with LinMangers present on each device, assisting it in it's job. Services such as authentication and encryption, control of power mode and duty cycles of the Bluetooth radio device, plus connection status of the unit in a piconet are offered by LMP.

Logical Link Control and Adaptation Protocol (L2CAP) :

An interface similar to the TCP/IP, this protocol resides in the data link layer which encaps the upper layer protocols over the baseband providing connection oriented and connectionless data services to the upper layer when no data is being sent via LMP. If L2CAP resides on the Bluetooth module, then the presence of a Host Controller is redundant and it's absence is not felt.

The basic functions of L2CAP can be categorized into:

More than one application can use the existing link to transfer data between two devices at the same time..
Segmentation and Reassembly
The job of reducing the packet sizes sent by applications to the appropriate size of baseband is performed here. Packets up to 64kb in length can be delivered though the baseband packets, though they can only accept a load of 2745 bits. Once the segmented packets have been received, they need to be reshuffled back into the proper order, which is handled by the re-assembly unit.
Quality of Service
L2CAP can be considered as acting like the HR department of the Bluetooth stack. To maintain cordial relations between various layers/units, demand for peak bandwidth, latency and delay variation are met as and when the resources are available.

L2CAP uses channels identified by CID's (Connection Identifiers) which are 16 bit numbers representing a logical end point of a connection for each application on a device. In addition, Protocol Multiplexing and Segmentation and Reassembly operations to provide Maximum Transfer Unit (MTU) throughput is present in L2CAP.

The Host Controller Interfaces
Almost all Bluetooth devices available in the market are in the form of addon cards such as PCI cards or USB devices. The data first makes use of hardware modules to use the lower layers- radio, baseband and LMP and then make their way to the US adapter or PCI card.

The presence of a driver on the PC to format the data accordingly becomes mandatory along, with a host controller interface (HCI) on the device to receive and accept data.

Application layer :
The L2CAP may be accessed directly by the applications or through certain support protocols like RFCOMM, TCS and SDP mentioned earlier. This is the layer where programmers often tinker around trying to figure out the heads and tails of what they are doing (no offense meant though ;) ). To provide compliance between the existing protocols and those defined in the Bluetooth stack, Bluetooth adopts protocols such as PPP, TCP/IP, JINI and WAP so intercompatibility between existing devices and newer technology can exist.

SDP (Service Discovery Protocols ) -> Using SDP device information, services online, connection between two or more units can be established.

RFCOMM -> Physical connection between two communicating devices is established using RS-232 control. The RFCOMM emulates this RS-232 process by sending equivalent signals over upper layer services such as OBEX. Up to 60 simultaneous connections between two Bluetooth devices can be established.

Link Manager Protocol  << Page 2 of 6  >>