💬 Building an Ethernet Gateway
-
Here thr output of the seriel monitor:
0;255;3;0;9;MCO:BGN:INIT GW,CP=R-NGA--,VER=2.1.1
IP: 192.168.178.134
0;255;3;0;9;Eth: connect
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:REG:NOT NEEDED
0;255;3;0;9;MCO:BGN:INIT OK,TSP=NA
0;255;3;0;9;Eth: 0;101;1;0;2;1
0;255;3;0;9;Eth: 0;101;1;0;2;0
0;255;3;0;9;Eth: 0;101;1;0;2;1
0;255;3;0;9;Eth: 0;101;1;0;2;0
0;255;3;0;9;Eth: 0;101;1;0;2;1
0;255;3;0;9;Eth: 0;101;1;0;2;0
0;255;3;0;9;Eth: 0;101;1;0;2;1
0;255;3;0;9;Eth: 0;101;1;0;2;0
0;255;3;0;9;Eth: 0;101;1;0;2;0
0;255;3;0;9;Eth: 0;101;1;0;2;1
When I push the button in IoBroker-Vis, it takes often a lot of time until the LED is on; sometimes I have to push the button twice or more times; sometimes nothing happens at all.
When I define and connect the radio with the same sketch, it runs as expected. -
Here thr output of the seriel monitor:
0;255;3;0;9;MCO:BGN:INIT GW,CP=R-NGA--,VER=2.1.1
IP: 192.168.178.134
0;255;3;0;9;Eth: connect
0;255;3;0;9;MCO:BGN:STP
0;255;3;0;9;MCO:REG:NOT NEEDED
0;255;3;0;9;MCO:BGN:INIT OK,TSP=NA
0;255;3;0;9;Eth: 0;101;1;0;2;1
0;255;3;0;9;Eth: 0;101;1;0;2;0
0;255;3;0;9;Eth: 0;101;1;0;2;1
0;255;3;0;9;Eth: 0;101;1;0;2;0
0;255;3;0;9;Eth: 0;101;1;0;2;1
0;255;3;0;9;Eth: 0;101;1;0;2;0
0;255;3;0;9;Eth: 0;101;1;0;2;1
0;255;3;0;9;Eth: 0;101;1;0;2;0
0;255;3;0;9;Eth: 0;101;1;0;2;0
0;255;3;0;9;Eth: 0;101;1;0;2;1
When I push the button in IoBroker-Vis, it takes often a lot of time until the LED is on; sometimes I have to push the button twice or more times; sometimes nothing happens at all.
When I define and connect the radio with the same sketch, it runs as expected. -
@gvorster
hello, i'm working on rfm69 (refactorization and adding features), which will support softspi and w5100, and uses a lot less memory. might be available soon. -
My WizNET (W5100) Ethernet module had to be connected to 5v pin on arduino as the 3.3v would only allow ping but not function properly.
-
Thank You to all, who tried to help.
I think, I found the solution:
There was this line in the sketch: "const unsigned long tUpdate=60000; //update interval"
When I changed the time to 6000, it runs as when as the radio was connected.
So it was probably missing some kind of "interrupt", which usually comes from the radio , when it listens to the nodes or so? -
hi everyone,
has the pin setup changed? it looks like it has from the sketch. I used a0, a1 and a2 for the radio.
@Newzwaver Which sketch do you mean? The build page is still using a0, a1, a2 for W5100.
-
Ok, I screwed up and downloaded the latest arduino software 1.8.3 and can't get my libraries to work correctly. I am trying to upgrade my sensors to 2.1.1 and rebuild my gateway using a new nano I put together. I am using the5100 connection with the radio wired to a0..... It the 1.8.3 not to be used for the overseas board?
-
I have just built a W5100 based Ethernet gateway using a pro mini, NRF24LR and I enabled Soft Signinig - using the latest mysensors github development version 2.2.0-beta I am getting Low on memory messages when I compile and load this - if I disable Signing it does not complain. I have noticed several random crashes with signing enabled however i have secure nodes so need singing support. Is there something I am doing wrong or is the latest dev image causing this to occur. I have Debugging all disabled and burning to a stock 5V 16Mhz device.
Sketch uses 25476 bytes (82%) of program storage space. Maximum is 30720 bytes.
Global variables use 1648 bytes (80%) of dynamic memory, leaving 400 bytes for local variables. Maximum is 2048 bytes.
Low memory available, stability problems may occur. -
I have just built a W5100 based Ethernet gateway using a pro mini, NRF24LR and I enabled Soft Signinig - using the latest mysensors github development version 2.2.0-beta I am getting Low on memory messages when I compile and load this - if I disable Signing it does not complain. I have noticed several random crashes with signing enabled however i have secure nodes so need singing support. Is there something I am doing wrong or is the latest dev image causing this to occur. I have Debugging all disabled and burning to a stock 5V 16Mhz device.
Sketch uses 25476 bytes (82%) of program storage space. Maximum is 30720 bytes.
Global variables use 1648 bytes (80%) of dynamic memory, leaving 400 bytes for local variables. Maximum is 2048 bytes.
Low memory available, stability problems may occur. -
I have just built a W5100 based Ethernet gateway using a pro mini, NRF24LR and I enabled Soft Signinig - using the latest mysensors github development version 2.2.0-beta I am getting Low on memory messages when I compile and load this - if I disable Signing it does not complain. I have noticed several random crashes with signing enabled however i have secure nodes so need singing support. Is there something I am doing wrong or is the latest dev image causing this to occur. I have Debugging all disabled and burning to a stock 5V 16Mhz device.
Sketch uses 25476 bytes (82%) of program storage space. Maximum is 30720 bytes.
Global variables use 1648 bytes (80%) of dynamic memory, leaving 400 bytes for local variables. Maximum is 2048 bytes.
Low memory available, stability problems may occur. -
@itbeyond you'll need to find a way to save flash and ram, or use a microcontroller that has more flash and ram.
@mfalkvidd I this just how it is going to be on W5100 if we enable signing support - we must use a different chip? The Ethernet Gateway has nothing but the basic sketch with LED's enabled and soft signing.
-
@mfalkvidd I this just how it is going to be on W5100 if we enable signing support - we must use a different chip? The Ethernet Gateway has nothing but the basic sketch with LED's enabled and soft signing.
-
Atmga328p is not suitable as a gateway if you want ethernet and security. It simply does not have enough storage.
-
Atmga328p is not suitable as a gateway if you want ethernet and security. It simply does not have enough storage.
@Anticimex I do agree. It CAN be used, but it is just a bad choice as the ethernet libraries do not leave much space for much else.
ENC28J60 in that aspect is worse than the W5100.
I tried it more like a proof of concept and it does work pretty well just passing data, but I put everything on an ESP8266. OK, WiFi rather than Ethernet but thats OK for me -
@Anticimex I do agree. It CAN be used, but it is just a bad choice as the ethernet libraries do not leave much space for much else.
ENC28J60 in that aspect is worse than the W5100.
I tried it more like a proof of concept and it does work pretty well just passing data, but I put everything on an ESP8266. OK, WiFi rather than Ethernet but thats OK for me -
@mfalkvidd, @Anticimex & @Ed1500,
Thanks I have ordered a Mega 2560 to use as the gateway. I think it would be super helpful to have the specs better identified in the main topic of the Building and Ethernet Gateway (and other Gateway pages) page - maybe a table with suitable controllers for the most common configurations. It would have saved me the hassle and I am sue I will not be the first to run into this. I too was using a 328p with security via serial and did not even think I would have a problem with memory when converting the Ethernet.
-
In principle it is the same everywhere: the more libraries you add, the more memory you use as it is like you are writing a longer code. It's the basic of programming and arduino ide is reporting how much memory a sketch uses, so you can see yourself how much more memory is used when you add extra libraries.