Login
升级VIP 登录 注册 安全退出
当前位置: 首页 > word文档 > 合同模板 > Android蓝牙协议,android蓝牙协议栈

Android蓝牙协议,android蓝牙协议栈

收藏

本作品内容为Android蓝牙协议,格式为 docx ,大小 220780 KB ,页数为 7页

Android蓝牙协议


("Android蓝牙协议栈Android蓝牙协议栈使用的是BlueZ,支持GAP,SDP,andRFCOMM规范,是一个SIG认证的蓝牙协议栈。Bluez是GPL许可的,因此Android的框架内与用户空间的bluez代码通过D-BUS进程通讯进行交互,以避免专有代码。Headset和Handsfree(v1.5)规范就在Android框架中实现的,它是跟PhoneApp紧密耦合的。这些规范也是SIG认证的。下面的图表提供了一个以库为导向的蓝牙栈视图。实线框的是Android模块,红色虚线部分为合作伙伴指定模块(译者注:芯片商提供)。下面的图表是以进程为导向视图:移植BlueZ是兼容蓝牙2.1的,可以工作在任何2.1芯片以及向后兼容的旧的蓝牙版本。有要有两个方面:\uf0b7串口驱动UARTdriver\uf0b7蓝牙电源开/关BluetoothPowerOn/Off串口驱动BlueZ核心子系统使用hciattach守护进程添加你的指定硬件串口驱动。例如,MSM7201A,这个文件是在drivers/serial/msm_serial.c。你还需要通过修改init.rc为hciattach来编辑命令行选项。蓝牙电源开/关蓝牙芯片的电源开关方法1.0和Post1.0是不同的,具体如下:\uf0b71.0:Android框架写0或1到/sys/modules/board_[PLATFORM]/parameters/bluetooth_power_on\uf0b7Post1.0:Android框架使用linuxrfkillAPI,参考arch/arm/mach-msm/board-trout-rfkill.c例子。编译编译Android打开蓝牙支持,添加下面这行内容到BoardConfig.mk。BOARD_HAVE_BLUETOOTH:=true解决问题调试调试你的蓝牙实现,可以通过读跟蓝牙相关的logs(adblogcat)和查找ERROR和警告消息。Android使用Bluez,同时会带来一些有用的调式工具。下面的片段为了提供一个建议的例子:hciconfig-a#printBTchipsetaddressandfeatures.UsefultocheckifyoucancommunicatewithyourBTchipset.hcidump-XVt#printliveHCIUARTtraffic.hcitoolscan#scanforlocaldevices.UsefultocheckifRX/TXworks.l2pingADDRESS#pinganotherBTdevice.UsefultocheckifRX/TXworks.sdptoolrecordsADDRESS#requesttheSDPrecordsofanotherBTdevice.守护进程日志hcid(STDOUT)和hciattach(STDERR)的守护进程日志缺省是被写到/dev/null。编辑init.rc和init.PLATFORM.rc在logwrapper下运行这些守护进程,把它们输出到logcat。hciconfig-a和hcitool如果你编译你自己的system.img,除了hcitool扫描不行,hciconfig-a是可以工作的,尝试安装固件到蓝牙芯片。XXXTBD工具BlueZ为调试和与蓝牙子系统通信提供很多设置命令行工具,包含下面这些:hciconfighcitoolhcidumpsdptooldbus-senddbus-monitor特性支持这一部分提供在每个android版本中的蓝牙的一些变化,主要是一些性能参数上的东西,就不翻译了。Android1.0releasePlatformfeatures\uf0b7BasedonBluez3.36andLinuxKernel2.6.25\uf0b7Bluetooth2.0+EDRhoststack\uf0b7HeadsetProfile1.0inAudioGatewayrole\uf0b7HandsfreeProfile1.5inAudioGatewayroleoThree-waycallingoPhonebookoverATcommandsQualifications\uf0b7QDIDB014524:Hoststack(SDP,L2CAP,GAP,RFCOMM,SPP)\uf0b7QDIDB014624:EPLforHTCDream(HSP,HFP)Exampleproducts\uf0b7HTCDream/T-MobileG1Android1.1releaseNoBluetoothchangessince1.0Android1.5release(cupcake)Platformfeatures\uf0b7BasedonBluez3.36withLinuxKernel2.6.27\uf0b7Bluetooth2.0+EDRhoststackoSupportforauto-pairingwith'0000'devices\uf0b7HeadsetProfile1.1inAudioGatewayrole\uf0b7HandsfreeProfile1.5inAudioGatewayroleoThree-waycallingoPhonebookoverATcommandsoVolumesynchronizationoeSCOoExtensivebugfixesandcompatibilityimprovements\uf0b7StereoBluetooth(A2DP1.2)inSourceroleoAVDTP1.2inAcceptorandInitiatorrolesoGAVDTP1.0inAcceptorandInitiatorroleso44.1khz,stereo,softwareSBCcodec\uf0b7RemoteControl(AVRCP1.0)inTargetroleoAVCTP1.3inTargetroleoplay/pause/stop/prev/nextQualifications\uf0b7QDIDB015261:Hoststack(SDP,L2CAP,GAP,RFCOMM,SPP,AVCTP,AVRCP,GAVDP,AVDTP,A2DP)\uf0b7QDIDB015262:EPLforHTCSapphire(HSP,HFP)Android2.0/2.1release(eclair)Platformfeatures\uf0b7BasedonBluez4.47withLinuxKernel2.6.29\uf0b7Bluetooth2.1+EDRhoststackoSupportforauto-pairingwith'0000'devicesoSupportforSimpleSecurePairing\uf0b7HeadsetProfile1.1inAudioGatewayrole\uf0b7HandsfreeProfile1.5inAudioGatewayroleoThree-waycallingoPhonebookoverATcommandsoVolumesynchronizationoeSCOoExtensivebugfixesandcompatibilityimprovements\uf0b7StereoBluetooth(A2DP1.2)inSourceroleoAVDTP1.2inAcceptorandInitiatorrolesoGAVDTP1.0inAcceptorandInitiatorroleso44.1khz,stereo,softwareSBCcodec\uf0b7RemoteControl(AVRCP1.0)inTargetroleoAVCTP1.3inTargetroleoplay/pause/stop/prev/next\uf0b7ObjectPushProfileversion1.1oAddsabilitytotransferpictures,videosoTransferofcontactsusingvCardisnotsupportedinthisrelease.\uf0b7PhoneBookAddressProfileversion1.0oPhoneBookServerEquipment(PSE)rolesupported\uf0b7UsingJavaBluetoothAPIs,anAndroidapplicationcanpeformthefollowing:oScanforotherBluetoothdevicesoQuerythelocalBluetoothadapterforpairedBluetoothdevicesoEstablishRFCOMMchannelsoConnecttootherdevicesthroughservicediscoveryoTransferdatatoandfromotherdevicesoManagemultipleconnections\uf0b7SupportforBluetoothenabledcaranddeskdocksoFrameworksupportforroutingPhoneCallAudioandA2DPstreamingusingcaranddeskdocks.Android2.2release(Froyo)Platformfeatures\uf0b7BasedonBluez4.47withLinuxKernel2.6.32\uf0b7Nonewprofilesadded.\uf0b7AddedabilitytosharecontactsusingvCard\uf0b7Addedabilitytoexportallcontacts-usefultotransfercontactstocarkits\uf0b7Improvedcompatibilitywithheadsetsandcarkits.FuturereleasesThissectionoffersaroughguideofwhichfeaturestheteamisdevelopingforthenextrelease.Thisfeaturelistmaychangewithoutnotice.Itisn'tpossibletopostschedulingadvicetothemailinglists.\uf0b7Moreprofiles...\uf0b7Improvedcompatibilitywithheadsetsandcarkits\uf0b7Bluetoothemulatorsupport\uf0b7BluetoothLowEnergy译者注:这里请大家注意一下红色部分,难道将来模拟器可以使用BT?开发须知HID支持Tethering-DUNandPAN支持最后把官方链接附上:http://source.android.com/porting/bluetooth.html",)


  • 编号:1700673046
  • 分类:合同模板
  • 软件: wps,office word
  • 大小:7页
  • 格式:docx
  • 风格:商务
  • PPT页数:220780 KB
  • 标签:

广告位推荐

相关合同模板更多>