@iotize/device-com-ble.cordova 3.7.0 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -267,6 +267,8 @@ public class BLEProtocol extends BluetoothProtocol {
|
|
|
267
267
|
public void write(byte[] data) throws Exception {
|
|
268
268
|
if (data == null) {
|
|
269
269
|
Log.w("BLEProtocol", "Writing null data. Skip...");
|
|
270
|
+
} else if (data.length > Math.max(requestedMtuSize - 10, 245)) {
|
|
271
|
+
throw new IllegalArgumentException("Maximum frame size with ble is " + Math.max(requestedMtuSize - 10, 245) + " bytes (found " + data.length + " bytes)");
|
|
270
272
|
} else {
|
|
271
273
|
this.beforeReadWriteLwm2m();
|
|
272
274
|
if (this.writeLock.tryLock(15000L, TimeUnit.MILLISECONDS)) {
|