so here the big code im having problem with… it was working fine until i found that it was actually blocking me from doing anything else after it.
whats this does is, on the esp32 side im scanning all the near wifiNetworks, get their names and their forces. Im assembling a big string containing all the infos and then segment this big string in chunks of 19 characters. Then , one by one, i send it via BLE. The first element of this segmented message is the number of packet im about to receive on the thunkable side, then, follows all the infos delimited with the character ‘^’.
On the thunkable side, im reassembling the chunks and create a dataviewerlist with the wifinetwork names and forces. The problem is, since its actually a forever loop, im not able to send other strings from the thunkable app to the esp32 because it gets stuck in this mode. If i call transmit strings during the loop im able the receive the new string on the esp32 side but the outcome deviate and im getting all sorts of non sense. this creates new delay and im unable to assemble the dataviewer list correctly or simply it doesnt work.
i tried repeating the ‘numberOfPackets’ times but it doesnt work. Could you guys give me some cues ? THANKS
thank you, i have some developpement. im thinking ‘breaking the loop’ when ‘app variable x’ is going to be less than or equal to nOfPackets. The problem i have right now is, it seems like the condition ‘not does app variable longStringToParse contains datastring’ doesnt apply because im getting alot of the same strings in this temporary variable. im i doing something wrong !?
hey @ioannis thank you ! i will take a look at the page. Right now i can connect perfectly to the device with the ‘connect to device id’ block but i had no idea other blocks like "when characteristic change’ existed thanks for reaching out
im currently using the ‘receive string’ block but, whats the difference with the ‘subscribe to characteristic’ and the ‘characteristic change’ block ? i dont really understand the nuance ?
The image resolution is really low so it’s hard to see that but my question would be: is the IF block ever false? Because you are using an OR statement… so both have to be false for the IF block to evaluate as false.
When you use the “Subscribe To Characteristics” block you do not need the loop because “when characteristic change” is activated whenever the characteristic value changes on the peripheral (server) device. Data from the BLE device may be received in either String or Byte format.