Arduino Mega+ ethernet shield not connecting to Cayenne dashboard


#1

Hello,

I have connected Arduino mega with ethernet shield W5100 through an ethernet cable and usb to serial cable to laptop
I have installed Cayenne libraries, selected the correct port and board.
Through Cayenne dashboard- selected Arduino Mega-shield W5100-sketch copy pasted using correct authorization token.

Compiled the code and uploaded, but still Arduino does not get connected to the Cayenne dashboard.

I get serial output as [0] MAC: FE-DB-D6-E2-9F-C5
[0] Getting IP…
[60451] DHCP Failed!

How do i solve this? pls help. Its urgent. Thanks in advance


#2

Hello and welcome to Cayenne community,
First of all - restart your router. Are you sure that your router has DHCP enabled function?
Can you also put your code here ?
Thank you:)


#3

@nehagirme,

Users have had a lot of issues with the W5100 shield for a variety of reasons.

@rsiegel’s list is a good place to start tracking this down. Server error

Cheers,

Craig


#4

I also had troubles with the w5100 but all sorted when I realised that my code was using pin 10 on the arduino which is required for the W5100.


#5

hello, I have restarted the router and checked the DHCP function - enabled.

here goes my code:

/*
Cayenne Ethernet Example

This sketch connects to the Cayenne server using an Arduino Ethernet Shield W5100
and runs the main communication loop.

The Cayenne Library is required to run this sketch. If you have not already done so you can install it from the Arduino IDE Library Manager.

Steps:
1. Set the token variable to match the Arduino token from the Dashboard.
2. Compile and upload this sketch.

For Cayenne Dashboard widgets using digital or analog pins this sketch will automatically
send data on those pins to the Cayenne server. If the widgets use Virtual Pins, data
should be sent to those pins using virtualWrites. Examples for sending and receiving
Virtual Pin data are under the Basics folder.
*/

//#define CAYENNE_DEBUG         // Uncomment to show debug messages
#define CAYENNE_PRINT Serial  // Comment this out to disable prints and save space
#include <CayenneEthernet.h>

// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "*********";

void setup()
{
  Serial.begin(9600);
  Cayenne.begin(token);
}

void loop()
{
  Cayenne.run();
}

I am still getting the DHCP failed!


#6

Your sketch looks good, just the basic sketch that should fine. Did you go through @kreggly’s link and verify if you are experiencing anything in the post?