BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Arduino Due + W5500 lost connection without serial cable

#5

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.

0 Likes

#6

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.

0 Likes

#7

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)

0 Likes

#8

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");
    }
    }
0 Likes

#9

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

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

http://docs.blynk.cc/#blynk-firmware-configuration

0 Likes

#10

i use Blynk.begin

0 Likes

#11

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.

0 Likes

#12

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

0 Likes

#13

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.

0 Likes

#14

there are no example programs?

0 Likes

#15

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.

0 Likes

#16

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

1 Like

#17

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

Pete.

0 Likes

#18

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: )

0 Likes

#19

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.

0 Likes

#20

image

Pete.

0 Likes

#21

Ha ha ha the W5500

0 Likes

#22

I was thinking more about the Arduino Due :slightly_smiling_face:

Pete.

0 Likes

#23

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:

0 Likes

#24

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.

0 Likes