The portion of the stack shown above the user-kernel boundary in Figure 2-1 is accessible to applications.There are some exceptions to this, however, such as: An application that must display Bluetooth-specific error messages to provide a more informative and responsive user experience An application that vends a new service An application that implements a new profile In these applications, you will need to use the API the Bluetooth frameworks provide.
To prepare a foundation for the discussion of the API, this chapter first describes the OS X implementation of the Bluetooth protocol stack. Then, it describes the various objects, methods, and functions available in the Bluetooth frameworks. Java Api For Bluetooth Books How To Use TheFor application-design considerations and outlines of how to use the Bluetooth API to perform specific tasks, see Developing Bluetooth Applications. The complete manual of suicide english translationThe OS X Bluetooth Protocol Stack The foundation of OS X Bluetooth support is Apples implementation of the Bluetooth protocol stack. Saw dual audiu torrentFor reference, the Bluetooth protocol stack, as defined by the Bluetooth SIG, is described in The Bluetooth Protocol Stack. Figure 2-1 shows the Bluetooth protocol stack thats built into OS X version 10.2 and later. Figure 2-1 The OS X Bluetooth protocol stack The OS X implementation of the Bluetooth protocol stack includes both in-kernel and user-level portions. Figure 2-1 shows the layers of the stack that exist in the kernel and the corresponding user-level layers an application can access. The Bluetooth module at the bottom of the stack is the hardware component that implements the Bluetooth radio, baseband, and link manager protocols. Neither an application nor even the host has access to this layer of the stack. ![]() Conversely, the HCI layer receives events from the Bluetooth module and transmits them to the upper layers. To implement the functions of the HCI layer in the kernel, Apple defines the abstract class IOBluetoothHCIController. IOBluetoothHCIController is the superclass of another in-kernel object, AppleBluetoothUSBHCIController, which provides support for Bluetooth over USB. Therefore, any hardware that supports the USB HCI specification should work with the Bluetooth implementation on OS X version 10.2 and later. It is possible, although certainly not trivial, to subclass the IOBluetoothHCIController object to provide vendor-specific functionality or to support Bluetooth over a transport other than USB. If you need to do this, you should contact Apples Developer Technical Support (at ) for assistance. Applications can use objects in the user-level L2CAP and RFCOMM layers to access the corresponding in-kernel objects, although many applications will not need to do so directly. Recall that the L2CAP (logical link control adaptation protocol) provides: Multiplexing of data channels Segmentation and reassembly of data packets to conform to a devices maximum packet size Support for different channel types and channel IDs, such as RFCOMM The in-kernel L2CAP layer provides the transport for the higher-level protocols and profiles. As the primary communication gateway between two Bluetooth enabled devices, the OS X L2CAP layer implements the ability to register as a client of an L2CAP channel and write data to the channel. Using the L2CAP layers multiplexing feature, it is possible to send and receive data to and from the RFCOMM layer and the SDP layer at the same time. Above the in-kernel L2CAP layer in Figure 2-1 is the RFCOMM protocol layer. The in-kernel RFCOMM protocol layer is a serial-port emulation protocol. Its primary mission is to make a data channel appear as a serial port. It also implements the ability to create and destroy RFCOMM channels and to control the speed of the channel as if it were a physical serial-port cable.
0 Comments
Leave a Reply. |
Details
AuthorAndrew ArchivesCategories |