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

Scan wifi networks and connect it

#1

It is posible to scan wifi networks and connect the device chosing the Wifi network and introducing password from the App?
For example, I would like to a create a Domotic System for end users, with a esp8266 and Blynk App, but find the way to scan and introduce password from App, which is easier for end users without programing knowlege.

0 Likes

#2

Yes the normal way is with WiFiManager.

0 Likes

#3

The normal way is Blynk Provisioning :slight_smile: . You can find it in Blynk myPlant Demo App. But this is only for paid customers.

1 Like

#4

Hi Dmitriy, is posible to create an own Blynk app for commercial purpose? For example now I have a domotic project wich is controlled by Blynk, through Blynk Server… If I want to sell my project which is the cost and the benefits of using Blynk app for commercial purpose??

0 Likes

#5

The Blynk For Business link at the top of this page… takes you to http://www.blynk.io/

1 Like

#6

yes and I’m doing it with my code.
if you study into Blynk.begin(), you’ve found that it call
config() and connectWiFi();
I have updated my sketch, instead calling Blynk.begin(), then you call
Blynk.config (auth);
//scan your wifi
//make a code of SSID selection
Blynk.connectWiFI (ssid, pass);
wait approx 30 sec for blynk to connect and done.
other parts of the code are remain the same.

or you can study this code

2 Likes

#7

Thanks! I was watching Embedis and I found that it works with serial monitor, there is any way to use for example web browser instead of serial monitor? Cause I am thinking in the “end user” who have not any knowlegde about Arduino, programming or Blynk.

0 Likes

#8

@alvaroaguero55 here is https://youtu.be/21PA6_nbS8U?t=31s showed process of what you are asking of in commercial apps.

0 Likes

#9

Great! But Can I use another devide instead of Sparkfun? For example esp8266 nodemcu? In that case which will be the code of generate the QR to my customers?

0 Likes

#10

Yes. - http://help.blynk.cc/publishing-apps-made-with-blynk

0 Likes

#11

I’m using ESP8266 with Softserial to UNO, so I cannot give you the code of node MCU but I can give you the idea.
If you see, Blynk use Blynk.bigin (auth, ssid, pass) to initialize the connection.
All we have to do is split Blynk.being() into WiFI manager part and Blynk connection part. Here how I have done.

//Original sketch
// Blynk.begin (auth, ssid, pass);

// modify sketch
##include <SoftwareSerial.h
#include <BlynkSimpleShieldEsp8266.h

SoftwareSerial EspSerial(3, 2); // RX, TX
ESP8266 wifi(&EspSerial);

Blynk.config(wifi, auth);

// Process any wifi code here, e.g. Wifi config to get the correct ssid, pass
String APlist = wifi.getAPList ();
Serial.print (“AP List:”);
Serial.println (APlist);

GetwifiInfo (&ssid, &pass);

Blynk.connectWiFi (ssid, pass); // connect to wifi network
String resulttext = wifi.getLocalIP();
if (resulttext .startsWith("+CIFSR:STAIP,")) { // wifi connect success
Serial.print ("Connected to ");
Serial.println (ssid);
while(Blynk.connect() != true) {} // Blynk.connect() has time-out handling
if (Blynk.connected()) {
Serial.println (“Blynk connected.”);
}
}

hope this help

0 Likes