Help to connect with w550 ethernet shield

Hi, im trying to connect with blynk server but i keep reciving this messages. I’m not familiar with the parameters on the blynk.begin. I did this way becouse i make ir work on a local webservice doing this, im not getting the right way at all.

Im using Ethernet Shield W5500 and Arduino Mega 2560
blynk library 0.6.1
ethernet2 library 1.0.4

im doing this on my job, we use a proxy

A question. Should i be able to ping 144.162.218.15 ? im not being able to ping on my computer or on the wifi.


#define BLYNK_PRINT Serial


#include <SPI.h>
#include <Ethernet2.h>
#include <BlynkSimpleEthernet2.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "rxmW2z4JkHzbtfDpp1kHY5srvJMR2M5h";

byte mac[] = { 0x90, 0xA2, 0xDA, 0x0F, 0x09, 0xA7 }; //physical mac address
byte ip[] = { 192, 168, 0, 202 }; // ip in lan
byte gateway[] = { 192, 168, 0, 3 }; // internet access via router
byte subnet[] = { 255, 255, 255, 0 }; //subnet mask
void setup()
{
  
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth,mac, ip, gateway, subnet);
  // You can also specify server:
  //Blynk.begin(auth, "blynk-cloud.com", 80);
  //Blynk.begin(auth, IPAddress(192,168,1,100), 8080);
}

void loop()
{
  Blynk.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}

if i just let the default example with my token it returns me dhcp failed

144.162.218.15 is not the IP address of a Blynk cloud server.
Your Blynk.begin connection string is incorrect, and the mac address is being treated as an IP address (0x90, 0xA2, 0xDA, 0x0F, 0x09, 0xA7 in hex = 144.162.218.15 in decimal).

The various permutations for the Blynk.begin connection string can be seen in the BlynkEthernet.h file and the option you want is probably this section of that file…

// Static IP with domain, gateway, etc
    void begin( const char* auth,
                const char* domain,
                uint16_t port,
                IPAddress local,
                IPAddress dns,
                IPAddress gateway,
                IPAddress subnet,
                const byte mac[] = NULL)
    {

This means that your Blynk.begin will look something like this…

  Blynk.begin(auth,"blynk-cloud.com", 8080, ip, gateway, gateway, subnet, mac);

This assumes that your gateway also acts as your DNS server. If it doesn’t then replace the first gateway with the IP address of the DNS server.

Even when you have all of this correct, you may not be able to connect from a corporate network without getting your IT department to add some special rules firewall to allow the Blynk traffic through, but give it a try anyway.

Pete.

thanks! exacly what i was needing