mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 00:45:22 +00:00
Fix Android fragmentation for iOS/Rust compatibility
- Changed MAX_FRAGMENT_SIZE from 500 to 150 bytes to match iOS/Rust - Fixed fragment ID generation to use 8 random bytes instead of string - Implemented automatic fragmentation in BluetoothConnectionManager - Added 20ms delay between fragments to match iOS/Rust implementation - Updated fragment calculation to account for full packet overhead (34 bytes) This ensures Android-generated fragments fit within iOS's default 185-byte BLE MTU, fixing issues with commands like ?ls -la and ?ifconfig failing on iOS devices.
This commit is contained in:
@@ -44,7 +44,7 @@ class BluetoothMeshService(private val context: Context) {
|
||||
private val securityManager = SecurityManager(encryptionService, myPeerID)
|
||||
private val storeForwardManager = StoreForwardManager()
|
||||
private val messageHandler = MessageHandler(myPeerID)
|
||||
internal val connectionManager = BluetoothConnectionManager(context, myPeerID) // Made internal for access
|
||||
internal val connectionManager = BluetoothConnectionManager(context, myPeerID, fragmentManager) // Made internal for access
|
||||
private val packetProcessor = PacketProcessor(myPeerID)
|
||||
|
||||
// Delegate for message callbacks (maintains same interface)
|
||||
|
||||
Reference in New Issue
Block a user