Location based issue, connecting to Blynk

Hi Blynkers, I encounter this issue to connect with the Blynk cloud if I switch from one country to another country. Here is the problem:

I built and tested my project in the country where I live (Belgium). As soon as everything works, I move it to my holiday house where I want to use it to monitoring temperature and switching some relays (Sweden).
I have a router in my holiday house, and already one other Blynk project running.

If I switch on my device, it does not connect and stays offline. The serial monitor reports that I connect to the Blynk cloud, but I get an ‘Invalid Authentication Token’.
However, if I use not my Swedish router, but my Belgian phone (hotspot) as the router, then it works instantly, without changing the authentication token.

So for some reason, the authentication code does not work if I run it from Sweden, but does work from Belgium and from a Belgian based hotspot.

I did quite some experimenting with the code (copying the authentication code in the
Blynk.begin(auth, ssid, pass);
It no longer gave the authentication token issue, but still did not connect.
I did get some strange results, sometimes the issue whas that it stayed on
[] connecting to blynk.cloud:80
sometimes I got redirected to a
1on1.blynk.cloud…

Are there an country based limitations?
Could I configure a better direct routing if using the project in Sweden? If so, where can I find it?

Thanks

Hello, @eflot

you can write in code server Blynk, like:

Blynk.begin(auth, ssid, pass, “lon1.blynk.cloud” );

Which server do you need to connect to?

I built and tested my project in the country where I live (Belgium).

what region did you see in the lower right corner of the screen?

fra1?

When I created the project, this is what I saw in the device info:
Country: Belgium

I tried recreating the whole project again when I was in Sweden, but I was using my (Belgian) phone as hotspot. My bandwidth on my router in Sweden is limited, so I use my hotspot.

I tried the Blynk.begin(auth, ssid, pass, “lon1.blynk.cloud” );
but that did not resolve it.
The serial monitor just said: [] Connectiong to lon1.blynk.cloud

It’s a DNS issue caused by your ISP, but you haven’t answered @Oleksii-QA’s question…

It will say “Region:” followed by the code for the regional server where your project lives.

What server does it show?

Pete

@PeteKnight I meant what server was when the user created his first project. Or what region

Region: lon1

keep in mind, this is the region where I created and tested the project. What do I do if the region is different in Sweden?

Your Blynk account and its associated templates, devices and data exits on just one of the international servers.
In your case that is the London server.

Assuming that you only have one Blynk account then the problem is that when the device tries to resolve the blynk.cloud server the ISP’s DNS serves is re-directing to a different regional server. This SHOULD end-up being handled correctly, and specifying the regional subdomain in the Blynk.begin command should certainly solve the problem.

I suspect that something else is happening now, but I’m not sure what. Are you using Blynk Edgent or a regular static provisioning sketch?

Posting your serial output might be useful, and posting your sketch might be useful too.

Pete.

The problem got worse… I had already one project with an ESP8266 running in Sweden, but when the internet connection dropped (4G via a sim that I charge every month) and was starting again, the device did not come back. All other IP based devices (camera’s) did come back, but not the blynk device. How do I specify the regional subdomain, where do I find it for my location?

I’d suggest you go back a few posts in this topic and you’ll find the answer to your question.

Pete.

Hi Pete, I went back a few posts, I know how to specify the regional subdomain. But what I still do not know is where I can find the correct subdomain for my account. You say it is in London, great, but where can I see this and what should I specify in that case?
Is it this one? (since I can see in the lower right corner the code lon1)
Blynk.begin(auth, ssid, pass, “lon1.blynk.cloud” );

The thing is, the pc (on which I read the bottom lower right corner) is connected to a Belgian sim network, the IoT device (ESP8266) is connected via the Swedish sim.

Manually configuring the “lon1.blynk.cloud” did not solve the issue. Also the second project I had running (in which is not configured with a specific local domain) is now out after the router reconnected.
It is clear to me that it is a DNS issue, since testing the setup via the Belgian sim got me instantly connected, but as soon as I go via the Swedish sim it does not work anymore. What would you suggest I try next?

The iPad I’ve just taken this screenshot from is currently located in Thailand, connected to a Thai ISP…

image

The geographical location makes no difference, my Blynk account lives on one of the Blynk servers dotted around the world, and when I log in to my Blynk account- from anywhere in the world - my Blynk account is still on the same server - in my case it’s in London, as I happen to live in the U.K.

If including the subdomain doesn’t work then try specifying the IP address, which is 159.65.55.83 for the London server.

Pete.