You have mentioned it takes "28!!!". Did you mean 28 mS or 28 seconds or anything else?
The best way is to icrease the MTU size. What issue do have in that? Did you make sure that the increased MTU Size is negotiated to the central using the MTU Update APIs?
- Madhu Sudhan
Thank you for your fast reply I really appreciate your help!
Unfortunately it takes 28 seconds for 5808 byte with a MTU size of 23 byte. Is this normal for BLE i don't think so... I manually changed the MTU size in the BLE block to 512 byte and the length of the characteristic DATA to uint8 509 byte. I tried to send 509 byte with the cypress CySmart App for android, but it seems the controller is shutting down...
Best way to do this is to create a characteristic attribute with the size you need, and then let the BLE stack figure oput how to transfer that best. I did this before, and 1kb can be transmitted in several milliseconds that way. (I think its called 'long read')
That sounds like the answer I was searching for. Would you be so kind to share an example code with me?
Did you mean this function:
So if i understood erverything i have to define a characteristic on my APP and then have to read it with 'long read' instead of defining a characteristic on my PSoC and write to it with my APP?
On Android it is possible to make a long write just by trying to send a value of a characteristic greater than 20 byte. How do i prepare my PSoC or how do i respond on such a "long write" request? Is there a long write request i haven't found anything...
My project was the other way round - my PSoC4BLE provided an array of data, and the Android app was reading it. AFAIR (this was about a year ago...) it worked without any special setup.
_ReadLong looks like the right candidate, yes. When you switch GATT client and server, it even should work without anything else to do - just try with e.g the CySmart client and a small test application.