Local server limit?

You are mistaken and you have even confirmed it works fine.

I have around 50 Nano clones but only one ENC and that’s normally hooked up to a Mega.

Start by sending a QR code for a clone of your basic project.

Then set up just 2 Nano’s with different tokens and the same sketch. Maybe shoot a short video to demonstrate your problem.

I’ve confirmed it works fine alone, the problem is with two or more devices online.
I’ll do the QR and lab, but already spend a lot of time… and obviously, nobody here works with two ENC on the same server…

Are you sure you are giving them unique LAN IP addresses?

Maybe try USB for one Nano and ENC for another to see what results you get.

Hi,
Sure about the IP settings. And never tried with USB… will have to look about how to do that.
And will also test with just two ENC with the lightest sketch as here above.

Hi @Costas, I disconnected everything on the server and created a new basic project for 2 NANO+ENC.
(Note that the NANOs run on optiboot 32-pin cpu, don’t know if it matters)
The 2 NANOs and rasp zero server are connected on local intranet with short and good cables directly on a good switch :slight_smile:
I uploaded these basic sketchs with just token, mac and IP changing for each.

//TEST STABILITY "BLYNK_WRITE(Vx)" ENC1

//<<LIBRARIES>>
#define BLYNK_PRINT Serial    // Comment this out to disable prints and save flash space
#define BLYNK_DEBUG           // Comment this out to disable prints and save flash space
#define BLYNK_NO_BUILTIN        // Disable built-in analog & digital pin operations to spare flash space
#define BLYNK_NO_FLOAT          // Disable float operations to spare flash space
#define BLYNK_NO_INFO           // Skip device info to spare flash space
#include <BlynkSimpleUIPEthernet.h>   // ENC28J60 ethernet BLYNK library
#include <MemoryFree.h>

  unsigned long lastRunTime=50000;   // mémoire du timing de la dernière requête au NANO Slave
  unsigned long currentTime;
  byte x=0;
  
void setup() {
  Serial.begin(9600);                          
  Ethernet.begin("DE:ED:BA:FE:AA:C1", IPAddress(192,168,0,61),IPAddress(192,168,0,1),IPAddress(192,168,0,1),IPAddress(255,255,255,0));   
  Blynk.config("b133bd19110c4e38876e5bbb9556426b", "192.168.0.17", 8442);    
} 

BLYNK_WRITE(V27){ //TEST COMMAND
int buttonstate = param.asInt();  
  if (buttonstate == 1) {
    x=0;   
  } 
}

void loop(){  
currentTime = millis();
  
while (Blynk.connected()==false) {Blynk.disconnect(); Blynk.connect();} 
Blynk.run(); 
 
  if ((currentTime - lastRunTime >= 60000) ){     //timer low-cost  
    lastRunTime = currentTime;
    x++;
    Blynk.virtualWrite(V0, x);    //nbre minutes       
    }      
}

The results are quite similar than before.
Very fast BLYNK_WRITE() work very well with only one ENC connected to server.
image

154273] >vw[00]27[00]1
[154323] >[14|00|B4|00|07]
[154324] >vw[00]27[00]0
[154451] >[14|00|B5|00|07]
[154452] >vw[00]27[00]1
[154503] >[14|00|B6|00|07]
[154504] >vw[00]27[00]0
[154618] >[14|00|B7|00|07]
[154620] >vw[00]27[00]1
[154692] >[14|00|B8|00|07]
[154693] >vw[00]27[00]0
[154774] >[14|00|B9|00|07]
[154775] >vw[00]27[00]1
[154961] >[14|00|BA|00|07]
[154962] >vw[00]27[00]0
[154963] >[14|00|BB|00|07]
[154979] >vw[00]27[00]1
[155024] >[14|00|BC|00|07]
[155034] >vw[00]27[00]0
[155201] >[14|00|BD|00|07]
[155202] >vw[00]27[00]1
[155203] >[14|00|BE|00|07]
[155218] >vw[00]27[00]0
[155359] >[14|00|BF|00|07]
[155361] >vw[00]27[00]1
[155361] >[14|00|C0|00|07]
[155377] >vw[00]27[00]0
[155548] >[14|00|C1|00|07]
[155560] >vw[00]27[00]1
[155561] >[14|00|C2|00|07]
[155566] >vw[00]27[00]0
[155624] >[14|00|C3|00|07]
[155625] >vw[00]27[00]1
[155761] >[14|00|C4|00|07]
[155762] >vw[00]27[00]0
[155805] >[14|00|C5|00|07]
[155806] >vw[00]27[00]1
[155961] >[14|00|C6|00|07]
[155962] >vw[00]27[00]0
[156264] <[06|00|13|00|00]
[156297] >[00|00|13|00|C8] 

The problems begin after connecting the second one.
I noticed it seems a bit better responding than with my prod devices connected, but it’s still obvious that something runs bad. The commands works one time on two.
Before heartbeat, I’ve always these 3 times “<[06|00|xx|00|00]” that I don’t have with the single device connected.

image
image

[540417] <vw[00]0[00]1
[542017] <[06|00|0D|00|00]
[542050] >[00|00|0D|00|C8]
[552018] <[06|00|0E|00|00]
[554019] <[06|00|0F|00|00]
[556020] <[06|00|10|00|00]
[556956] >[14|01|16|00|07]
[556957] >vw[00]27[00]1
[556958] >[14|01|17|00|07]
[556975] >vw[00]27[00]0
[566022] <[06|00|11|00|00]
[568023] <[06|00|12|00|00]
[570024] <[06|00|13|00|00]
[572025] <[06|00|14|00|00]
[573000] Heartbeat timeout: 573000, 556999, 572025
[573023] Disconnected
[577026] Connecting to 192.168.0.17:8442
[577548] <[02|00|01|00] 
[577549] <b133bd19110c4e38876e5bbb9556426b
[577586] >[00|00|01|00|C8]
[577587] Ready (ping: 34ms).
[577614] Free RAM: 521
[587554] <[06|00|02|00|00]
[587586] >[00|00|02|00|C8]
[597555] <[06|00|03|00|00]
[597587] >[00|00|03|00|C8]
[600416] <[14|00|04|00|06]
[600417] <vw[00]0[00]1
[607588] <[06|00|05|00|00] 

So I don’t have yet tested with the USB connection as suggested, but that’s already obvious that if it’s already not working perfectly with a so simple sketch on only two devices, it will never works well with real projects no?

Wrong.

You have something kicking in every 2 seconds.

Are either of the display widgets set to refresh at 2 second intervals because if they are it will crash your system. You can have automatic updates or write updates to the system, but not both.

I only have two buttons and two display widgets (in push mode).
If you talk about these things->
[552018] <[06|00|0E|00|00]
[554019] <[06|00|0F|00|00]
[556020] <[06|00|10|00|00]
, it happens only when I push the button. I thought it was the heartbeat that was trying 3 times because no response… and finnaly lead to heartbeat timeout.

When I don’t press the button, and let just the virtualwrite(V0) triggers each 60sec, everything works fine and I just have this each 10sec->
[587554] <[06|00|02|00|00]
[587586] >[00|00|02|00|C8]
[597555] <[06|00|03|00|00]
[597587] >[00|00|03|00|C8]
I interpretes this as the heartbeat that works every 10sec, followed by the response OK…

I don’t read clearly the serial logs, where may I see this thing kicking each 2 seconds?

From your earlier post I see the 2s here:

[566022] <[06|00|11|00|00]
[568023] <[06|00|12|00|00]
[570024] <[06|00|13|00|00]
[572025] <[06|00|14|00|00]

Paste your QR code for a clone of the project.

This is a strange way of laying-out your Ethernet.begin() statement, but each to their own!

Each device will need a different IP address for the board (in the example above the bit that says “192,168,0,61”. You should also assign a different MAC address to each device or the ARP table in your router will get confused. This is the bit that says “DE:ED:BA:FE:AA:C1” in the example above.

The IP and MAC also needs to be different from all other devices on your internal network, so it’s a good idea to use an IP scanner such as:

Pete.

3 Likes

Here it is
image

Thanks Pete, I use different IP and MAC for each device. I’ve still checked all my sketches yesterday.
I know it’s not the most direct way of connecting, but by doing that I spare more than 2.5k memory for the sketch.
And with the NANO+ENC and its hevy library, it’s really necessary. It’s a good tip that a blynker has shared in another post.

That’s the QR code for sharing the project not cloning the project.

image

sorry

@PeteKnight you and the linked little tool are great!
image

I must do something wrong with
Ethernet.begin(“DE:ED:BA:FE:AA:A1”,IPAddress(192,168,0,51),IPAddress(192,168,0,1),IPAddress(192,168,0,1),IPAddress(255,255,255,0));
The MAC config are not taken into account and are all same on devices.

I’ll check and try tomorrow if it resolves my BLYNK_WRITE issue. I hope it will… it must…

1 Like

I’ll take that as a compliment, but don’t tell everyone about the size of the tool :disappointed_relieved:

You don’t say what you’ve been changing the MAC address to for the other devices, but In this post, there’s an interesting comment…

It says to only change the last two digits of the MAC address. I have no idea why that should be the case, unless it’s a limitation of the library, but might be worth taking note of.
If you’re still having problems then maybe go back to the standard way of declaring the MAC and IP addresses, at least for testing purposes?

Pete.

1 Like

Busted :rofl::rofl::joy:

1 Like

It’s not like if other people were listening no? :smiley:

It’s the end of the tunnel. Everything works perfectly since I changed the MAC! The cat is happy, my wife too, the sun is shinning and I’ve even lost 1 pounds on my balance.

I’m really happy to have totaly finish the job with the NANOs & ENC.
I start now to play with the ESP8266, and I find it really promising :slight_smile:
So thanks all and sorry to had doubt about the wonderfull BLYNK!

2 Likes

What more could you want?

Glad you stuck with it and resolved the problem, and glad we were able to point you in the right direction.

Pete.

@PeteKnight

Tips:

  1. Using single ENC28J60 or other Arduino device on the same network without changing the original MAC address “No Problem”
  2. Using Multiple ENC28J60 or other Arduino device on the same network without changing the original MAC address will be having problem like i.e “heartbeat timeout” the thing is the destination mac address is duplicated. (you will be having single mac address in a multiple I.P address. the Blynk server now thinking and become crazy where to send the request, from this I.P? or to that I.P?)
    MAC address must be unique from each other network devices.

The First 3 column of MAC address are the Manufacturer identifier code i.e 0xDE, 0xED, 0xBA (DE:ED:BA)
and the last 3 more column are the unique network device identity address i.e 0xFE, 0xAA, 0xA1 (FE:AA:A1)

MAC address can be like i.e
Device -1 ENC28J60 = MAC 0xDE, 0xED, 0xBA,0xFE, 0xAA, 0xA1
Device -2 ENC28J60 = MAC 0xDE, 0xED, 0xBA,0xFE, 0xAA, 0xA2
Device -3 ENC28J60 = MAC 0xDE, 0xED, 0xBA,0xFE, 0xAA, 0xA3
Device -4 EtherW5100 = MAC 0xDE, 0xED, 0xBA,0xFE, 0xAA, 0xA4
Device -5 EtherW5100 = MAC 0xDE, 0xED, 0xBA,0xFE, 0xAA, 0xA5

1 Like

This is I’m pointing of for multiple network devices without changing the mac.