I have made this Bluetooth BLE app for my Android phone to send some data over my Bluetooth module to an Arduino. It works great, but if I will send some text with this app, it sends only 20 characters and after that the rest of the data seems to be lost. I only receive about 20 characters and after that it is finished. Only the short data like the 0T92 or 0T1 I am sending the Arduino will receive. What is wrong or what can I make to send all the text I write in the text box for sending it?
Here is the app with the blocks:
I can send the text by splitting it! I have used the old app on my mobile phone because this was on the main screen and the new installed one was still in the menu
Now, I have fixed an issue I had in the previous post I have made here. It works perfectly now!
Well done Stef. Interesting conversation you were having with yourself there
The reason you cannot send more than 20 characters is that the BLE data packet size defaults to approx 32 bytes, including it's own header & footer. So yes, a good way to work with that is to send your text via several packets. You can, depending on the receiving device, increase the MTU (Maximum Transmission Unit), up to a maximum of 247 bytes (Both devices must support BLE v4.2 - v5.0).
You can find the Blocks to make that happen in the BLE Extension:
Thanks! Yes, that is really funny this conversation I agree with you!
To change the MTU size I have tried, but that does not works (The HC 08 module it is a BLE 4.0 device as I know it!). Any way, I think, that is the better option to solve it and it is workable for more cases.