Hi I am using android 4.4(central) and c2541(peripheral). I wanna read data from peripheral device. I modify the BLE connection parameters ( connection interval). It does work. It decreases the 150 ms to 50 ms to read 20B data. But I wanna make it faster. Maybe 5 ms ? According to the BLE protocol, it could be up to 5.9kb/s. So I think there is someway to solve it. Anybody konw about this?
By the way, the android code is based on the BluetoothLeGatt. I post the code here.
this is how I read characteristic.To simplify the code, I get rid of some code to record system time and variables,if needed,I can post the complete codes.
if(gattCharacteristic.getUuid().toString().equals(UUID_KEY_DATA)){
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
mBLE.readCharacteristic(gattCharacteristic);
}
}, 5);
}
this is where I receive the data
@Override
public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
if (status == BluetoothGatt.GATT_SUCCESS)
Log.e(TAG,"onCharRead "+gatt.getDevice().getName()+" read "+characteristic.getUuid().toString()+" -> "+Utils.bytesToHexString(characteristic.getValue()));
}