Sending configuration values from app to ESP32 via BLE -Trimming

Hello Everyone, I am trying to send a JSON string form the app to an ESP32 device using BLE (latest version for the extension) using the WriteStringsWithResponse.
I am able to connect to the ESP32 and initiate the transfer, BUT the text I receive on the ESP32 seems trimmed ( maybe there is a limit on the amount of text that can be sent?)

This is the relevant part of my Blocks:

I tried with UTF16 enabled and disabled.

And here is what I am receiving on the ESP32 end:

image

I tried re writing each of the keys on the dictionary, just to see if I didnt have a weird character in there somewhere, but no changes.

Also, since I have your attention, I am trying to send WIFI credentials via BLE: since password can have all sort of weird characters, will I run into issues in the future with encoding those characters?

Thank you for your time!!

You need to increase the MTU size of the BLE session.

There should be a block for that.

Hello ABG, thank you for your reply!

I added it to the blocks section:
image

and also to the ESP32 code:
image

But I ams till getting the same limitation.

I found this article ([SOLVED] Can't send payload > 23bytes(MTU setted to 128bytes) - #11 by carloss) that says that WriteStrings is STILL capped to 23 bytes (while WriteBytes is not).

Is that still the case? What options do I have to send a JSON string payload bigger than 23 bytes?

Thank you!

The BLE FAQ referenced above has the latest extension version, and hopefully the latest word on what works or not.

I have not seen any evidence yet that you use the MTU Changed event block or examined what it says is the new MTU size?

I wonder if delaying further BLE work (like the register operation) until successfully changing the MTU size is needed?

I also wonder if there is a corresponding MTU changed event (callback?) in the sketch code.

(I have not used any of this myself, just linked other peoples' findings to the FAQ)

The MTU notes are 3 years older than the latest BLE extension.

Which version are you using?

From this search result
https://www.google.com/search?q=ESP32+BLE+MTU+size+negotiation

I suspect you might have to break up your JSON into multiple YAML key:value messages, to fit in that small MTU size limit.

Let us know what the MTU Changed event says it negotiated.
Also check the release notes of the BLE extension, in case the MTU length problem was addressed in those 3 years.