[Solved] Wifi Connect Issue to Blynk Server on WeMos D1 Mini

Hi,

I am attempting to get the example sketch ‘ESP8266_Standalone’ to turn on an LED on a breadboard but fail to connect to the Blynk server. I have ONLY replaced auth, ssid and pass in the example sketch. I get to ‘Connecting to cloud.blynk.cc:8442’ which then continually repeats. I never get to the Ready ping.

Serial monitor output:

Connecting to CEREBRO_GUEST
[3759] Connected to WiFi
[3759] My IP: 10.10.80.105
[5001] Connecting to cloud.blynk.cc:8442
[10002] Connecting to cloud.blynk.cc:8442
[15003] Connecting to cloud.blynk.cc:8442
[20004] Connecting to cloud.blynk.cc:8442
[25005] Connecting to cloud.blynk.cc:8442

Debugging Attempts:

  1. I was able to confirm my blynk app and pin mappings are correct by successfully running the project via USB with the Arduino_Serial_USB example sketch to blink a LED on the WeMos D1 Mini.

  2. Below is the json from http://blynk-cloud.com/TOKEN/project except I replaced the token with XXXX

{“id”:829300136,“name”:“esptest”,“createdAt”:1486117613,“updatedAt”:1486168590908,“widgets”:[{“type”:“BUTTON”,“id”:1372967620,“x”:2,“y”:2,“color”:-308477697,“width”:2,“height”:2,“tabId”:0,“deviceId”:0,“pinType”:“DIGITAL”,“pin”:4,“pwmMode”:true,“rangeMappingOn”:false,“min”:0,“max”:1,“value”:“1”,“pushMode”:false,“onLabel”:“ON”,“offLabel”:“OFF”}],“devices”:[{“id”:0,“name”:“esptest”,“boardType”:“ESP8266”,“token”:“XXXX”,“connectionType”:“WI_FI”,“status”:“OFFLINE”,“disconnectTime”:1486166875086,“lastLoggedIP”:“24.7.47.73”}],“boardType”:“ESP8266”,“theme”:“Blynk”,“keepScreenOn”:false,“isAppConnectedOn”:false,“isShared”:false,“isActive”:false,“hardwareInfo”:{“version”:“0.4.4”,“boardType”:“Arduino”,“connectionType”:“Stream”,“buildDate”:“Feb 3 2017 14:28:01”,“heartbeatInterval”:10}}

There is a lastLoggedIP because I was successful with the same project using a Serial USB connection.

  1. I check my router which had security set to ‘WPA2-PSK-AES’ but I also tested ‘WPA-PSK-TKIP+WPA2-PSK-AES’ and ‘None’ security. No difference.

I even tried connecting via my cellphone hotspot. No difference.

  1. I upgraded
  • Arduino 1.6.12 to 1.8.1
  • Blynk libraries from 0.4.3 to 0.4.4
  • iOS 10.2 to 10.2.1 (don’t think it matters since project worked via USB instead of wifi)
  1. I am able to telnet to blynk server and get the following…

MELUK-MAC:~ MELUK$ telnet blynk-cloud.com 8442
Trying 45.55.96.146…
Connected to blynk-cloud.com.
Escape character is ‘^]’.
Connection closed by foreign host.
MELUK-MAC:~ MELUK$

  1. I have tried refreshing a new token. No change.

  2. I have tried creating a new project. No change.

  3. Output from pinging blynk-cloud.com

MELUK-MAC:~ MELUK$ ping blynk-cloud.com
PING blynk-cloud.com (45.55.96.146): 56 data bytes
64 bytes from 45.55.96.146: icmp_seq=0 ttl=56 time=90.680 ms
64 bytes from 45.55.96.146: icmp_seq=1 ttl=56 time=95.437 ms
64 bytes from 45.55.96.146: icmp_seq=2 ttl=56 time=91.066 ms
64 bytes from 45.55.96.146: icmp_seq=3 ttl=56 time=141.917 ms
64 bytes from 45.55.96.146: icmp_seq=4 ttl=56 time=91.106 ms
64 bytes from 45.55.96.146: icmp_seq=5 ttl=56 time=93.613 ms
64 bytes from 45.55.96.146: icmp_seq=6 ttl=56 time=274.951 ms
64 bytes from 45.55.96.146: icmp_seq=7 ttl=56 time=95.756 ms
64 bytes from 45.55.96.146: icmp_seq=8 ttl=56 time=93.404 ms
64 bytes from 45.55.96.146: icmp_seq=9 ttl=56 time=92.712 ms
64 bytes from 45.55.96.146: icmp_seq=10 ttl=56 time=92.306 ms
64 bytes from 45.55.96.146: icmp_seq=11 ttl=56 time=98.716 ms
64 bytes from 45.55.96.146: icmp_seq=12 ttl=56 time=96.361 ms
64 bytes from 45.55.96.146: icmp_seq=13 ttl=56 time=90.533 ms
64 bytes from 45.55.96.146: icmp_seq=14 ttl=56 time=103.046 ms
64 bytes from 45.55.96.146: icmp_seq=15 ttl=56 time=96.799 ms
64 bytes from 45.55.96.146: icmp_seq=16 ttl=56 time=97.450 ms
64 bytes from 45.55.96.146: icmp_seq=17 ttl=56 time=91.358 ms
64 bytes from 45.55.96.146: icmp_seq=18 ttl=56 time=91.444 ms
64 bytes from 45.55.96.146: icmp_seq=19 ttl=56 time=94.733 ms
64 bytes from 45.55.96.146: icmp_seq=20 ttl=56 time=91.611 ms
64 bytes from 45.55.96.146: icmp_seq=21 ttl=56 time=94.262 ms
64 bytes from 45.55.96.146: icmp_seq=22 ttl=56 time=96.370 ms
64 bytes from 45.55.96.146: icmp_seq=23 ttl=56 time=92.251 ms
64 bytes from 45.55.96.146: icmp_seq=24 ttl=56 time=121.710 ms
64 bytes from 45.55.96.146: icmp_seq=25 ttl=56 time=100.827 ms
64 bytes from 45.55.96.146: icmp_seq=26 ttl=56 time=96.216 ms
64 bytes from 45.55.96.146: icmp_seq=27 ttl=56 time=93.274 ms
64 bytes from 45.55.96.146: icmp_seq=28 ttl=56 time=112.637 ms
64 bytes from 45.55.96.146: icmp_seq=29 ttl=56 time=91.510 ms
64 bytes from 45.55.96.146: icmp_seq=30 ttl=56 time=91.779 ms
64 bytes from 45.55.96.146: icmp_seq=31 ttl=56 time=119.657 ms

Help?? I had Blynk working in the past without issue and I was planning to introduce Blynk to a bunch of kids I’m teaching IoT to in middle school this coming week.

See this thread for a possible fix [Solved] Error cannot connect my esp to wifi

1 Like

Many thanks @Jamin for the link! It worked!!

I had previously upgraded the blynk libraries so I took more drastic measures and blew away the Arduino IDE first.
I uninstalled Arduino IDE application and manually deleted the /Users/XXXX/Library/Arduino15 directory on mac. Then reinstalled the Arduino IDE and Blynk libraries.