Hello Guys,
I am working under university LAN network with a ip server and port 8080. For this i got a code, but when i run,it show Login timeout error. Please help me to get connected to blynk cloud.
/*************************************************************
#define BLYNK_PRINT Serial
#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[] = " I got this code";
IPAddress server_ip (proxy ip address);
IPAddress port=proxy port; // ip address and port number is given by university.
// Mac address should be different for each device in your LAN
byte arduino_mac[] = { 0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xED };
IPAddress arduino_ip ( static ip of my port);
IPAddress dns_ip ( dns server ip);
IPAddress gateway_ip ( gateway ip);
IPAddress subnet_mask(255, 255, 255, 0);
#define W5100_CS 10
#define SDCARD_CS 4
void setup()
{
// Debug console
Serial.begin(9600);
pinMode(SDCARD_CS, OUTPUT);
digitalWrite(SDCARD_CS, HIGH); // Deselect the SD card
Blynk.config(auth,server_ip,port);
Blynk.begin(auth, server_ip, port, arduino_ip, dns_ip, gateway_ip, subnet_mask, arduino_mac);
// Or like this:
//Blynk.begin(auth, "blynk-cloud.com", 8442, arduino_ip, dns_ip, gateway_ip, subnet_mask, arduino_mac);
}
void loop()
{
Blynk.run();
}