Hi
I was searching why my OTA in Blynk 2.0 was not working and I found this post, the answer was on having the the BlynkEdgent. class ongoing instead of the Blynk… However, I have no interest in the wifi provisioning, since I have to prepare the devices to deal with multiple wifi credentials, most not present when I’m programming. This is no problem when I’m going through the token method…however the BlynkEdgent.begin method does not take the token as arguments, hence it happears BlynkEdgent, and OTA by consequence, only work if I used wifi provisioning, correct?
Is there a work around?
I need to update firmware in remote networks, which I have no acess to router (no port forwarding option). A likely solution would be something like Blynk OTA (without this OTA or token issue), or a personal server that notifies the ESP32 that theres a new firmware for him. But that still needs some work.
Neither, its academic, its part of a international experiment I’m trying to set up within my phd. I’ll need to have monitor devices in 3 diferet contries, and these devices need to be the most remotely assisted possible.
I don’t really understand why you can’t use dynamic provisioning, but there’s nothing to stop you modifying the Edgent examples to retain the Blynk.Air functionality whilst replacing the dynamic provisioning with static provisioning.
Well, pherhaps I didn’t understand how it works then. In wifi provisioning, I need to be within the network I intend to add the device and have it working in the future correct?
How can I program the device at my house, then send it to another country have it working in their network without repeating the provisioning procedure with a phone and the blynk IOT app?
Usually I tell the researchers from other laboratories to store their wifi credentials in an sd card and then my device fetchs that data and connects to the network.
Hopefully, I understood the wifi provisioning wrong.
Blynk.Air modification is what I’m doing now, but its gonna take me more than a day it seems.
I’m not sure If the OP’s got Blynk.air working but I’ll throw in something that worked for me. I was using a Wemos D1 mini clone and trying to upload via air. It would hang just short of completion but if I reset the D1 it would complete and all was well. I changed the baud rate for the serial monitor that is opened in the edgent sketch to 9600 on a whim and it has been working flawlessly since. This was true for my own sketch and the example. I know this seems unlikely but it was the case for me.
I don’t think you can.
However, anyone could provision the device via the app for you, at the remote location. It’s probably easier than writing the data to an SD card.
Or, if they tell you the WiFi credentials you could set-up an access point that uses those credentials and provision the device before sending it out.
Thank you, those are good ideas.
I’ll give it a try to changing the Blynk.Air, because there’s other features I’ll like to maintain, like multiple wifi credentials. But in case I get too lost there, I’ll go with the options.
Guys,
I am a bit of confused in here…
The OTA shows that it has sent the request but never goes above the stage…
My code runs perfectly several days as well as its data collection.
I would like to do the OTA and have therefore added the #define BLYNK_FIRMWARE_VERSION “0.1.1” #define APP_DEBUG #define BLYNK_DEBUG
I connected it to the USB and uploaded it correctly.
Note that it goes to sleep_mode for 30 sec then does the approximately 7 sec of work.
I can see from the serial that its fw 0.1.1
[1773] <[11|00|02|00]xver[00]1.0.1[00]h-beat[00]45[00]buff-in[00]1024[00]dev[00]NodeMCU[00]fw-type[00]TMPLRwKDdSO8[00]fw[00]0.1.1[00]build[00]Sep
I am going through the guidlines that are straight forward, not before I changed in the code the BLYNK_FIRMWARE_VERSION "0.1.2"
The OTA shows that it has sent the request but never goes above the stage.
Does the SLEEP_Mode blocks it?
Isn’t there a priority table that prevents it from Sleep mode or doing other work before it get’s updated?
but I don’t know if you can reuse that variable in your sketch. If not then you could add your own variable and set/clear it when an OTA update is being processed.
Guys,
Can I open another Topic on this, cause I have the feeling that the usage of ESP.sleep(), which is a very major feature for long battery usage applications, with the Blynk.Air doesn’t get much attention.
I have to say that the example with the Blynk.Edgent works fine, but what if we don’t use the BlynkEdgent.begin()/run()
and rather the Blynk.run() in my code?
How do I address the functions Pete is mentioning BlynkState.h?
Will it help to get the Blynk.Air Feature to run?
Are there any more links to the API documentations for all BLYNK features?