我有一个Android应用程序,将数据写入simblee蓝牙.
在我的代码下面:
public void sendData(String data) {
Utils.addLog(TAG,"sending data : " + data);
if (mSerialCharacterstic == null) {
Utils.addLog(TAG,"serial characteristic not found yet!");
return;
}
Utils.addLog(TAG,"starting write data...");
mSerialCharacterstic.setValue(data);
Utils.addLog(TAG,"writing : " + data);
// mGatt.beginReliableWrite();
mGatt.writeCharacteristic(mSerialCharacterstic);
}
/*******************/
@Override
public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
Utils.addLog(TAG,"onCharacteristicWrite : " + new String(characteristic.getValue()) + " status : " + status);
// gatt.executeRel