I’m unsure how much topology info is needed so I’ll give some basics, then specify what I’m looking to figure out in what I think is next step.
Basically, I have a remote router that routes 192.168 65.X (arduino Mega at 192.168 65.3) across a tunnel (VPN) into my home location. My local server resides at 192.168.155.65. My local server is an image of MPHERG/BLYNK-SERVER residing within Docker on a Synology NAS DS218+. The two networks route between eachother. “Layer3” is good. A Firewall resides between the networks and I see this FW logging, recurring:
6 Jul 06 2020 11:41:31 302013 192.168.65.3 49797 192.168.155.65 8080 Built outbound TCP connection 213891 for DMZ_155:192.168.155.65/8080 (192.168.155.65/8080) to CABIN:192.168.65.3/49797 (192.168.65.3/49797)
6 Jul 06 2020 11:41:32 302014 192.168.155.65 8080 192.168.65.3 49797 Teardown TCP connection 213891 for DMZ_155:192.168.155.65/8080 to CABIN:192.168.65.3/49797 duration 0:00:00 bytes 42 TCP FINs
Above log basically confirms that I’m building a connection between Arduino and NAS port 8080… I failed to mention, but my 8080 port is forwarded to the Blynk port 8080 within docker/Blynk instance.
From my PC, I’m able to log into ‘Blynk admin’ at https 192.168.155.65:9443
This leads me to believe the server side is halfway working (correct my assumption if I’m wrong). Oddly, when I enter “http://192.168 155.65:8080” into my chrome browser I get forwarded to ‘blynk io’. I technically don’t understand this… If someone could shine light here, great. Not likely the main issue I’m facing, but I’d like to understand this…
The next step I want is some debugging–either side (server or mega). My logs on server side are basically empty as far as I can tell, but I’m happy they’re being created. Want I want is logs from the Mega. I’m using Arduino software 1.8.13, and from below sketch, only get a ‘IP = 192.168.65.3’ written to Serial Monitor. From my sketch (below), it seems I have it configured to Blynk_Print and Blynk_Debug output… This is what I’m directly tshooting at the moment–why is nothing 'Blynk specific" sent to terminal?
Thanks in advance for reading this… I really hope I haven’t overlooked something obvious, but this does happen sometimes. I’m new to having an account here, but have been searching for the solution with keywords on www without luck. I’m fairly strong with IP networks technically, but not so strong with higher layers (especially applications or OS’s). Regardless, I’m stuck–any assistance/ideas are appreciated.
–Jared
My sketch:
#include <SPI.h>
#include <Ethernet.h>
#include <BlynkSimpleEthernet.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "this was generated from my phone Blynk app";
#define W5100_CS 10
#define SDCARD_CS 4
#define BLYNK_PRINT Serial
#define BLYNK_DEBUG Serial
byte arduino_mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0x99, 0x00};
IPAddress arduino_ip (192, 168, 65, 3);
IPAddress dns_ip (192, 168, 255, 3);
IPAddress gateway_ip (192, 168, 65, 254);
IPAddress subnet_mask (255, 255, 255, 0);
void setup() {
Serial.begin(9600); //debug console
pinMode(SDCARD_CS, OUTPUT);
//digitalWrite(SDCARD_CS, HIGH); // Deselect the SD card
// initialize the ethernet device
Ethernet.begin(arduino_mac, arduino_ip, dns_ip, gateway_ip, subnet_mask);
Ethernet.setDnsServerIP(dns_ip);
//print out the IP address
Serial.print("IP = ");
Serial.println(Ethernet.localIP());
// You can also specify server:
Blynk.begin(auth, "192.168.155.65", 8080, arduino_ip, dns_ip, gateway_ip, subnet_mask, arduino_mac);
//Blynk.begin(auth, IPAddress(192,168,155,65), 8080);
// For more options, see Boards_Ethernet/Arduino_Ethernet_Manual example
}
void loop()
{
Blynk.run();
}