Blynk app reports Arduino "Wasn't online yet"

I’m starting to use Blynk. I’m using Arduino_USB_Serial example to toggle builtin_led, the easiest one. The app generates auth token, sends the email correctly, the program compiles and uploads correctly, the script connects ok, but when I start the app Blynk show the red dot saying “Wasn’t online yet”. I have checked every previous posts about this problem, tried everything and nothing works, I keep receiving the message “Wasn’t online yet”. I have checked the auth token many times, disabled the firewall, etc., etc. and nothing works. Can anybody help me please?.

What does your DebugSerial print out show? Assuming you have a seperate TTL-Serial adapter and terminal program running to view such. Do NOT have your IDE Serial Monitor open!!

Is your Arduino actually using COM16 ?

Thank you Gunner for answering. The port COM16 is correct. I don’t have a serial adapter, I will try to buy one soon. I don’t open the Arduino serial monitor because I understand that USB communication will cause a conflict. What else could I try to solve the problem please?

Not many other options for debugging. You seem to have covered most issues in your OP (firewall, AV, etc.)

You can close the script window and open the Serial monitor, then plug in the UNO… you should see it repeatedly spitting out that authcode. If you see any other text then make sure to REMOVE any Serial print commands as they will also interfere with the USB stream.

Then close the Serial monitor and restart the USB script and try again… BTW, that USB Scripts DOS window must stay open/running the whole time, minimised is Ok.

I bought a USB-TTL converter and this is what I get. I’m using an Arduino UNO now instead of the Mega and I keep receiving the red dot error in my smartphone. Everything is ok as before but now I have the logs from DebugSerial. Can these logs help to solve the problem?


I have made ping to 139.59.206.133 and this is what I get.Capture4

The Mega would be the prefered option as it has multiple Hardware UART and thus no SoftSerial complications.

I thought everything was NOT Ok… Are you saying you used to get connected with the Mega?

I think you need to start from scratch and provide current hardware/wiring specs, used code (copy pasted, not screenshots if possible) along with copy/pasted DOS screen and debug.

@jmerlog

Try this for me? (my example is on linux, but works the same for windows)

root@ub:~# telnet 139.59.206.133 80
Trying 139.59.206.133...
Connected to 139.59.206.133.    `A GOOD SIGN`
Escape character is '^]'.
GET /*                          `any Get Here`
HTTP/1.1 404 Not Found   `Perfect!  No matter the msg, the server is talking to us`
access-control-allow-origin: *
content-length: 0
connection: close

Connection closed by foreign host.

Basically, i want you to telnet to the server… to double check your firewall is off.

telnet 139.59.206.133 80
GET /*

what msg do you get ?

Thanks for your support Gunner. Starting from scratch:
Using Arduino Mega in COM16, connection type: USB
USB-TTL converter in COM19, connected to Serial1 (pins 18[Tx] and 19[Rx])
Source code:

#define BLYNK_PRINT Serial1

#include <BlynkSimpleStream.h>

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

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

  // Blynk will work through Serial
  // Do not read or write this serial manually in your sketch
  Serial.begin(9600);
  Blynk.begin(Serial, auth);
}

void loop()
{
  Blynk.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}

Running the script I get:

Connecting device at COM16 to blynk-cloud.com:80
OpenC0C("\.\COM16", baud=9600, data=8, parity=no, stop1) - OK
Connect(“blynk-cloud.com”, “80”) - OK
InOut() START
DSR is OFF

Debug console (USB-TTL converter) shows repeatedly:

Conecting…
Redirecting to 139.59.206.133:80

The smartphone shows:

Please help…

Please double check… or even replace… your AUTH code.

I loaded your above code on my Mega using USB and my Cloud account with my Auth and it connected right away.

Oh, one minor difference that you can try. In my USB script I use port 8080, not just 80.

@echo off
setlocal EnableDelayedExpansion

REM === Edit these lines to match your need ===

set COMM_PORT=COM15
set COMM_BAUD=9600
set SERV_ADDR=blynk-cloud.com
set SERV_PORT=8080

Thanks again Gunner. I have checked everything ten times or more. I also changed the port to 8080, disabled the antivirus, verified the firewall, and nothing works. It seems that Blynk works fine for everyone but me. It’s such a simple example and I can’t make it work!!! I don’t understand what I’m doing wrong. I even connected my laptop and smartphone to another network because I thought the problem was my network but it didn’t work either. I also tried with another laptop. Can it be any Windows 10 incompatibility ? I don’t know what to think.

No. I use it with Win10

Try pinging blynk-cloud.com from your PC, then using that resultant IP instead of the URL in the USB script.

set COMM_PORT=COM16
set COMM_BAUD=9600
set SERV_ADDR=xxx.xxx.xxx.xxx
set SERV_PORT=8080

I’ve just tried with the IP obtained pinging blynk-cloud.com, didn’t work either…
I have created a new account in Blynk, but doesn’t work either. I’m about to give up… :frowning:

Was it the same IP as the redirecting mesg?

BTW, I tried again on my side, but with your AUTH (well, the last one you posted) and I also see the same rapid redirecting msg… so something is strange, and it is NOT your PC, hardware or internet connection.

[0] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.6.0 on Arduino Mega

[90] Connecting...
[285] Redirecting to 139.59.206.133:80
[286] Connecting...
[500] Redirecting to 139.59.206.133:80
[501] Connecting...
[715] Redirecting to 139.59.206.133:80

But if you even created a NEW account and AUTH… then ??? Strange…

Try loading up debug into your sketch and post the results here.

The IP obtained pinging blynk-cloud.com was 45.55.96.146 and the one in the redirecting message is 139.59.206.133. They are different.
I loaded debug and I obtained this:

[266714] Connecting…
[266714] <[1D|00|01|00]
[266715] <faff8def60b544588f578be468fe8cd6
[269744] Login timeout
[271744] Connecting…
[271744] <[1D|00|01|00]
[271745] <faff8def60b544588f578be468fe8cd6
[0]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.6.0 on Arduino Mega

[90] Connecting…
[110] <[1D|00|01|00]
[135] <faff8def60b544588f578be468fe8cd6
[399] >)[00|01|00|11]
[416] >139.59.206.133[00]80
[416] Redirecting to 139.59.206.133:80
[428] Connecting…
[449] <[1D|00|01|00]
[474] <faff8def60b544588f578be468fe8cd6
[769] >)[00|01|00|11]
[787] >139.59.206.133[00]80
[787] Redirecting to 139.59.206.133:80
[798] Connecting…
[820] <[1D|00|01|00]

Does it mean something?

OK, I am not well versed in this networking stuff… but I ran two traceroutes, one with the IP you used (but obviously from my location) and one with blynk-cloud.com

They are clearly different… and one has timeout issues. Although I would have thought we both would use the same Blynk Cloud Server, what with being in the “Americas” me NA you SA

So when I ran your AUTH (older one) with blynk-cloud.com I was also getting redirected (doh, as per the msg) to this other IP. And that is where I think the issue is… perhaps something with Blynk’s GEO-DNS routing?? @Dmitriy ? This make any sense?

C:\Users\Gunner>tracert 139.59.206.133

Tracing route to 139.59.206.133 over a maximum of 30 hops

  1     9 ms    10 ms    10 ms  10.78.128.1
  2    11 ms    10 ms    12 ms  rc1st-tge0-8-0-11-22.vc.shawcable.net [64.59.148.221]
  3    17 ms    19 ms    15 ms  rc2wt-be50-1.wa.shawcable.net [66.163.70.106]
  4    16 ms    14 ms    21 ms  rc1wt-be18-1.wa.shawcable.net [66.163.64.81]
  5    13 ms    14 ms    19 ms  sea-b2-link.telia.net [62.115.146.72]
  6    59 ms    58 ms    58 ms  chi-b21-link.telia.net [62.115.117.49]
  7     *        *        *     Request timed out.
  8   170 ms   173 ms   170 ms  prs-bb3-link.telia.net [213.155.135.4]
  9   178 ms   178 ms   178 ms  ffm-bb3-link.telia.net [62.115.123.12]
 10   173 ms   166 ms   167 ms  ffm-b4-link.telia.net [62.115.120.0]
 11   179 ms   179 ms   188 ms  digitalocean-ic-328177-ffm-b4.c.telia.net [80.239.128.21]
 12     *        *        *     Request timed out.
 13   179 ms   178 ms   177 ms  139.59.206.133

Trace complete.

C:\Users\Gunner>tracert blynk-cloud.com

Tracing route to blynk-cloud.com [45.55.96.146]
over a maximum of 30 hops:

  1    12 ms    12 ms     8 ms  10.78.128.1
  2    10 ms    11 ms    11 ms  rc1bb-tge0-8-0-11-22.vc.shawcable.net [64.59.148.217]
  3    14 ms    13 ms    14 ms  rc1wt-be90.wa.shawcable.net [66.163.76.66]
  4    14 ms    16 ms    15 ms  sea-b2-link.telia.net [62.115.146.72]
  5    56 ms    60 ms    59 ms  chi-b21-link.telia.net [62.115.117.49]
  6    73 ms    77 ms    74 ms  nyk-bb4-link.telia.net [62.115.137.58]
  7    76 ms    73 ms    73 ms  nyk-b3-link.telia.net [62.115.139.151]
  8    77 ms    74 ms    74 ms  digitalocean-ic-306498-nyk-b3.c.telia.net [62.115.45.10]
  9    77 ms    74 ms    74 ms  138.197.248.11
 10    76 ms    76 ms    80 ms  45.55.96.146

Trace complete.

What happens if you put the redirected IP address into the USB script and close/reopen the CMD window and try again?

set COMM_PORT=COM16
set COMM_BAUD=9600
set SERV_ADDR=139.59.206.133
set SERV_PORT=8080

Pete.

3 Likes

Thank you very much Pete, IT DID WORK and the problem is solved. I had tried with the IP that I got pinging blynk-cloud.com which is 45.55.96.146 and it didn’t work, but putting the redirect IP address 139.59.206.133 into the script did work. I don’t understand why but it worked. BTW putting the IP 139.59.206.133 in a browser takes you to https://www.blynk.cc and as it is not blynk-cloud.com I hadn’t tried it. Thank you very much Pete and Gunner, so great support from you.

1 Like

Yayyyy :smiley: so obvious and yet so strange it needed to be done that way.

That always happens when doing that in a browser instead of a sketch.

1 Like

Yaaaay! That’s great.
I love letting @Gunner do all the hard work then stepping-in with an off the wall suggestion that actually works (it doesn’t happen very often :roll_eyes:).

Anyway, welcome to the wonderful world of Blynk!

You’ll soon want to be able to do-away with the USB link and connect a different way. I’d recommend steering clear of Ethernet shields for the Arduino - they’re a pain.
A marginally better alternative is to use an ESP-01 as a Wi-Fi modem. It works, but can be painful to get set-up.

The way that most of us tend to go is to put the Arduino on the shelf and use a NodeMCU or Wemos D1 Mini instead. These have built-in Wi-Fi, more memory than the Arduino, a faster processor than the Arduino, and they are cheaper than the Arduino as well.

They can be programmed via the Arduino IDE (with a small bit of add-in software) and are very easy to work with.

Have fun!

Pete.

1 Like

Sniping for the Win :joy:

1 Like