Chapter 11. Bluetooth in Linux

   


In connection with the enormous proliferation of portable devices such as laptops, PDAs (Personal Digital Assistants), and mobile phones, it becomes increasingly important to find ways to network these devices. Wireless technologies appear to be an ideal solution to this problem, because they don't need a permanently installed infrastructure and facilitate fast establishment and tear-down of networks (so-called ad-hoc networks). In 1998, a number of manufacturers, including Ericsson, Nokia, IBM, Toshiba, and Intel, cooperated in the development of a standard for wireless communication over short distances for consumer electronics. The result of this joint effort is the Bluetooth technology, which operates in the 2.4 GHz frequency range. The Bluetooth consortium specified the radio interface and the higher protocol layers (Bluetooth core), plus so-called profiles (Bluetooth profiles), each of which defines procedures and parameters of the protocol stack for a specific application field (e.g., telephones, headsets, and file transfer). This standardization effort was intended to ensure interoperability of all Bluetooth devices. The Bluetooth specifications are available at [Group01].

The core specifications include the elements shown in Figure 11-1. The three bottom layers are implemented in the Bluetooth hardware (firmware). The radio interface deals with frequency bands, signal outputs, transmission channel parameters, and other mobile properties. The baseband processing includes both additional transmission-specific aspects and media-access aspects (e.g., detection of devices in the neighborhood and initialization of synchronous or asynchronous communication channels).

Figure 11-1. The Bluetooth protocol stack in the Linux kernel.

graphics/11fig01.gif


The higher-layer Link Management Protocol (LMP), which is implemented by the Link Manager, serves to exchange control data between the higher layers and the baseband processing. The Bluetooth technology is primarily designed for cellular devices, so the standard defines an audio interface on a very low layer. However, this audio interface does not play an important role for networked computers. In addition, the standard defines a protocol stack above the three layers mentioned above, which are implemented in hardware. This protocol stack normally runs in software on a client (e.g., a PDA or a laptop).

The bottom layer of this protocol stack the optional Host Controller Interface (HCI) lets you access device parameters directly, regardless of the interface to the device (USB, serial interface), to change or view device parameters. However, it does not serve for data transmission over a Bluetooth device.

The Logical Link Control and Adaptation Protocol (L2CAP) is used for each data transmission. It represents the data-link layer of the Bluetooth protocol stack. More specifically, L2CAP is used to send higher-layer packets to the other end of the layer-2 link in another device within the Bluetooth network and to receive from this device. Notice that this is a connection-oriented layer, except for group communication. This means that, if a Bluetooth device moves into the receiving range of another Bluetooth device, then L2CAP has to establish a connection before higher layers can transmit data. This requirement makes the implementation of IP directly over L2CAP more difficult; no such implementation has yet been specified and implemented in the Linux kernel. To find an intermediate solution, the RFCOMM was specified for a virtual RS232 link over the L2CAP protocol of Bluetooth. This means that a virtual COM port is available; it can be used, for example, by PPP (see Chapter 8) to transmit data. The PPP protocol can then also support the use of the TCP/IP protocol suite.

Linux kernel Version 2.4 introduced Bluez, a Bluetooth implementation developed by Qualcomm. You can follow up on how Bluez is further developed at http://sourceforge.net/projects/bluez. In addition, there are other implementations, among them the Axis stack (http://sourceforge.net/projects/openbt/).


       


    Linux Network Architecture
    Linux Network Architecture
    ISBN: 131777203
    EAN: N/A
    Year: 2004
    Pages: 187

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net