Font Size: a A A

Research And Application Of Bluetooth Protocol Stack In Embedded System

Posted on:2008-10-02Degree:MasterType:Thesis
Country:ChinaCandidate:J W WangFull Text:PDF
GTID:2178360212497015Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Bluetooth wireless technology is a low-power, the proximitycommunication technologies, as an open standard of wireless data and voicecommunications, its aim is to replace the existing line on the PC, printers andmobile phones and other devices. Many renowned IT companies (includingEricsson, Intel, Nokia, Toshiba, etc.) have launched Many Bluetoothproducts . And Bluetooth technology has been successfully applied to thesmart cell phone, for example; the NOKIA N73, the LG Chocolate mobilephones . Embedded Linux operating system because of its open nature andcharacteristics Application has become very competitive in the embedded OSsmartphones. Motroal successfully applied to the whole Linux embedded OSsmartphones. Estimated the Linux mobile phones will obtain the enormousdevelopment in 2007. Leon3 which was produced by Gaisler Researchcompany is one of 32 bit, with IEEE-1754 (SPARCVS) processor IP corestructure. Its predecessor is the Leon and ERC32 which was developed by theEuropean Space Agency. Leon3 internal hardware resources can be cut(configurable), and can be primarily used in embedded systems. thesmartphones project of DTK computer has been divided into two parts:hardware and software , the part of hardware based on LEON3 processor,AMBA bus IP core and other nuclear components; the part of software isincluding in embedded Linux operating system and the application software.This paper is the Bluetooth sub_project for the whole smartphone's project.First,the author has a brief introduction to the features of the Bluetoothtechnology. Through with other several kind of wireless technologies(Wi-Fi,Ultra, NFC)compares the good and bad points, looking to the futureBluetooth Technology; and the author analyses the hierarchical structure,some commonly-used application model and the implementation model ofBluetooth protocol stack. The hierarchical has been including of coreprotocol (including baseband, LMP, L2CAP and SDP),cable replacementprotocol (RFCOMM),telephone control protocol (TCS Binary, AT commandset),optional protocol (including PPP, UDP/TCP/IP, OBEX, WAP, vCardand vCal. IrMc, WAE, etc.); Bluetooth protocol stack has three realization models : the resided type, embedded and fully embedded, the differentrealization model is decided by the product different demand, this paper is therealization of the resided-model; the bluetooth application model can takemany forms, the author gave a brief of two common application model : FileTransfer model and LAN Access Model.And the author analyzes host control interface (HCI) and the LogicalLink Control and Adaptation protocol (L2CAP) in the Bluetooth protocolstack. HCI is a software and hardware interface protocol between theBluetooth module and mainframe in the resided mode. The author analyzesthe HCI protocol from three parts: HCI transport layer protocol, data formatand HCI flow control. HCI transport layer provides a transparent interface forthe physical interface of Bluetooth module; HCI data format divided intothree parts: HCI event packets, HCI data packets and HCI instruction packets;HCI flow control is used to manage data flow. L2CAP is based on theconcept of the channel, the channel has three types: L2CAPConnection-oriented channel. The connectionless-oriented channel, ChannelSignaling. Signaling channel is used to create and establishconnection-oriented data channel and to negotiate changes in thecharacteristics of connection-oriented and connectionless channels;Connection-oriented channel is used for connecting two Bluetoothcommunications equipment; the connectionless channels restrict data flow toa single direction. Under upper application of L2CAP protocol, the mode ofoperation in the L2CAP layer is divided into three parts: L2CAP basic model,flow control mode and Retransmission model. Retransmission mode and flowcontrol mode can only be used in the connection-oriented channel. L2CAPlayer provides a bridge for different length of the PDU transmission betweenthe top and the bottom layer, its provides connection-oriented andconnectionless data services to upper layer protocols with protocolmultiplexing capability, segmentation and reassembly operation ,and groupabstractions .L2CAP also permits flow control and retransmission via theFlow Control and Retransmission Modes. Through segmentation andreassembly, the different length of PDU transmission is achieved; themultiplexing capability can be used to distinguish the upper-layer applicationand protocol; L2CAP layer quality of service is achieved through flowcontrol and retransmission. Leon3 is one kind of open source code processor, it has the followingcharacteristics: sparcV8 Instruction Set, amba bus structure. The greatestfeature of SparcV8 is the use of register-window to preserve the context.Amba specification defines chip communications standards for ahigh-performance embedded microcontroller design. The general withembedded System Software Development, the application softwaredevelopment of LEON3 needs a cross-compiler environment, Leon3applications software development bases on BCC (GUN cross compilersystem) and Embedded Linux operating system. DTK-XLX-V2DEV is adevelopment board which based open architecture Leon3 processor andindependent research and development of DTK company, the author detailedanalyzes the hardware and software resources of DTK-XLX-V2DEV , Alsogives the HELLOWORLD and Linux embedded OS test on the board.After the analysis of the Bluetooth protocol stack and the LEONprocessor, the author analyses the implementation method of the networkprotocol under Linux kernel, and common mechanism of the Linux kernel,then implement Bluetooth protocol in Linux kernel. Embedded Linuxoperating system can be divided into five sub-systems, Linux networksubsystem is provided with the support of various network protocols andhardware. According to the used protocol, the subsystem processes datamessage. Make using of socket to implement interprocess communication.The efficiency and flexibility of Linux network implementation is present inuse of its socket buffer cache architecture; in Linux network subsystem, toavoid copying the kernel data multiply, the data message is manage by theskb structure. The tasklet in Linux kernel is an atomic model of soft interruptmechanism, which will be used to process data when the data arriving orsending data; and the dependent relationship on the Bluetooth protocol stackbetween the kernel modules is embodied in the agreement among thehierarchical relationship of different levels. With analysis of the mechanismand implementation method for achieving a network protocol under Linuxkernel, this paper illustrate the implemtation of HCI and L2CAP layer in theBluetooth protocol stack, and show the testing data of development board.The implementation of HCI layer is divided to two parts, one is HCI UARTTransport layer, its implementation is to set Serial Line SpecificationN_HCI=15, it also formats the data accepted from upper layer or hardware in accordance with the protocol; the other is implementation of HCI socket layer,which is used to interact with user-level, in order to configure user settingand control the information and data stream of HCI layer. The mainlyimplementation of L2CAP layer is flow control and the L2CAP socket layer.The Bluetooth protocol stack designed by author who based onembedded Linux operation system worked on LEON3 processor, whichpassed preparatory test. However, because of the hugeness and complexity ofHCI Protocol and L2CAP Protocol, further more, the products basedBluetooth protocol which want to entry the market must pass the PTS ( PTSis the SIG official Internet equipment Conformance Testing of Bluetoothproducts), so, the Bluetooth protocols need to further improve. Building agraphic user interface on Bluetooth protocols for user to expediently operatoris also our further purpose. In the use of smartphones, a mature Bluetoothprotocol stack system should be easy to expand and user-friendly features.
Keywords/Search Tags:Application
PDF Full Text Request
Related items