Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ble): fix ios->android long write
When android connect to an iOS device it set the mtu and the callback onMTUchanged is called on the android side, with an iphone 6S+ for example it'll set the mtu to 185, even through on the iOS part we will still retrieve 512 when we call maximumWriteValueLengthForType cause iOS automaticly chunck the data to fit in the correct MTU for the android device, in order to iOS to know what was read we need to send back the value when we send the gatt response, on the android side we can either send the chunk to yamux since it'll buffer it as long as it hasn't received the whole frame or buffer it and send it when the onExecuteWrite is called with the execute parameter set to true, i've choose the 1st option in order to not taking more time on this issue Signed-off-by: Sacha Froment <sfroment42@gmail.com>
- Loading branch information