Wifi provisioning with edgent

I am testing a device using edgent on the ESP8266 in blynk 2.0

Is there a way to have it pick from the available wifi available rather than making the user type the wifi name?

It seems like you use static provision now while there’s WiFi provisioning is implemented. Check those articles please: setting up the board for wifi-provisioning and add new device in Blynk IoT app

I am using EDGENT. If you know what that is then Make a comment about it otherwise…

Perhaps I don’t understand your comment. I created a test app and pushed the code to the hardware. The example had me connect to the hardware and fill the entries from a web page that was created. It did not have a way to pick from the reachable networks.

The normal way to do the WiFi provisioning for Edgent is via the Blynk app. You do “+ Add Device”

and it then gives you the ability to scan for available network SSIDs via the “Change” button.

Pete.

1 Like

Yes, I’m using Android 11 and I can scan for available networks as well.

I did get it to work. I need an additional device id to be setup/ requested. Are there any provisions for something like that to happen?

Also I had to include the edgent example in order to use edgent. I thought that I would just specify the .h file but it did not recognize the name.

Is there another library that I need to have?

Maybe your device name was too long originally? The device name is used to generate the SSID, with additional characters added, and this could exceed the maximum allowable SSID length for an ESP device.

Not sure I understand the question.

That’s the way it works. The Edgent example sketch has multiple tabs, and these are the Edgent .h files that are needed.

Just the latest Blynk C++ library (1.0.1 at the moment).

Pete.

That is what I have installed.

When I include the edgent library I get an error No such file or directory

#define BLYNK_FIRMWARE_VERSION        "0.1.0"

#include <FS.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

#include "BlynkEdgent.h"

So what I understand is that I need to copy the example sketch into each project that wants to use edgent. Is that right? Why make it a library?

Correct.

Pete.

So when I move the device to a different wifi what is the best way to get the new wifi connected?

I see that it makes a web page to ask for the wifi but I don’t see a way to survey the available wifi.

Press the button that is defined in Setting.h for10 seconds and the LED defined in Settings.h will start to flash. You can then re-provision via the app.

Pete.

I decided that making a copy of the code for each project was not the best way for me, I copied the folder into my libraries and added an ifndef at the top so now I only need to include the .h file and I get all the magic. plus if I do an update it updates all my projects!