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

Esp8266 board can not connect local server,but blynk app can connect

esp8266
#1

local server:windows 7, ip:192.168.191.2.
router:192.168.191.1
local server can start up normally.
and blynk app(android) can start up normally,and register new user and set up new project in app.
esp8266 can connect to the AP(192.168.191.1) and its ip:192.168.191.7
code as below:
#define BLYNK_PRINT Serial

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

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = “1fce908502c14f08ad148109e4ccaa9e”;

// Your WiFi credentials.
// Set password to “” for open networks.
char ssid[] = “LieBaoWiFi640”;
char pass[] = “lyx123456”;

char someIPaddress[] = “192.168.191.2”;

WidgetLED led1(V1);

BlynkTimer timer;

// V1 LED Widget is blinking
void blinkLedWidget()
{
if (led1.getValue()) {
led1.off();
Serial.println(“LED on V1: off”);
} else {
led1.on();
Serial.println(“LED on V1: on”);
}
}

void setup()
{
// Debug console
Serial.begin(9600);

//Blynk.begin(auth, ssid, pass);
// You can also specify server:

Blynk.begin(auth, ssid, pass, IPAddress(192,168,191,2), 9443);
//Blynk.begin(auth, ssid, pass, someIPaddress, 9443);

timer.setInterval(1000L, blinkLedWidget);
}

void loop()
{
Blynk.run();
timer.run();
}

and the serial console data as below:
Ȥl⸮⸮⸮l$⸮lb8⸮⸮[58] Connecting to LieBaoWiFi640
[2062] Connected to WiFi
[2062] IP: 192.168.191.7
[2062]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.6.1 on ESP8266

[2139] Connecting to 192.168.191.2:9443
[7395] Connecting to 192.168.191.2:9443
[12415] Connecting to 192.168.191.2:9443

now the board can not link to the server.

0 Likes

#2

I’d personally delete your credentials and auth code from your message.

0 Likes

#3

Please edit your post to format your code correctly:

Blynk%20-%20FTFC

Pete.

0 Likes

#4

use 8080 port

0 Likes