Arduino don´t connect to mydevices


#1

Hello experts,

I´ve been trying to fix this with no luck. Have searched in the community but nothing like my problem.

Using Arduino Mega board + ENC28J60 ethernet module. It works in another location/internet connection with no problem. When I try in my home it doesn´t connects.

I can see in my router that Arduino it´s getting one IP and I can ping it from my PC. Also Putty can reach arduino.mydevices.com from my PC.

Don’t know why my serial monitor doesn’t displays anything so I’m not able to troubleshoot what is going on. Could any of you kindly check my code to see if is there anything that is preventing the monitor to display data?

Thanks and my very best regards,
Fernando


#2

code.txt (2.3 KB)

The code…


#3

Can you verify that port 8442 is open on your network? This is necessary for communication with our Arduino server.


#4

Hello, yes it’s open as I can pass the Putty test right? Should I try to
put a static IP and DMZ test on it?

Another way to test the port?


#5

Hello, to view data in serial monitor, please verify the speed of the window when you open the serial monitor - it is in bottom. It should be the same as the one specified in your code (9600).

For internet access, could you first try to delete the Blynk library that you include and just left only the ones that Cayenne uses?


#6

Hello,

so I have removed the ENC28J60 ETH module and replaced by a W5100 ETH shield. So I was able to see the Serial monitor messages:

[0] MAC: FE-64-6C-C5-DB-9A
[0] Getting IP…
[5628] My IP: 192.168.0.17
[5628] Connecting to arduino.mydevices.com:8442
[20661] Connecting to arduino.mydevices.com:8442
[35681] Connecting to arduino.mydevices.com:8442
[50701] Connecting to arduino.mydevices.com:8442
[65721] Connecting to arduino.mydevices.com:8442

What are the more common problems when you see this? ISP related? I also removed my router to get the IP directly from my ISP modem and still the same problem.

I also had one security NVR configured here using DDNS so I have removed everything to not interfer in the connection test.

Br,
Fernando


#7

Can you ping your device from another device in the network?


#8

Hello guys,

I fixed the connection problem replacing DNS name by the IP in Cayenne
define. So basically this was a DNS problem that the Putty wasn’t
appropriate do detect it since the computer can solve DNS by itself.

Thanks again.


#9

Glad to hear you figured it out, thanks for updating us. That’s good to know for future troubleshooting with other users.


#10

Hello guys,

my Arduino it´s going offline again.

When I boot and look into serial messages it shows connection success but after some seconds it start to show connection failure messages and device go offline.

code.txt (5.6 KB)

Appreciate any help.

Br,


#11

Saw this in another related post:

“I insert delay(3000) in loop to prevent overcharge and issue of offline”

Could the excess of information be braking the connection somehow?

Br,


#12

Hello guys, I figured out that was part of my code that was breaking the connection. Just removed that part and it started to work again.

Br,


#13

The delay ?


#14

This part of the code was removed and them started to work:

/*
CAYENNE_OUT(V10)
{
{
int SensorValue = analogRead(A1); //take a sample
//Serial.print(SensorValue); Serial.print(" - ");

if(SensorValue >= 1000) {
 //Serial.println("Sensor is not in the Soil or DISCONNECTED");
}
if(SensorValue < 1000 && SensorValue >= 800) { 

// Serial.println(“Soil is DRY”);
}
if(SensorValue < 800 && SensorValue >= 550) {
//Serial.println(“Soil is HUMID”);
}
if(SensorValue < 550) {
//Serial.println(“Sensor in WATER”);
}
delay(50);

int soilMoisture = map(SensorValue, 500, 1023, 0, 100);

analogWrite(V10, soilMoisture);

delay(1000);
}
}

*/

Not sure exaclty how it was impacting. Will try to troubleshoot whenever I have more time.

Br,


#15

Hi,

just sharing, i have intermittent connection issues (basically always reconnecting) but i got stable connection when i remove reading and sending ADC value to the server.

if anyone have any fix regarding this, please share, thank you.