Sending text data over a Bluetooth HC-08 module

Hello,

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 not take a picture of the whole app. If that is needed, I will try to post a picture from the computer at home.

Regards

Stef

Nobody? If somebody has an example or can tell what to do to get it sending text that is more than 20 characters long, I would appreciate it.

I have found an example of splitting the text and make a list, but it does not works:

Any ideas/help what is wrong and why I can not send text that is longer than 20 characters?

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 :roll_eyes:

Now, I have fixed an issue I had in the previous post I have made here. It works perfectly now!

If someone helps, here it is:

Regards

Stef

1 Like

Well done Stef. Interesting conversation you were having with yourself there :grin:

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:
ble mtu

1 Like

(added to FAQ)

Hi Chris,

Thanks! Yes, that is really funny this conversation :grin: 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.

Thanks again and regards

Stef

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.