I’m working on a UI for BLE nRF52 device and I can not seem to get widget parameters to update after clicking play in the Blynk project. After clicking play, all widget settings seem to be reset and are out of sync with defaults I’ve setup on the hardware.
I’ve tried a combination of
BLYNK_CONNECTED(), BLYNK_APP_CONNECTED(), Blynk.syncAll(), (with “Notify Devices When App Connected” enabled) BLYNK_READ(), and running things like Blynk.virtualWrite(V1, ws2812fx.getSpeed()) within each of these functions and many other places. Regardless, every time I connect to the device and then hit PLAY, all the widgets simply reset and do not respect the previous settings, current settings, or any of the functions I’m attempting to use to update these values.
Is the reason that these functions are simply broken when using the Blynk app over BLE given that BLE support is in beta? I can’t even get these functions to update the value of the Display widget and have this maintained when clicking the play button.
Should I repost this in the “Issues and Errors” category?
I think it is simply a case of the BLYNK_CONNECTED() function needing a direct server link, and that is not directly available in BT/BLE… as is the case for a few other Server based commands and functions.
BLYNK_CONNECTED() does seem to fire on establishing a connection via the BLE widget. But then on playing the app, BLYNK_APP_CONNECTED() does not seem to work.
That is a function of the MCU (sketch) asking the Server the state of the App connection (to the server)… but in the case of BT/BLE, the sketch isn’t actually talking to the server directly, thus no worky.
BT/BLE is an “odd for IoT” setup in my opinion.
Blynk uses a…
App <-network-> Server <-network-> MCU setup, which is ideal for IoT
So upgrading the Beta BT/BLE interface use case of…
BT/BLE based MCU <-BT/BLE-> App <-network-> Server <-network-> MCU
…is clearly going to take some time/effort… assuming the Developers actually want to integrate BT/BLE fully into the fold.