About the Blynk.begin(auth,ssid,password);

I’m no expert but I think this issue is very simple.
I have a problem on a corporate network. On the home network everything is ok. However, on the corporate network, the program hangs on the command Blynk.begin, that is, it fails to connect successfully, but it does not show any error, it just hangs.
The question is, with the wifi connection of the local network ok, can I check if the connection with blynk is ok and proceed with the code even without connection?

May be they have blocked certain ports and ip’s inside the router’s firewall. Did you check with just a basic example of Blynk with out adding any of your bits?

Blynk.begin is a blocking function. All code execution will be halted if the Blynk.begin can’t establish a network(WiFi) connection or a connection to the Blynk server.

The alternative is to manage your WiFi connection manually, then use Blynk.config and Blynk.connect to attempt to establish your connection to the Blynk server. Blynk.connect (and Blynk.run which performs a similar task) is not blocking in the same way, so can be used - along with an optional timeout parameter and code to ensure that Blynk.run is not executed if there is no connection, plus some timed re-connection code - to allow normal code execution without a Blynk connection.

That seems unlikely if you have #define BLYNK_PRINT Serial near the top of your sketch. This should provide feedback about WiFi and Blynk connection attempts. You can also turn on debugging in the IDE to see more information about what is happening.

Pete.

Thank you very much for your answer. The network technicians unlock all outgoing ports and unlocked only incoming ports 80, 8080 and 443. The firewall does not show the request for the nodeMcu esp 8266 card. Very strange. Do you know if does Blynk use any special port or protocol?

Thanks Pete.
I tried with and without the line #define BLYNK_PRINT Serial. As I told Madhuskesh, the firewall does not show the request from the nodeMCU card even though it has assigned an IP, shown by the command #define BLYNK_DEBUG but I did not understand the result.
The network technicians told me that I should configure a DNS but I did not find this configuration in any example.
As I said, the program simply stops at the Blynk.begin line…

[image]

@AlanGiese I’d suggest that you re-read your last post and ask yourself what information it provides that could possibly be of any use to us.

You seem to have confused this suggestion…

with the use of #define BLYNK_DEBUG and not bothered to search for information about what the #define BLYNK_DEBUG messages mean.

Pete.