OK, am fighting the good fight…
Have a local Blynk Server set up, a basic ‘button’ app intended to flash an LED on an Arduino Mega (pin 50) - this is another question…
I’ve also gotten the sample LED_Blynk to compile nicely with library references to Ethernet2 - needed, as we are using the W5500 ethernet shield.
machines on our 192.168.42.0 subnet see the Blynk server (10.0.0.102) just fine; Admin interface, pings, etc. working, as is the iPhone App connection.
So, am trying to connect the Arduino-with-LED on this subnet, using something like this (I see that dns is already declared, so have renamed it:
Below is my slightly-modified LED_Blink sketch:
// LOU: This is the problem. dns is already declared in the ethernet library.
byte mac = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
};
// LOU MOD: for local network:
IPAddress ip(192, 168, 42, 77);
byte dnsServer = { 192, 168, 42, 1 };
byte gateway = { 192, 168, 42, 1 };
byte subnet = { 255, 255, 255, 0 };
WidgetLED led1(V50);
SimpleTimer timer;
void setup()
{
Serial.begin(9600); // See the connection status in Serial Monitor
Ethernet.begin(mac, ip, dnsServer, gateway, subnet);// LOU NOTE: Blynk ‘vanilla’ apparently presumes DHCP connection
// Blynk.begin(auth); // Here your Arduino connects to the Blynk Cloud.
// LOU NOTE: try this for local server auth
Blynk.begin(auth, IPAddress(10,0,0,102), 8443);
Only evidence of networking is ‘DHCP failed!’ How to explicitly use a ‘hard’ IP address?
Problem: I see no evidence in Blynk server log that the Arduino is even attempting a connection. I must believe my network setup is incorrect. Help!
Follow on: is my declaration of Pin 50 on the Arduino Mega as simple as above?