Polidea / RxBluetoothKit

iOS & OSX Bluetooth library for RxSwift
Apache License 2.0
1.41k stars 365 forks source link

Convenience function for auto chunking / dechunking of data #391

Open GerTeunis opened 3 years ago

GerTeunis commented 3 years ago

Describe the solution you'd like As most protocol messages send over Bluetooth LE will not fit in the 20 bytes suggested max size of sending data to peripheral. Might it be handy to implement the chunking / detchunking on framework level? Both for with and without reponse writes. I.e. if last packet is < 20 bytes (or 0 bytes if exactly matches) it is considered finished.

Writing this chunking / dechunking is done over and over by every developer. Might be handy to provide this function to your users.