您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 管理学资料 > 嵌入式Linux下USB蓝牙设备驱动
,。PC,。,,。,。,USB、。USBLinux,,Linux。USBHCI,,MP2530。1Linux-2.6.20,X86PC,MP2530。MP2530MMSP2+,ARM926EJARM946E,2D3D。,MP2530,6UART,USB、USB2.0、SD、。MP25301.11.0,、USB。22.1,3[1],1。RF(RodioFraquency)、BBLinuxUSB,,(ATR,361005):,。,。、LinuxBlueZ,USB,,MP2530LinuxUSB,。:;USB;MP2530;Linux:TP302:A:1674-6236(2010)02-0053-03USBbluetoothdevicedriverbasedonembeddedLinuxsystemZHENGChun-fang,ZHENGLing-xiang,SHIJiang-hong(ATRLab,SchoolofInformationScienceandTechnology,XiamenUniversity,Xiamen361005,China)Abstract:Withthedevelopmentofwirelesstechnology,theapplicationofbluetoothtechnologyspreadsgraduallyintoem-beddedsystems.However,duetocompatibilityissueswiththeirinterface,theirapplicationsintheembeddedsystemgreat-lydiscount.OnthebasisofanalysingthearchitectureofLinuxbluetoothprotocolandtheorganizationalstructureofBlueZ,thispaperillustratesthedetailsoftransportlayerforbluetoothUSBdevice,andgivesthekeydatastructureandfunctionfordriverimplementation.Finally,wedevelopandimplementthedevicedriveronMP2530,whichmakesitpossi-blethatbluetoothdeviceiswidelyusedinthefieldofembedded.Keywords:bluetoothdriver;USBdeivice;MP2530;embeddedLinux:2009-05-21:200905056:(2007HZ0003):(1984—),,,。:,。120102Feb.2010182Vol.18No.2ElectronicDesignEngineering5353--(BaseBand)LMP(LinkManagerProtocol);L2CAP(LogicalLinkControlandAdaptationLayerprotocol)、SDP(ServiceDiscoveryProtocol)、RFCOMMTCS-BIN;、、、,。BBLMPL2CAPHCI(HostControllerInterface),、,。。2.2BlueZ[2]LinuxBlueZ,。BlueZ,2。2。、HCI(HostControlInterface)、Bluetooth、L2CAP(LogicalLinkControlandAdaptationProtocol)、SCO、Bluetooth。BlueZ。3USBHCI[3-4]USB,USB,。HCI(L2CAP,SDPRFCOMM)(LMP),LMBB。USBUSB,,USB,HCIHCI。HCIHCI,。USB3。1)HCIUSB,2。0,BULK;1。14,。,。,2,BULK。2)USB—0。0HCI。USB,HCI。3)BULKBULKACL,,BULK。BULK。LinuxACL,1。,。,BULK64,BULK1ms164。4)。USB。,1ms。USB。5)SCO,。。,。USBSCO(FIFO)。FIFO,。364kb/s,8bit16bit。,64。316bit,32。4LinuxUSB4.1[5-6]4.1.1hci_devLinux,HCIhci_dev。,,HCIhci_dev。hci_dev:1)(name)、(bdaddr)、(flags)、(type);2)(pkt_type)、(link_policy)、(link_mode);3)3:CMD、、;4)7,open,close,flush,send,destruct,notifyioctl。2BlueZ3USB《》201025454--,LinuxUSB、、。4.1.2hci_usbhci_usbhci_devusb_device2。usb_deviceusb,2HCI。hci_usbHCIUSB,、USB、。4.1.3bt_usb_databt_usb_dataUSB,、I/O、、、、。4.2Linux,,。USB,usb_dirvierhci_usb_driver,(hci_usb)、(hci_usb_probe)、(hci_usb_disconnect)、(hci_usb_suspend)、(hci_usb_resume)、(bluetooth_ids)。module_init、hci_usb_init、usb_register,usb_registerusb_register_driver。4.3,,。,module_exit、hci_usb_exit、usb_deregister,usb_deregisterusb_deregister_driver。4.4hci_usb_probeUSB,HCI,(1~127),class,subclassprotocol。hci_usbUSB,。hci_usb_driverhci_usb_probe,hci_usb,HCI。hci_usb_probe4。4.5,hci_usb_driverhci_usb_disconnect。,,,HCI。4.6(,),hci_usb_suspend。hci_dev,HCI,。,hci_usb_resume。,hci_dev,HCI。,I/Oerror。5USB,,USBUSB。USB,hciconfig,USB,5。6MP2530LinuxUSB。,USB,K。USB,,。:[1],,.[M].:,2001.[2],.LinuxUSB[J].,2008(5):274-275.[3],,.、[M].:,2006.[4],.HCIUSB[J].,2002(2):235-236.[5],,.LinuxUSB[J].,2004,21(6):70-72.[6],,.LinuxUSB[J].,2002,22(8):17-19.4hci_usb_probe5USB5555--
本文标题:嵌入式Linux下USB蓝牙设备驱动
链接地址:https://www.777doc.com/doc-5333638 .html