节点文献

基于单片机的蓝牙接口设计及数据传输的实现

The Design of Bluetooth Interface and Realization of Data Transmission Based on MCU

【作者】 赵霄

【导师】 周洪利;

【作者基本信息】 北京交通大学 , 计算机系统结构, 2008, 硕士

【摘要】 蓝牙技术作为一种无线数据与语音通信的开放性全球规范,可提供低功耗、短距离的无线空中接口,在各种固定与移动设备之间实现无线通信。在移动通信、无线数据采集、无线遥控与遥测、计算机网络及自动控制等多种领域,蓝牙技术都有着广泛的应用。蓝牙协议规范具有多个层次,完整的蓝牙协议栈的开发是一项很复杂的工程,而在大多数嵌入式应用中,只是需要实现基本的无线数据传输功能,并不需要实现全部的蓝牙协议栈。针对此类应用,若是能提供一套实用的蓝牙无线接口、实现一个通用的无线数据传输模块,就可以比较有效地缩短开发周期,降低开发成本。本文正是基于此目标,首先介绍了蓝牙技术的背景和现状,分析了蓝牙系统组成,比较了蓝牙与其他无线技术,并在此基础上,分析了蓝牙协议体系结构,并针对其在嵌入式系统中的实用性,着重剖析了蓝牙主机控制器接口HCI(HostController Interface)层协议。然后,参照HCI协议规范,设计了基于单片机控制蓝牙模块的硬件接口方案,并详细剖析了一个蓝牙HCI层通信实例的实验数据,随后给出了一套基于单片机实现蓝牙无线数据传输的软件接口方案。应用上述设计的蓝牙软硬件接口,本文开发了一个在单片机与PC之间实现无线数据传输的蓝牙数据传输系统。在单片机端利用Keil下的C编程开发了蓝牙数据传输模块,并作为一个子模块集成到了计算机高级接口实验平台上,在PC端通过USB控制蓝牙适配器,编写了一个基本的蓝牙控制程序,从而实现了实验台与PC之间的蓝牙无线数据传输。然后,在实现基本数据传输的基础上,进一步开发了通过蓝牙进行文件传输的功能模块,在单片机端实现了一个简单的嵌入式FAT16文件系统,通过蓝牙从PC接收文件并以FAT16格式存储到外接的MMC卡上。本文提供的蓝牙软硬件接口方案及数据传输模块,不仅可以用来进一步开发蓝牙高层协议,而且还可作为通用的接口函数和模块应用到多种无线场合。

【Abstract】 As a globally open wireless data and speech communication specification,Bluetoo-th technology can provide low-power、short-distance wireless air interface and implement wireless communication between various fixed and mobile equipments.Bluetooth technology has a wide range of applications in mobile communications、wireless data collections、wireless remote control and sensing、computer network and automatic control and other areas.Bluetooth protocol norms have multiple levels.The development of the complete Bluetooth protocol stack is a very complicated project.In most of the embedded applications,it is only need to realize the basic wireless data transimission,so it’s not necessory to implement all of the Bluetooth protocols.If we can provide a practical Bluetooth wireless interface and then a universal wireless data transmission module, the development cycle of the Bluetooth embedded applications can be effectively shortened and the development costs will also be reduced.Based on this objective,this paper firstly introduces the background and present situation of Bluetooth technology,analyzes the components of the Bluetooth system,compares Bluetooth technology with other wireless technologies.On this basis,this paper analyzes the Bluetooth protocol architecture,and then,against the practicality of its application in embedded system,emphasizes the Bluetooth Host Controller Interface Protocol. After that,based on the Bluetooth HCI protocol specification,this paper designs the hardware interface used by MCU to control the Bluetooth Module,and then through the analysis of the experimental datas of an example of Bluetooth HCI communication,supplys the software interface of Bluetooth wireless data transmisson based on MCU.Using the Bluetooth hardware and software interface designed above,the paper develops a Bluetooth data transmission system which can be used to wirelessly transmit data between MCU and PC.On the MCU, the Bluetooth data reveiving and sending module is impletmented through embedded C programming in Keil IDE,and then the module is embeded into the Advanced Computer Interface Experiment Platform as a sub-module.On PC,a Bluetooth USB Dongle is connected to PC through the USB interface,and a basic Bluetooth control program is implemented through C++ programming in Visual C++ 6.0 IDE.And then,data can be transmitted between the two parts. After that,a further development which is file transmission is implemented.Firstly, an embeded FAT16 file system is realized in MCU so that the file received from PC can be storaged correctly into MMC card which is connected to the MCU in SPI mode. And then,the file transmission is realized beteen MCU and PC .The Bluetooth hardware and software interface and data transmission module this paper provids not only can be used to further developments of Bluetooth high-level protocols, but can be applied into a variety of wirless occasions used as a series of common interface and module.

【关键词】 蓝牙单片机HCI接口数据传输文件传输
【Key words】 BluetoothMCUHCIInterfaceData TransmissionFile Transmission
  • 【分类号】TP368.12
  • 【被引频次】14
  • 【下载频次】4507
节点文献中: 

本文链接的文献网络图示:

本文的引文网络