BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Blynk.Air problems

One issue that i’m experiencing is that when the shipment successfully uploads it doesn’t move to the “finished” list and just stays in the 'Live" list. This is problematic a little because when you want to upload another shipment to the same device then you need to cancel the previous (successful) shipment to enable to new shipment to commence uploading. My device is an esp8266.

That’s correct flow in case you selected template, not specific device list. Because devices could be added to the product continuously.

If you wan the shipment to stop, you need to select specifci device you want to apply update to and not the template.

Ahh thank you @Dmitriy…I’ll be sure to tick the device as well next time.:+1:

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?

Thank you.
Cheers, Luís Pereira.

Better use Arduino OTA than Blynk edgent :stuck_out_tongue_winking_eye:

1 Like

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.

So it’s a commercial use, not personal use.

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.

Pete.

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.

Thank you.

Cheers, Luís Pereira.

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.

Pete.

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.

Again, thank you.

Cheers, Luís Pereira.

You need to be near the device to catch it’s wi-fi. You don’t need to be in the same network actually.

The Dynamic provisioning is designed to allow end-user to put any Wi-Fi credentials they need instead of hardcoding this info into the sketch. Not sure why you want to avoid it.
However, you still can implement it in the way you want with static token - Static AuthToken - Blynk Documentation.

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?

Thanks in advance
Y3G

I’d guess that you need to find a way to prevent the device going into deep sleep mode when an OTA command has been received.

You might be able to use the State variable defined in BlynkState.h

enum State {
  MODE_WAIT_CONFIG,
  MODE_CONFIGURING,
  MODE_CONNECTING_NET,
  MODE_CONNECTING_CLOUD,
  MODE_RUNNING,
  MODE_OTA_UPGRADE,
  MODE_SWITCH_TO_STA,
  MODE_RESET_CONFIG,
  MODE_ERROR,

  MODE_MAX_VALUE
};

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.

Pete.

Thanks Pete,
Do you have any code examples or snippets I could use?
I have used your snippets from the last post with the ESP.sleep() :wink:
BR
Y3G

No, just trying to point you in what I expect to be the right direction. It’s up to you to test it and see if it works.

Pete.

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?

Many thanks in advance for any comment/hints
Y3G

Don’t mess around with that. Focus your energy on preventing deep sleep when an OTA update has commenced.

Pete.