I run an Arduino with ESP8266 and a Blynk server who is hosted as Root Server. If I run the Arduino in my private environment, with a cable AVM FritzBox 6490 as firewall, all work fine. Bit if I run the Arduino in my business environment, with a Sophos firewall, the Arduino connect the Blynk server for few second and than he lost the connection. I tried some things on the Sophos (rules, NAT, allow all traffic, etc.) but I never got the Arduino to work, except for few seconds. Has anyone a idea how the Arduino lost the connection behind a Sophos? Or a idea what kind of setup I have to take? I wonder me about the fact that the Arduino can access the server for few seconds…
Thank you in advance and kind regards,
Sounds more like a networking issue then a Blynk issue.
Is your (Blynk) Local Server still at home while you are trying to access it from within the business networking, or are you using a different (Blynk) Local Server?
How do you know this?.. Does the device and App login with displayable functionality before disconnecting after a few moments?
More clarity of details please.
Thank you for your fast answer.
The Blynk server is a Root Server with Ubuntu 16.04.2 and is hosted in the cloud (so externally) and is reachable over a public IP address. No firewall rules, no other things run on it except the Blynk server. My private and business networks have a public IP address. My private network is connected over a AVM 6490 cable box and this is also the firewall. My business network has behind the ISP modem a Sophos SG115 UTM9 firewall. The Blynk device is a Arduino Nano fork with an integrated ESP8266 shield.
If I run the Blynk device in my private network (surly with the right WiFi sittings ) all work fine. If I run the Blynk device in my business network (surly with the right WiFi sittings also ) the Blynk device connect the Blynk server for some seconds then it loses the connection. It’s very easy to track that because the Blynk App signals the device connection and the server logs show the device connection. Also the App and log shows the disconnection. At the boot time of the device it’s also trackable, over the serial monitor, that the connection works because there is the “Ready (ping: [time])” output (please have a look on: serial_ouput|626x500).
At the beginning I suspected that this behavior is the result of the fact that I have 3 public IP addresses bind on the Sophos. And therefore the Blynk device sending his data one time over that public address and than over a other public IP address (because the Sophos is configured with a uplink balance). To exclude this source of error I configured the Sophos to use every time the same public address for the Blynk device. But without any success. The behavior still stay. Than I disabled all other interfaces on the Sophos so that they have only one who was connected to the Internet. Also without any success. The behavior still stay also in this configuration. And now the best: If I setup a “Any/Any/Any” firewall rule (that prunes out the firewall and lets everything through) the connect and disconnect behavior is still there… crazy but true…
I believe it’s the right time for a Wireshark investigation and to set the Sophos logging to deep…
I will write the results here…
Thank you and have a nice day!
@magon maybe the issue is with the Wi-FI signal strength within your network?
I don’t believe that. Because the WiFi signal is much more better in the office as it is in the private environment. Today I will try another Arduino Fork with another ESP8266 shield. Maybe the “problem” is the currently used MCU with the embedded ESP. We will see. I will write the result here.
I solved this mysterious behavior. With a very high probability the problem was the device hardware. It’s maybe not a good idea to use Arduino Nano with ESP8266 because this works only fine with Blynk API 0.3.4 but this API is outdated. Furthermore, when WiFi is needed, it’s much better to use e.g. an ESP32. With a ESP32 I had no problem with the communication device <-> server. All work fine now and much more smooth.
Have a nice day!
I personally am unsure what you mean by outdated? I run an Arduino with ESP-01 24/7 with latest version of Blynk, including API testing… all works fine.
But glad you got you setup working one way or another
I also run a Arduino Nano with embeded ESP8266, called Pretzel Board, with 0.5.2. But only in the private LAN, not in the office LAN. This was the point why I opened this posting. Than I tried the same with a Ardunio Nano with external ESP8266. With them I got other problems in booth LANs. Than I tried it with a ESP32 Dev. Board, API 0.5.2. All working fine with it.
Some more words to my statement outdated: The most pain I had, no matter with which hardware, was with the jungle of available libraries and some incompatibility between the libraries.
All in all, sometime it’s a horror for a newbie. So many ways to come to the goal.
But with the ESP32 all work better than I hoped…