低功率蓝牙大功率低音炮音响开发课程哪里可以学?

《低功耗蓝牙开发与实战》(谭晖)【摘要 书评 试读】- 京东图书
低功耗蓝牙开发与实战
京 东 价 &
[定价 &¥]
PLUS会员专享价
您购买此商品可享受专属价
增值业务 &
重  量 &
选择系列 &
搭配赠品 &
加载中,请稍候...
加载中,请稍候...
加载中,请稍候...
加载中,请稍候...
加载中,请稍候...
商品介绍加载中...
扫一扫,精彩好书免费看
权利声明:京东上的所有商品信息、客户评价、商品咨询、网友讨论等内容,是京东重要的经营资源,未经许可,禁止非法转载使用。
注:本站商品信息均来自于合作方,其真实性、准确性和合法性由信息拥有者(合作方)负责。本站不提供任何保证,并不承担任何法律责任。
印刷版次不同,印刷时间和版次以实物为准。
价格说明:
京东价:京东价为商品的销售价,是您最终决定是否购买商品的依据。
划线价:商品展示的划横线价格为参考价,该价格可能是品牌专柜标价、商品吊牌价或由品牌供应商提供的正品零售价(如厂商指导价、建议零售价等)或该商品在京东平台上曾经展示过的销售价;由于地区、时间的差异性和市场行情波动,品牌专柜标价、商品吊牌价等可能会与您购物时展示的不一致,该价格仅供您参考。
折扣:如无特殊说明,折扣指销售商在原价、或划线价(如品牌专柜标价、商品吊牌价、厂商指导价、厂商建议零售价)等某一价格基础上计算出的优惠比例或优惠金额;如有疑问,您可在购买前联系销售商进行咨询。
异常问题:商品促销信息以商品详情页“促销”栏中的信息为准;商品的具体售价以订单结算页价格为准;如您发现活动商品售价或促销信息有异常,建议购买前先联系销售商咨询。
iframe(src='//www.googletagmanager.com/ns.html?id=GTM-T947SH', height='0', width='0', style='display: visibility:')&nbsp>&nbsp
&nbsp>&nbsp
&nbsp>&nbsp
低功耗蓝牙(BLE)之开发步骤
摘要:AndroidBluetooth源码静态类图如下:使用低功耗蓝牙需要用到的权限:?12&uses-permission&android:name=&android.permission.BLUETOOTH&/&&uses-permission&android:name=&android.permission.BLUETOOTH_ADMIN&/&下面介绍怎样使用BLE:1、准备BLE&
Android Bluetooth源码静态类图如下:
使用低功耗蓝牙需要用到的权限:
&uses-permission&android:name=&android.permission.BLUETOOTH&/&&uses-permission&android:name=&android.permission.BLUETOOTH_ADMIN&/&
下面介绍怎样使用BLE:1、准备BLE& & 1)获取BluetoothAdapter& & &BluetoothAdapter是从系统服务获取到的,全系统就一个。?
//&Initializes&Bluetooth&adapter.final&BluetoothManager&bluetoothManager&=&&&&&&&&(BluetoothManager)&getSystemService(Context.BLUETOOTH_SERVICE);mBluetoothAdapter&=&bluetoothManager.getAdapter();
& & 2)检测蓝牙是否打开& & 如果蓝牙未打开,系统会自动打开,会弹出系统框展示打开蓝牙。?
private&BluetoothAdapter&mBluetoothA...//&Ensures&Bluetooth&is&available&on&the&device&and&it&is&enabled.&If&not,//&displays&a&dialog&requesting&user&permission&to&enable&Bluetooth.if&(mBluetoothAdapter&==&null&||&!mBluetoothAdapter.isEnabled())&{&&&&Intent&enableBtIntent&=&new&Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);&&&&startActivityForResult(enableBtIntent,&REQUEST_ENABLE_BT);}
2、查找BLE设备& &因为扫描BLE设备是电源密集型操作,浪费电量,因此要保证以下原则:& & 1)扫描到需要的设备后,马上停止扫描;& & 2)给扫描一个时间限制& &扫描示例代码如下:?
/**&*&Activity&for&scanning&and&displaying&available&BLE&devices.&*/public&class&DeviceScanActivity&extends&ListActivity&{&&&&&private&BluetoothAdapter&mBluetoothA&&&&private&boolean&mS&&&&private&Handler&mH&&&&&//&Stops&scanning&after&10&seconds.&&&&private&static&final&long&SCAN_PERIOD&=&10000;&&&&...&&&&private&void&scanLeDevice(final&boolean&enable)&{&&&&&&&&if&(enable)&{&&&&&&&&&&&&//&Stops&scanning&after&a&pre-defined&scan&period.&&&&&&&&&&&&mHandler.postDelayed(new&Runnable()&{&&&&&&&&&&&&&&&&@Override&&&&&&&&&&&&&&&&public&void&run()&{&&&&&&&&&&&&&&&&&&&&mScanning&=&&&&&&&&&&&&&&&&&&&&&mBluetoothAdapter.stopLeScan(mLeScanCallback);&&&&&&&&&&&&&&&&}&&&&&&&&&&&&},&SCAN_PERIOD);&&&&&&&&&&&&&mScanning&=&&&&&&&&&&&&&mBluetoothAdapter.startLeScan(mLeScanCallback);&&&&&&&&}&else&{&&&&&&&&&&&&mScanning&=&&&&&&&&&&&&&mBluetoothAdapter.stopLeScan(mLeScanCallback);&&&&&&&&}&&&&&&&&...&&&&}...}
& & &如果只是要扫描到特定类型的设备,则使用接口&startLeScan(UUID[], BluetoothAdapter.LeScanCallback),通过UUID来查找设备。& & 扫描回调的代码如下所示:?
private&LeDeviceListAdapter&mLeDeviceListA...//&Device&scan&callback.private&BluetoothAdapter.LeScanCallback&mLeScanCallback&=&&&&&&&&new&BluetoothAdapter.LeScanCallback()&{&&&&@Override&&&&public&void&onLeScan(final&BluetoothDevice&device,&int&rssi,&&&&&&&&&&&&byte[]&scanRecord)&{&&&&&&&&runOnUiThread(new&Runnable()&{&&&&&&&&&&&@Override&&&&&&&&&&&public&void&run()&{&&&&&&&&&&&&&&&mLeDeviceListAdapter.addDevice(device);&&&&&&&&&&&&&&&mLeDeviceListAdapter.notifyDataSetChanged();&&&&&&&&&&&}&&&&&&&});&&&}};
注意:我们既可以扫描BLE设备,也可以扫描普通蓝牙设备,也可以同时将BLE设备和普通蓝牙设备一起扫描到。3、连接到GATT Server& &获取到BluetoothGatt实例,?
mBluetoothGatt&=&device.connectGatt(this,&false,&mGattCallback);
&&&&具体实例如下:?
//&A&service&that&interacts&with&the&BLE&device&via&the&Android&BLE&API.public&class&BluetoothLeService&extends&Service&{&&&&private&final&static&String&TAG&=&BluetoothLeService.class.getSimpleName();&&&&&private&BluetoothManager&mBluetoothM&&&&private&BluetoothAdapter&mBluetoothA&&&&private&String&mBluetoothDeviceA&&&&private&BluetoothGatt&mBluetoothG&&&&private&int&mConnectionState&=&STATE_DISCONNECTED;&&&&&private&static&final&int&STATE_DISCONNECTED&=&0;&&&&private&static&final&int&STATE_CONNECTING&=&1;&&&&private&static&final&int&STATE_CONNECTED&=&2;&&&&&public&final&static&String&ACTION_GATT_CONNECTED&=&&&&&&&&&&&&&com.example.bluetooth.le.ACTION_GATT_CONNECTED&;&&&&public&final&static&String&ACTION_GATT_DISCONNECTED&=&&&&&&&&&&&&&com.example.bluetooth.le.ACTION_GATT_DISCONNECTED&;&&&&public&final&static&String&ACTION_GATT_SERVICES_DISCOVERED&=&&&&&&&&&&&&&com.example.bluetooth.le.ACTION_GATT_SERVICES_DISCOVERED&;&&&&public&final&static&String&ACTION_DATA_AVAILABLE&=&&&&&&&&&&&&&com.example.bluetooth.le.ACTION_DATA_AVAILABLE&;&&&&public&final&static&String&EXTRA_DATA&=&&&&&&&&&&&&&com.example.bluetooth.le.EXTRA_DATA&;&&&&&public&final&static&UUID&UUID_HEART_RATE_MEASUREMENT&=&&&&&&&&&&&&UUID.fromString(SampleGattAttributes.HEART_RATE_MEASUREMENT);&&&&&//&Various&callback&methods&defined&by&the&BLE&API.&&&&private&final&BluetoothGattCallback&mGattCallback&=&&&&&&&&&&&&new&BluetoothGattCallback()&{&&&&&&&&@Override&&&&&&&&public&void&onConnectionStateChange(BluetoothGatt&gatt,&int&status,&&&&&&&&&&&&&&&&int&newState)&{&&&&&&&&&&&&String&intentA&&&&&&&&&&&&if&(newState&==&BluetoothProfile.STATE_CONNECTED)&{&&&&&&&&&&&&&&&&intentAction&=&ACTION_GATT_CONNECTED;&&&&&&&&&&&&&&&&mConnectionState&=&STATE_CONNECTED;&&&&&&&&&&&&&&&&broadcastUpdate(intentAction);&&&&&&&&&&&&&&&&Log.i(TAG,&&Connected&to&GATT&server.&);&&&&&&&&&&&&&&&&Log.i(TAG,&&Attempting&to&start&service&discovery:&&+&&&&&&&&&&&&&&&&&&&&&&&&mBluetoothGatt.discoverServices());&&&&&&&&&&&&&}&else&if&(newState&==&BluetoothProfile.STATE_DISCONNECTED)&{&&&&&&&&&&&&&&&&intentAction&=&ACTION_GATT_DISCONNECTED;&&&&&&&&&&&&&&&&mConnectionState&=&STATE_DISCONNECTED;&&&&&&&&&&&&&&&&Log.i(TAG,&&Disconnected&from&GATT&server.&);&&&&&&&&&&&&&&&&broadcastUpdate(intentAction);&&&&&&&&&&&&}&&&&&&&&}&&&&&&&&&@Override&&&&&&&&//&New&services&discovered&&&&&&&&public&void&onServicesDiscovered(BluetoothGatt&gatt,&int&status)&{&&&&&&&&&&&&if&(status&==&BluetoothGatt.GATT_SUCCESS)&{&&&&&&&&&&&&&&&&broadcastUpdate(ACTION_GATT_SERVICES_DISCOVERED);&&&&&&&&&&&&}&else&{&&&&&&&&&&&&&&&&Log.w(TAG,&&onServicesDiscovered&received:&&&+&status);&&&&&&&&&&&&}&&&&&&&&}&&&&&&&&&@Override&&&&&&&&//&Result&of&a&characteristic&read&operation&&&&&&&&public&void&onCharacteristicRead(BluetoothGatt&gatt,&&&&&&&&&&&&&&&&BluetoothGattCharacteristic&characteristic,&&&&&&&&&&&&&&&&int&status)&{&&&&&&&&&&&&if&(status&==&BluetoothGatt.GATT_SUCCESS)&{&&&&&&&&&&&&&&&&broadcastUpdate(ACTION_DATA_AVAILABLE,&characteristic);&&&&&&&&&&&&}&&&&&&&&}&&&&&...&&&&};...}
& & 其中,discoverService方式是异步的,它的回调方法是上面代码中的onServiceDiscovered。?
private&void&broadcastUpdate(final&String&action)&{&&&&final&Intent&intent&=&new&Intent(action);&&&&sendBroadcast(intent);}&private&void&broadcastUpdate(final&String&action,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&final&BluetoothGattCharacteristic&characteristic)&{&&&&final&Intent&intent&=&new&Intent(action);&&&&&//&This&is&special&handling&for&the&Heart&Rate&Measurement&profile.&Data&&&&//&parsing&is&carried&out&as&per&profile&specifications.&&&&if&(UUID_HEART_RATE_MEASUREMENT.equals(characteristic.getUuid()))&{&&&&&&&&int&flag&=&characteristic.getProperties();&&&&&&&&int&format&=&-1;&&&&&&&&if&((flag&&;&0x01)&!=&0)&{&&&&&&&&&&&&format&=&BluetoothGattCharacteristic.FORMAT_UINT16;&&&&&&&&&&&&Log.d(TAG,&&Heart&rate&format&UINT16.&);&&&&&&&&}&else&{&&&&&&&&&&&&format&=&BluetoothGattCharacteristic.FORMAT_UINT8;&&&&&&&&&&&&Log.d(TAG,&&Heart&rate&format&UINT8.&);&&&&&&&&}&&&&&&&&final&int&heartRate&=&characteristic.getIntValue(format,&1);&&&&&&&&Log.d(TAG,&String.format(&Received&heart&rate:&%d&,&heartRate));&&&&&&&&intent.putExtra(EXTRA_DATA,&String.valueOf(heartRate));&&&&}&else&{&&&&&&&&//&For&all&other&profiles,&writes&the&data&formatted&in&HEX.&&&&&&&&final&byte[]&data&=&characteristic.getValue();&&&&&&&&if&(data&!=&null&&;&;&data.length&&&0)&{&&&&&&&&&&&&final&StringBuilder&stringBuilder&=&new&StringBuilder(data.length);&&&&&&&&&&&&for(byte&byteChar&:&data)&&&&&&&&&&&&&&&&stringBuilder.append(String.format(&%02X&&,&byteChar));&&&&&&&&&&&&intent.putExtra(EXTRA_DATA,&new&String(data)&+&&/n&&+&&&&&&&&&&&&&&&&&&&&stringBuilder.toString());&&&&&&&&}&&&&}&&&&sendBroadcast(intent);}
//&Handles&various&events&fired&by&the&Service.//&ACTION_GATT_CONNECTED:&connected&to&a&GATT&server.//&ACTION_GATT_DISCONNECTED:&disconnected&from&a&GATT&server.//&ACTION_GATT_SERVICES_DISCOVERED:&discovered&GATT&services.//&ACTION_DATA_AVAILABLE:&received&data&from&the&device.&This&can&be&a//&result&of&read&or&notification&operations.private&final&BroadcastReceiver&mGattUpdateReceiver&=&new&BroadcastReceiver()&{&&&&@Override&&&&public&void&onReceive(Context&context,&Intent&intent)&{&&&&&&&&final&String&action&=&intent.getAction();&&&&&&&&if&(BluetoothLeService.ACTION_GATT_CONNECTED.equals(action))&{&&&&&&&&&&&&mConnected&=&&&&&&&&&&&&&updateConnectionState(R.string.connected);&&&&&&&&&&&&invalidateOptionsMenu();&&&&&&&&}&else&if&(BluetoothLeService.ACTION_GATT_DISCONNECTED.equals(action))&{&&&&&&&&&&&&mConnected&=&&&&&&&&&&&&&updateConnectionState(R.string.disconnected);&&&&&&&&&&&&invalidateOptionsMenu();&&&&&&&&&&&&clearUI();&&&&&&&&}&else&if&(BluetoothLeService.&&&&&&&&&&&&&&&&ACTION_GATT_SERVICES_DISCOVERED.equals(action))&{&&&&&&&&&&&&//&Show&all&the&supported&services&and&characteristics&on&the&&&&&&&&&&&&//&user&interface.&&&&&&&&&&&&displayGattServices(mBluetoothLeService.getSupportedGattServices());&&&&&&&&}&else&if&(BluetoothLeService.ACTION_DATA_AVAILABLE.equals(action))&{&&&&&&&&&&&&displayData(intent.getStringExtra(BluetoothLeService.EXTRA_DATA));&&&&&&&&}&&&&}};
4、读BLE属性& & 一旦获取到GATT的Services,就可以读写他们的属性了,实例如下:?
public&class&DeviceControlActivity&extends&Activity&{&&&&...&&&&//&Demonstrates&how&to&iterate&through&the&supported&GATT&&&&//&Services/Characteristics.&&&&//&In&this&sample,&we&populate&the&data&structure&that&is&bound&to&the&&&&//&ExpandableListView&on&the&UI.&&&&private&void&displayGattServices(List&BluetoothGattService&&gattServices)&{&&&&&&&&if&(gattServices&==&null)&&&&&&&&&String&uuid&=&&&&&&&&&String&unknownServiceString&=&getResources().&&&&&&&&&&&&&&&&getString(R.string.unknown_service);&&&&&&&&String&unknownCharaString&=&getResources().&&&&&&&&&&&&&&&&getString(R.string.unknown_characteristic);&&&&&&&&ArrayList&HashMap&String,&String&&&gattServiceData&=&&&&&&&&&&&&&&&&new&ArrayList&HashMap&String,&String&&();&&&&&&&&ArrayList&ArrayList&HashMap&String,&String&&&&gattCharacteristicData&&&&&&&&&&&&&&&&=&new&ArrayList&ArrayList&HashMap&String,&String&&&();&&&&&&&&mGattCharacteristics&=&&&&&&&&&&&&&&&&new&ArrayList&ArrayList&BluetoothGattCharacteristic&&();&&&&&&&&&//&Loops&through&available&GATT&Services.&&&&&&&&for&(BluetoothGattService&gattService&:&gattServices)&{&&&&&&&&&&&&HashMap&String,&String&&currentServiceData&=&&&&&&&&&&&&&&&&&&&&new&HashMap&String,&String&();&&&&&&&&&&&&uuid&=&gattService.getUuid().toString();&&&&&&&&&&&&currentServiceData.put(&&&&&&&&&&&&&&&&&&&&LIST_NAME,&SampleGattAttributes.&&&&&&&&&&&&&&&&&&&&&&&&&&&&lookup(uuid,&unknownServiceString));&&&&&&&&&&&&currentServiceData.put(LIST_UUID,&uuid);&&&&&&&&&&&&gattServiceData.add(currentServiceData);&&&&&&&&&&&&&ArrayList&HashMap&String,&String&&&gattCharacteristicGroupData&=&&&&&&&&&&&&&&&&&&&&new&ArrayList&HashMap&String,&String&&();&&&&&&&&&&&&List&BluetoothGattCharacteristic&&gattCharacteristics&=&&&&&&&&&&&&&&&&&&&&gattService.getCharacteristics();&&&&&&&&&&&&ArrayList&BluetoothGattCharacteristic&&charas&=&&&&&&&&&&&&&&&&&&&&new&ArrayList&BluetoothGattCharacteristic&();&&&&&&&&&&&//&Loops&through&available&Characteristics.&&&&&&&&&&&&for&(BluetoothGattCharacteristic&gattCharacteristic&:&&&&&&&&&&&&&&&&&&&&gattCharacteristics)&{&&&&&&&&&&&&&&&&charas.add(gattCharacteristic);&&&&&&&&&&&&&&&&HashMap&String,&String&&currentCharaData&=&&&&&&&&&&&&&&&&&&&&&&&&new&HashMap&String,&String&();&&&&&&&&&&&&&&&&uuid&=&gattCharacteristic.getUuid().toString();&&&&&&&&&&&&&&&&currentCharaData.put(&&&&&&&&&&&&&&&&&&&&&&&&LIST_NAME,&SampleGattAttributes.lookup(uuid,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&unknownCharaString));&&&&&&&&&&&&&&&&currentCharaData.put(LIST_UUID,&uuid);&&&&&&&&&&&&&&&&gattCharacteristicGroupData.add(currentCharaData);&&&&&&&&&&&&}&&&&&&&&&&&&mGattCharacteristics.add(charas);&&&&&&&&&&&&gattCharacteristicData.add(gattCharacteristicGroupData);&&&&&&&&&}&&&&...&&&&}...}
& 在获取Service的时候,每个蓝牙设备都会有两个默认的Service,它们和对应的UUID分别如下:Bluetooth Generic Access Profile & &{0-805f9b34fb}Bluetooth Generic Attribute Profile {0-805F9B34FB}5、收到GATT通知& &如果设备主动给手机发信息,则可以通过notification的方式,这种方式不用手机去轮询地读设备上的数据。手机可以用如下方式给设备设置notification功能。?
private&BluetoothGatt&mBluetoothGBluetoothGattCharacteristic&boolean&...mBluetoothGatt.setCharacteristicNotification(characteristic,&enabled);...BluetoothGattDescriptor&descriptor&=&characteristic.getDescriptor(&&&&&&&&UUID.fromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG));descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);mBluetoothGatt.writeDescriptor(descriptor);
& & 如果notificaiton方式对于某个Characteristic是enable的,那么当设备上的这个Characteristic改变时,手机上的onCharacteristicChanged()&回调就会被促发。如下所示:?
@Override//&Characteristic&notificationpublic&void&onCharacteristicChanged(BluetoothGatt&gatt,&&&&&&&&BluetoothGattCharacteristic&characteristic)&{&&&&broadcastUpdate(ACTION_DATA_AVAILABLE,&characteristic);}
6、关闭客户端蓝牙?
public&void&close()&{&&&&if&(mBluetoothGatt&==&null)&{&&&&&&&&&&&&}&&&&mBluetoothGatt.close();&&&&mBluetoothGatt&=&}
以上是的内容,更多
的内容,请您使用右上方搜索功能获取相关信息。
若你要投稿、删除文章请联系邮箱:zixun-group@service.aliyun.com,工作人员会在五个工作日内给你回复。
云服务器 ECS
可弹性伸缩、安全稳定、简单易用
&40.8元/月起
预测未发生的攻击
&24元/月起
为您提供0门槛上云实践机会
你可能还喜欢
你可能感兴趣
阿里云教程中心为您免费提供
低功耗蓝牙(BLE)之开发步骤相关信息,包括
的信息,所有低功耗蓝牙(BLE)之开发步骤相关内容均不代表阿里云的意见!投稿删除文章请联系邮箱:zixun-group@service.aliyun.com,工作人员会在五个工作日内答复
售前咨询热线
支持与服务
资源和社区
关注阿里云
International6036人阅读
概念:蓝牙4.0和BLE
通常在我遇到的不懂蓝牙或者了解一点蓝牙的朋友看来,往往将BLE等同于蓝牙4.0,其实不然。
蓝牙4.0是协议,4.0是协议版本号,蓝牙4.0是2010年6月由SIG(Special Interest Group)发布的蓝牙标准,它有2种模式:
BLE(Bluetooth low energy)只能与4.0协议设备通信,适应节能且仅收发少量数据的设备(如家用电子);
BR/EDR(Basic Rate / Enhanced Data Rate),向下兼容(能与3.0/2.1/2.0通信),适应收发数据较多的设备(如耳机)。这个模式常常也有人称之为“传统蓝牙”或“经典蓝牙”。
可以这样理解,蓝牙4.0协议包含BLE,BLE隶属于蓝牙4.0协议的一部分
关于低功耗蓝牙
对于我来说,着重学习低功耗蓝牙,即Bluetooth LE。
Bluetooth Low Energy (也被称为Bluetooth 4.0、BLE、BTLE),下面记作BLE,是使用2.4GHz的无线短距离无线通信标准。 迄今为止,虽然高速蓝牙已经实现,但BLE在通讯速度上比较普通,主要强调一个纽扣电池能够工作几年的这种省电性能。
设备端和主机端使用GATT(Generic ATTribute) profile进行通信。 如果你听到GATT这个名词,就可以将其想成使用BLE,这没什么问题。
由于与传统蓝牙不兼容,在主机端,和蓝牙3.0合并做为双模,实现成两者都可以使用的情况比较多。在PC机和智能手机上,使用双模的被称作「Bluetooth
Smart Ready」,只支持低功耗蓝牙的被表示成「Bluetooth Smart」。
顺便说一句,最早诺基亚在2006年制定了名为Wibree的技术标准,但它已在2010年被标准化为蓝牙4.0。
GATT profile
GATT已经成为BLE通信的规定,每一个设备中存在很多的“service”(服务),service中还包含有多个“Characteristic”(特征值)。
在蓝牙实际数据交换中,就是通过读写这些“Characteristic”来实现的。
可以这样来理解这两个概念:service即面向对象中的“类”的概念,characteristic即面向对象中“属性”的概念。
每个characteristic的值可以在不加密的状态下读写,但配对的操作是加密的。 还有当characteristic的值已改变时,可接收通知(notify)。
除了那些蓝牙技术联盟定义为标准的服务和characteristic之外,设备的开发者也可以自己定义。
一些必要的服务组合成所谓的“profile”。(特别是在需要和传统蓝牙区别开的情况下的情况下,称为基于GATT的profile)蓝牙技术联盟也定义了标准的profile,例如,对应于鼠标键盘“HID over GATT“ profile,是定义成包括「Human Interface Device」「Device Information」「Battery Service」「Scan Parameters(可选)」这些服务的。
服务和characteristic是通过UUID来进行识别的。UUID是32位的,但那些被蓝牙技术联盟的标准中定义的UUID是以四个数字来表示的。实际上,四位数的UUID,是有附加 Bluetooth Base UUID,即变成0000●●●●-00-fb(4位UUID被输入在●的位置)。
更多蓝牙基础请访问SIG官网:温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
阅读(394)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
loftPermalink:'',
id:'fks_',
blogTitle:'子墨BLE低功耗蓝牙开发&培训团队简介',
blogAbstract:'本团队由东南大学几位微电子专业研究生组成,成立于2014年3月份,专注于低功耗蓝牙的研究与开发,团队成员有丰富的低功耗蓝牙开发经验,曾在研究生阶段参与了香港应用科技研究院项目—低功耗蓝牙4.0协议栈的开发。并且掌握DA14580、',
blogTag:'ble,低功耗蓝牙,cc2540,cc2640,da14582',
blogUrl:'blog/static/9',
isPublished:1,
istop:false,
modifyTime:9,
publishTime:7,
permalink:'blog/static/9',
commentCount:0,
mainCommentCount:0,
recommendCount:2,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}大家好,有人想学王者荣耀的开发课程吗_百度知道
大家好,有人想学王者荣耀的开发课程吗
我有更好的答案
那你就别卖了,你卖王者荣耀就等于买QQ一起卖,还要卖了你这个QQ以前玩过的游戏
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。}

我要回帖

更多关于 蓝牙功率等级划分 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信