I am a noob in this stuff, so what I will say will probably make no sense…
Im using an arduino mega connected to an ethernet shield W5100, which is directly connected to the router. I do have an antivirus on the pc but I dont think it is blocking any connections let me try.
By the way the ip, 0.0.0.0, I didnt set that like that, I did try setting other ips but everytime I I upload it always shows up as 0.0.0.0 no matter what
I managed to unblock the port in my router, in putty, now it says connection to host closed. And some 2 green brackets appear in the black window, I could also set the IP for the arduino mega it stopped showing 0.0.0.0 now it actually displays the IP, I could connect it to the site finally after consecutive failures and success in the serial monitor. Thanks for the putty advice!
For anyone that has this same problem with arduino mega, check that if the ICSP pins are correctly connected and if the pins you are using are connected to the 50,51,52 and 10 or 53 for ethernet and 4 for sd card.
I tried to edit CayenneDefines.h with texteditor and change arduino.mydevices.com to 54.86.250.218 . But the same problem. Should I include CayenneDefines.h into the sketch?
Ok thank you. I use the normal wifi shield from arduino .
I change only Wifi account and token in the sketch
/*
Cayenne WiFi Example
This sketch connects to the Cayenne server using an Arduino WiFi shield
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:
Set the token variable to match the Arduino token from the Dashboard.
Set the network name and password.
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 <CayenneWiFi.h>
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token = “Token”;
// Your network name and password.
char ssid = “NetworkSSID”;
char password = “NetworkPassword”;
As written, that sketch will not compile. Try this:
/*
Cayenne WiFi Example
This sketch connects to the Cayenne server using an Arduino WiFi shield
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. Set the network name and password.
3. 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 <CayenneWiFi.h>
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "AuthenticationToken";
// Your network name and password.
char ssid[] = "NetworkSSID";
char password[] = "NetworkPassword";
void setup()
{
Serial.begin(9600);
Cayenne.begin(token, ssid, password);
}
void loop()
{
Cayenne.run();
}
Also, we need to know the specific model number of the Wifi shield as there are many of them, plus a few Chinese copies
I have read that you may want to try a better quality USB cable or external supply with these boards.
Also, there is a known issue as well with the firmware, and perhaps the way you set the server. I’ll see if I can find a workaround if an external supply does not work.
I don´t know the exact prduction date of the shield on the board is no date but bought it for one week from a big electro shop .
I use an new USB cable , use additional 12 v power supply .
I installed arduino IDE , cayenne library . Then I took the sketch for WiFISHIELD from cayenne homepage changed only the token ,wifi name and password. uploaded the sketch . Then I saw what serial monitor told me. And everytime :
Good that you were able to connect. Raspberry Pi uses a different server and port though.
Either the board is goofy or you still have network blocking issues around 8442.
Can you try connecting your Uno using the standalone serial sketch. This will see your pc connecting to 8442 instead. Is your PC on wifi, or plugged into your router?
I tried it with arduino mega and arduino leonardo . serial usb connection is possible but with the wifishield no connection to mydevice server. I think the problem is the port because I have a Dual Stack light router connection, but can´t imagine why there are no problems with raspberry port .