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

NodeMcu not connecting to Blynk local server

hardware
esp8266
#1

Hello,

I am working with nodemcu for a relay control. And i am using Blynk local server on my RPi3 , and the server up and running fine, even am able to access it on my Blynk app. The problem here is with 3 main things

  1. Arduino IDE (versions)
  2. Nodemcu
  3. Blynk server

I tried different versions of Arduino ide but some shows some unknown characters in the serial monitor(tried play with baud rate as well). In some version 1.6.12 i got the serial monitor running fine and it shows the nodemcu is connected to the given ssid and trying to connect to the specified ip address of local server but never connects. I have made sure the id address is the same in both code and router page. (connecting to xxx.xxx.x.x:80) this goes on forever and ever.
But with the same local server, few days back everything was working good. But now uploading the same code as before (nothing changed, even the hardware. (also got new nodemcu & facing the same issue) ), is still not working.

And if anyone has tried using the latest version of Arduino ide trying installing the boards of esp8266 and install the latest version available in the boards manager. we get couple of more options while nodemcu board selected.(flash- sketch only , wifi settings , sketch+wifi setting) and much more. with this we cant even upload the sketch and serial monitor will be blank.

i went through the posts in the Blynk forum but did not find anyone experiencing this sought of problem.

Please help me out.

0 Likes

#2

For a NodeMCU I use this default setting…

34

Make sure you are using Port 8080 in your sketches when using Local Server as that is the new required Default Port for Hardware.

0 Likes

#3

IRC its port 8080 not 80.

also always check the mundane stuff: reset router (unplug it and wait 30s) dito for rpi and then try again.

scrambled text in serial monitor means you have the baud rates unaligned (e.g. 9600 in code while 11k in the monitor settings or vise versa)

edit: ninja’d by the gunslinger…:roll_eyes:

0 Likes

#4

I used these setting as well. But it ruined my nodemcu i guess. I am getting

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v614f7c32
~ld
this in my serial monitor. lower version of esp8266 tend to work i guess.

Arduino version 1.8.1
ESP8266 version in boards manager 2.4.1

0 Likes

#5

i have not mentioned the port in my code. But it shows there. But before the same code was working fine for months. But now am trying to do the same but not able to connect to the local server.

0 Likes

#6

yes you have:

and as gunner pointed out: it has changed from 80 to 8080. So 80 is NOT working.

0 Likes

#7

(connecting to xxx.xxx.x.x:80) this is showing up in the serial monitor. But in the code its just 192.168.1.114 . I have not specified any port . But my point is how was it working fine with this same code before, and why not now ?

0 Likes

#8

@Madhukesh

I use 2 nodemcu on my local server, they work fine,
using static IP because I’ve issue with DHCP
I use 8088 Port because 8080 failed

/*************** WiFi credentials *********************/
char ssid[] = "fgfghghghgh";
char pass[] = "fgdfgdfgdfg";

/*************** Server *********************/
char auth[] = "gdgdfgdfgdfgfdgfdg";
IPAddress server_ip(192, 168, 0, 1);
int port = 8088;

/*************** NodeMCU *********************/
IPAddress arduino_ip ( 192,  168,   0,  55);
IPAddress dns_ip     (  8,   8,   8,   8);
IPAddress gateway_ip ( 192,  168,   0,   254);
IPAddress subnet_mask(255, 255, 255,   0);

bool isFirstConnect = true;

void setup() {

  Serial.begin(115200);
  WiFi.config(arduino_ip, gateway_ip, subnet_mask);
  Blynk.begin(auth, ssid, pass, server_ip, port);
0 Likes

#9

Can you please tell me which version of Arduino ide you are using and esp8266 version in boards manager ?
I think that is having some thing to do with my problem. Because previously the same ip address and port was working fine.
Or should i format by RPi3 and install the local server again ?

0 Likes

#10

If you don’t specify, it defaults to port 80 (for Cloud), and it worked before but not now because that was before the changes :stuck_out_tongue_winking_eye:

Just set it for 8080 and see!! :wink:

3 Likes

#11

Thank you.
Just curious to know, the changes came with the new version of library or the latest server ?
m i doing right ?//char server[] = “192.168.1.169”; before
//Blynk.begin(auth, ssid, pass, server, 8080); before
Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,169), 8080); After

But even after this the serial monitor shows error, never outputs
connected to 192.168.1.114
Blynk version (with Blynk logo )
connecting to 192.168.1.114
connected to 192.168.1.114
ping 1ms

this regular process is not happening !!

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v614f7c32
~ld

this is all i am getting.
but surprisingly the nodemcu connects to the server, but the code is not working as it should. (this is the same code i was using from many months) and was working fine.

Is it something to do with the Arduino IDE or is it with my Nodemcu ?
i also updated the blynk server to the latest build. But am not getting the thing right.:disappointed_relieved::disappointed_relieved::disappointed_relieved:

0 Likes

#12

Did you read that link I posted a few posts earlier?

Unless you have killed it with bad power, you can’t hurt them with bad code… as far as I know.

Try Googling this error… lots of ESP topics about troubleshooting.

0 Likes

#13

Yeah i went through the link posted and was kind of having doubt with it so i asked to cross check.
and i am providing the power with USB and mobile charger max5V. so i am thinking did the IDE destroyed the firmware of it ?
I googled the error am getting and it says about firmware iteslf. I am not getting a proper picture of whats wrong !! Or where am missing out.
am not sure to ask or not ! did the code compile for you ?
Just now i checked out with Arduino IDE 1.8.5 , in this the serial monitor is totally blank. But compiles without any errors.And managed to get the code working partially ok. But doesnt spit out anything about connecting and connections to server.

0 Likes

#14

Unlikely… if you can see it displaying things on the IDE serial monitor, then it is at least processing.

You need to add…

http://docs.blynk.cc/#blynk-firmware-debugging-define-blynk_print

0 Likes

#15

NodeMCU V2

IDE1.8.5
Module: NodeMCU 1.0 (ESP-12E)
Flash Size: 4MB/3MB
CPU Frequency: 160Mhz
Upload Using: SERIAL 115200

0 Likes

#16

Exact as yours !!! But my serial monitor is totally blank. But the nodemcu boots up normally. Does anything to do with the drivers ?

0 Likes

#17

it’s not a driver issue
did you tried with an exemple code without Blynk?


  http://www.arduino.cc/en/Tutorial/Blink
*/

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
0 Likes

#18

I find that comment quite worrying. If you’re looking at the serial debug data in your computer serial monitor then I’d expect you to be powering the device via the USB port of your computer.

You should remove all the other connections from your NodeMCU and flash some simple code to see what results you get.

Pete.

0 Likes

#19

No i was trying to say that power brick is capable of supplying the power needed to the nodemcu.
Obviously to get something on serial monitor the nodemcu needs to be connect to the usb port of the pc . If not even the the serial monitor wont open as we need to select the com port in the tools drop down.
Am aware of it. :slightly_smiling_face:

0 Likes

#20

I tried with this Blynk.begin(auth, ssid, pass, “xxx.xxx.x.x”);
Serial monitor showed connecting to port 80, and never connecting
Blynk.begin(auth, ssid, pass, “xxx.xxx.x.x”, 8080); changing this way it worked. Thanks @Gunner

0 Likes