Font Size: a A A

Design And Implementation Of Bluetooth Low Energy 4.2 Protocol Stack Middle Layer

Posted on:2019-03-25Degree:MasterType:Thesis
Country:ChinaCandidate:J H LiFull Text:PDF
GTID:2428330590975451Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Bluetooth Low power technology is the key technology in the field of Internet of things in the future.The Bluetooth low power protocol stack is implemented as a supporting software for Bluetooth Low Power chips.The middle layer of Bluetooth Low Power 4.2 protocol stack is the key to the design of the whole protocol stack.The middle layer of the protocol stack includes logical link control and Adaptation Protocol(L2CAP),attribute protocol(ATT)and security management protocol(SMP).At present,the Bluetooth low power protocol stack in the domestic market has the problems of no open source and code redundancy,and the cost of the application of the Internet of things will be greatly affected by the code overhead of the middle layer of the protocol stack.It is of great practical significance to design and implement a low power Bluetooth protocol stack with open source and low code overhead.In this thesis,the functional requirements of the middle layer of the protocol stack are analyzed.On the basis of studying the optimization direction and related technologies of the protocol software code overhead,the middle layer of Bluetooth Low Power 4.2 protocol stack with low power consumption characteristics is designed and implemented in accordance with the Bluetooth low power 4.2 protocol specification.In order to reduce the code cost in the middle layer of the protocol stack,this paper optimizes the code cost in the middle layer of the protocol stack from two directions.In order to optimize the code overhead of the middle layer module of the protocol stack,in view of the fact that the attribute database generation method of the traditional protocol stack occupies a large amount of space on the chip,the optimization strategy of the pre generation code overhead of the attribute database is designed.In view of the fact that the middle layer function is not all used in the application development.The optimization strategy of module refinement management code overhead based on single piece design pattern is designed,By refining module function and using single piece mode,each module is instantiated only when applied;the state machine code overhead optimization strategy based on table query is designed to optimize the code cost of linear expansion of state machine.In order to optimize the code overhead of the runtime of the middle layer of the protocol stack,a packet cache code overhead optimization strategy based on the mutual exclusion lock is designed,in view of the problem that the traditional FIFO queue data packet cache occupies too much runtime code overhead.The hardware experimental platform of this paper adopts the STM32F103RBT6 chip produced by ST as the host chip,and the CC2564 produced by TI is used as the controller chip.In this study,the protocol analyzer is used to test the implementation of the middle layer function of the protocol stack,and the code size of the middle layer of the protocol stack is measured.Through the analysis,the results are as follows: the middle layer function of this protocol stack is basically tested,and the middle layer code of the protocol stack is reduced by 10.7% than the BTStack open source protocol stack.
Keywords/Search Tags:Bluetooth Low energy, L2CAP, ATT, SMP, Protocol optimization
PDF Full Text Request
Related items