Number of widgets limited to 28
I'm working with the pro version.
I have an app in communication with a ble ESP32 and 30 widgets, the last two widgets are not displayed.
With gui-o-designer + ethernet it works fine, but the same init code in the ESP32 (BLE mode) doesn't work well. The last two widgets are not visible.
If I removed some of the first widgets, the last two widgets are then displayed.
May be there is a limitation with the number of widgets, or a time-out in the loading in the "@init" ?
there is no limit on the GUI-O application side in PRO version. There is a timeout on the @init request, but is dismissed when the first message is received.
Maybe you are hitting some buffer limit on the ESP32 side? Can you try putting some timeouts between each message sent from the ESP32?
Thank you for your answer.
The result is random. Sometimes it works, sometimes it doesn't.
What I did (and should have done at the beginning) was to sniff the BLE with my Nordic dongle and Wireshark.
And I see that sometimes the last 2 messages are not sent from @init of the ESP32
Adding more time to the 'sendMsg' function doesn't change anything. However, adding a 100ms delay in the middle of the init seems to work.
I'll have a look in time...
The extra time between frame was not effective.
Now, I had to add some widgets, what was worse.
I found an indirect solution: because the MTU is set at 512 (as seen by wireshark), I concatenate the message like this method instead of send each widget one by one:
memset(initBuf, 0, sizeof(initBuf)); strcpy(initBuf, "|CB UID:TempMotor X:25 Y:55 W:25 BGC:#121212 FGC:#990000 HAW:2 HAH:2 HAR:4 VAL:20 HVAL:120 BTH:2 TXTC:#000000 XTC:6 YTC:2 STA:225 ENA:-45 SHN:1 NC:#000000 CE:0 SHT:1\r\n"); strcat(initBuf, "|LB UID:T_Mot_label X:25 Y:61 W:100 FGC:#000000 FSZ:2 FFA:\"font5\" TXT:\"Mot \u00B0C\"\r\n"); strcat(initBuf, "|CB UID:TempFuel X:75 Y:55 W:25 BGC:#121212 FGC:#990000 HAW:2 HAH:2 HAR:4 VAL:20 HVAL:60 BTH:2 TXTC:#000000 XTC:6 YTC:2 STA:225 ENA:-45 SHN:1 NC:#000000 CE:0 SHT:1 LT:-1 CHAR:-1\r\n"); sendMsg(initBuf);
I send less messages, but with more datas.
In comparison, with the STM32WB I can get a status if the notification buffer is busy, but it seems it doens't in ESP32...
thank you for the information regarding this. I am glad you solved this.
It seems that the Arduino BLE library does not have an option to check if the buffer is full before sending the data.
I think that per specification, the maximum characteristic length is 512 bytes.
BTW: Do you have any examples with GUI-O and STM32?