4000 蓝牙BLE开发基础教程 android5.0 蓝牙4.0 透传 Android Studio(三)
2017-04-06 17:13
417 查看
六、收发数据
发送示例
接收示例
下面附上制作完成的Android项目文件
点击这里下载 http://download.csdn.net/detail/deweikaiwen/9808901
发送示例
byte[] senddatas =new byte[]{1,2,3,4,34,56,78,90}; bluetoothGattCharacteristic.setValue(senddatas); bluetoothGatt.writeCharacteristic(bluetoothGattCharacteristic);
接收示例
//在onCharacteristicChanged()中加入以下处理代码 { byte[] bytesreceive = characteristic.getValue(); Log.e(TAG,bytesreceive[0]+""+bytesreceive[1]+""+bytesreceive[2]+""+bytesreceive[4]) }
下面附上制作完成的Android项目文件
点击这里下载 http://download.csdn.net/detail/deweikaiwen/9808901
相关文章推荐
- 蓝牙BLE开发基础教程 android5.0 蓝牙4.0 透传 Android Studio(二)
- 蓝牙BLE开发基础教程 android5.0 蓝牙4.0 透传 Android Studio(一)
- Android 蓝牙4.0BLE开发实现对蓝牙的写入数据和读取数据
- (一)蓝牙低功耗(BLE)基础教程--基于nRF5x系列SOC
- Android Bluetooth蓝牙开发\蓝牙协议\蓝牙通信例子_Android支持蓝牙4.0版本_BLE开发
- Android Bluetooth蓝牙开发\蓝牙协议\蓝牙通信例子_Android支持蓝牙4.0版本_BLE开发
- Android 蓝牙4.0(BLE)开发实现对蓝牙的写入数据和读取数据
- Android基础入门教程——1.2.2 使用Android Studio开发Android APP
- Android基础入门教程——1.2.2 使用Android Studio开发Android APP
- 蓝牙ble-DA14580初级入门教程2_DA14580硬件基础教程
- 低功耗蓝牙4.0BLE编程-nrf51822开发(11)-蓝牙串口代码分析
- Android Bluetooth蓝牙开发\蓝牙协议\蓝牙通信例子_Android支持蓝牙4.0版本_BLE开发
- Android Bluetooth蓝牙开发\蓝牙协议\蓝牙通信例子_Android支持蓝牙4.0版本_BLE开发
- 开源蓝牙ble-1_DA14580初级入门教程3_DA1458x软件基础教程
- 4000 IOS 蓝牙(BLE)4.0 的认知与开发
- Android Bluetooth蓝牙开发\蓝牙协议\蓝牙通信例子_Android支持蓝牙4.0版本_BLE开发
- Android Bluetooth蓝牙开发\蓝牙协议\蓝牙通信例子_Android支持蓝牙4.0版本_BLE开发
- Android低功耗蓝牙(蓝牙4.0)——BLE开发(上)
- Android Studio 2.2.3 NDK开发基础教程
- Android 蓝牙4.0BLE开发实现对蓝牙的写入数据和读取数据