Arduino Due + W5500 lost connection without serial cable

Could be a Arduino Yun and/or networking thing? Perhaps power as when disconnected from the USB it will run off of whatever else you supply, and perhaps that isn’t up to the challenge?

I don’t have a Yun and have no other ideas.

I don’t think it’s a power problem, I’ve been using this hardware for several years but with competing software.
then after this software was updated I had problems connecting to my ISP.
so I decided to change software.
I don’t think power because after Arduino disconnects if I connect the USB cable it doesn’t reconnect, I have to open the serial monitor.
I think more of a bug on the library that runs the W5500 that from what I see in the forum is little used.

Blynk is constantly communicating across the device, unlike some other apps or programs. This will make hardware instabilities stand out quicker.

I ditched mine years ago as even USB link was super stable compared to my Chinese Ethernet adapter… which did work with basic Arduino examples, just not with Blynk’s constantly-in-use link.

The adapters are generally the issue, particularly the Chinese clones. Many using the Arduino original ethernet shields, and even some lucky clones, can run with that library and no issue… others find them unstable if you look at it sideways.

All this means is that you just rebooted the Arduino… that is a normal result when opening the Serial Monitor with an Arduino.

You can search this forum for some possible “After Blynk disconnection, keep code running and attempt reconnection” options that will even work with Arduino with shield (although generally meant for ESP and WiFi)

today the device has remained connected without a USB connection from 11:00 to 18: 40.
I already use an automatic reconnection system:

    void CheckConnection(){  // connection control and general synchronism******
      if(!Blynk.connected())
    {
    Serial.println("Not connected to Blynk server"); 
    connected = 0;
    isFirstConnect = 1;
    Blynk.connect();  // try to connect to server with default timeout
      } 
    else{ connected = 1;
    if ( isFirstConnect ==1) { 
    Blynk.syncAll();
    isFirstConnect = 0;
    Serial.println("Connected to Blynk server");
    }
    }

I formatted your post as (again) it is required for code…

Are you using Blynk.begin() or Blynk.config() ?

i use Blynk.begin

It is a blocking command, no connection no further processing, so your reconnection routine may not work once you loose connection.

Look at the Blynk.config() option.

I replaced Blynk.begin (auth); with Blynk.config (auth, “blynk-cloud.com”, 8442); but the device has no longer connected.

in the serial monitor I have this:

[5001] Connecting to blynk-cloud.com:8442
[10002] Connecting to blynk-cloud.com:8442
Not connected to Blynk server
[15003] Connecting to blynk-cloud.com:8442
[20004] Connecting to blynk-cloud.com:8442
Not connected to Blynk server
[25005] Connecting to blynk-cloud.com:8442
[30006] Connecting to blynk-cloud.com:8442

As per the docs, you need to establish your own network connection prior to that command. I have long forgotten how that is done with ethernet, but I am sure you can figure it out as it will be the same way as with non-Blynk code.

there are no example programs?

Not in the Sketch Builder. Just connecting to ethernet is not a Blynk specific process.

So aside from the Blynk.Begin() method that does it for you as part of the connection package (using basic DHCP), you can easily search this forum to see if/how others have done it other ways.

I give up understanding what’s wrong, I’m ordering an ESP8266

1 Like

Hopefully something like a NodeMCU or Wemos D1 Mini, so that the Due can go in the bin along with the W5500?

Pete.

Oh… nooo… everyone, please send me all old Arduinos you would otherwise dispose of, I use them for lots of things besides (and including) IoT :stuck_out_tongue: (JK of course, while I would gladly take them, the shipping would make it a invalid proposition :frowning: )

I replaced the w5500 with a w5100, now it’s much more stable and faster but if I reset the system it doesn’t connect by itself.

always needs to start the serial monitor.

image

Pete.

1 Like

Ha ha ha the W5500

I was thinking more about the Arduino Due :slightly_smiling_face:

Pete.

Heck, I wish I had one… it is a much faster version of the Mega (32 bit), more memory and with 3.3v GPIO, it merges better with combined ESP and related sensor setups. And a metric butt ton of GPIO :wink:

Again, that is basically just restarting the Arduino. pressing the reset button will do the same thing.

There are Googleble ways to reset Arduinos via code. So, as long as you have coded yours to keep running, even without blynk connection, then you can have a running check and/or timer that if after x amount of time with no Blynk connection, then it will process a reset command.

1 Like