@magicred-1/react-native-lxmf 0.2.38 → 0.2.40
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/android/src/main/jniLibs/arm64-v8a/liblxmf_rn.so +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/liblxmf_rn.so +0 -0
- package/android/src/main/jniLibs/x86_64/liblxmf_rn.so +0 -0
- package/android/src/main/kotlin/expo/modules/lxmf/BleManager.kt +7 -2
- package/ios/RustCore/liblxmf_rn.xcframework/ios-arm64/liblxmf_rn.a +0 -0
- package/ios/RustCore/liblxmf_rn.xcframework/ios-arm64_x86_64-simulator/liblxmf_rn.a +0 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -272,8 +272,13 @@ class BleManager(
|
|
|
272
272
|
if (characteristic.uuid == RNS_RX_CHAR_UUID && value != null && value.isNotEmpty()) {
|
|
273
273
|
if (preparedWrite) {
|
|
274
274
|
// ATT Long Write fragment — buffer until onExecuteWrite.
|
|
275
|
-
preparedWriteBuffer.getOrPut(device.address) { java.io.ByteArrayOutputStream() }
|
|
276
|
-
|
|
275
|
+
val buf = preparedWriteBuffer.getOrPut(device.address) { java.io.ByteArrayOutputStream() }
|
|
276
|
+
if (buf.size() + value.size <= 65536) {
|
|
277
|
+
buf.write(value)
|
|
278
|
+
} else {
|
|
279
|
+
Log.w(TAG, "ATT Long Write buffer cap (64 KiB) exceeded from ${device.address}, discarding fragment")
|
|
280
|
+
preparedWriteBuffer.remove(device.address)
|
|
281
|
+
}
|
|
277
282
|
} else {
|
|
278
283
|
Log.d(TAG, "GATT server RX ${value.size}B from ${device.address}")
|
|
279
284
|
module.nativeBleReceive(macToBytes(device.address), value)
|
|
Binary file
|
|
Binary file
|