I need to write an Android App to communicate with a BLE GATT server device. I need the app to implement the "Write Long Characteristic Value" procedure as specified in the Core Bluetooth 4.2 Specification (Vol. 3 Part G), and I would like to know if the Android Bluetooth stack implements this procedure or if there is any library that could help. I've been searching the documentation and found nothing about this specific subject. On Linux I have implemented a python script with pygatt (GATTTool Backend) and it works perfectly, so I would assume Android should be able to do it too.
I also tested with nRF app from Nordic, but when trying to send a message longer than the MTU size the app crops the data instead of using the prepare write for the chunks and the write executive at the end. I'm assuming this is a limitation of the app and not the BLE stack on Android, and that's why I'm thinking of implementing my own app.
Any information would be appreciated. Thanks.
Android supports long writes out of the box. Just do a normal write and under the hood Android will break it up. So as long as the GATT server can handle it, it should work.