Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Announcements
  3. 💬 Building an Ethernet Gateway

💬 Building an Ethernet Gateway

Scheduled Pinned Locked Moved Announcements
133 Posts 42 Posters 36.0k Views 35 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Newzwaver
    wrote on last edited by
    #97

    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?

    1 Reply Last reply
    0
    • I Offline
      I Offline
      itbeyond
      wrote on last edited by
      #98

      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.

      mfalkviddM gohanG 2 Replies Last reply
      0
      • I itbeyond

        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.

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #99

        @itbeyond you'll need to find a way to save flash and ram, or use a microcontroller that has more flash and ram.

        I 1 Reply Last reply
        0
        • I itbeyond

          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.

          gohanG Offline
          gohanG Offline
          gohan
          Mod
          wrote on last edited by
          #100

          @itbeyond you could use a Mega 2560 or use a raspberry pi as gateway (if you already have one)

          1 Reply Last reply
          0
          • mfalkviddM mfalkvidd

            @itbeyond you'll need to find a way to save flash and ram, or use a microcontroller that has more flash and ram.

            I Offline
            I Offline
            itbeyond
            wrote on last edited by
            #101

            @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.

            mfalkviddM 1 Reply Last reply
            0
            • I itbeyond

              @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.

              mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by mfalkvidd
              #102

              @itbeyond probably. I guess the w5100 library uses a lot of ram and flash. The crypto for software signing uses a lot as well.

              1 Reply Last reply
              0
              • AnticimexA Offline
                AnticimexA Offline
                Anticimex
                Contest Winner
                wrote on last edited by
                #103

                Atmga328p is not suitable as a gateway if you want ethernet and security. It simply does not have enough storage.

                Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                E 1 Reply Last reply
                0
                • AnticimexA Anticimex

                  Atmga328p is not suitable as a gateway if you want ethernet and security. It simply does not have enough storage.

                  E Offline
                  E Offline
                  Ed1500
                  wrote on last edited by
                  #104

                  @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

                  AnticimexA 1 Reply Last reply
                  0
                  • E Ed1500

                    @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

                    AnticimexA Offline
                    AnticimexA Offline
                    Anticimex
                    Contest Winner
                    wrote on last edited by
                    #105

                    @Ed1500 I run a gateway on a nano with all security features. But it runs as a serial gateway.

                    Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                    1 Reply Last reply
                    0
                    • I Offline
                      I Offline
                      itbeyond
                      wrote on last edited by
                      #106

                      @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.

                      1 Reply Last reply
                      0
                      • gohanG Offline
                        gohanG Offline
                        gohan
                        Mod
                        wrote on last edited by
                        #107

                        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.

                        I 1 Reply Last reply
                        1
                        • gohanG gohan

                          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.

                          I Offline
                          I Offline
                          itbeyond
                          wrote on last edited by
                          #108

                          @gohan yes I understand perfectly I am a developer and have over 30 years coding experience in about 20 languages. What I find difficult is that there is no detail or documentation on library resource usage so one cannot predetermine the resource requirements when a library or piece of hardware is used. In this great site we have a statement at the top (first sentance) of the Ethernet Gateway page that states "You can build an Ethernet gateway using almost any Arduino model." Well this is not exactly true because if you want to enable some of the library features (ie: signing, and lets face it you should have this enabled if you have any locks or garage doors etc) you will run out of memory in the general models. I am not complaining I just think something so simple should be documented to help other uses look at the right equipment from the outset. In fact all that needs to be written in the first sentence is something as simple as "You can build and Ethernet gateway using almost any Ardunio model however as the Ethernet library uses more resources it would be best to look at a micro controller with greater than 2kb or ram so we recommend a Mega 2560 or similar if you intend to enabled signing or whitelist support."

                          mfalkviddM gohanG 2 Replies Last reply
                          0
                          • I itbeyond

                            @gohan yes I understand perfectly I am a developer and have over 30 years coding experience in about 20 languages. What I find difficult is that there is no detail or documentation on library resource usage so one cannot predetermine the resource requirements when a library or piece of hardware is used. In this great site we have a statement at the top (first sentance) of the Ethernet Gateway page that states "You can build an Ethernet gateway using almost any Arduino model." Well this is not exactly true because if you want to enable some of the library features (ie: signing, and lets face it you should have this enabled if you have any locks or garage doors etc) you will run out of memory in the general models. I am not complaining I just think something so simple should be documented to help other uses look at the right equipment from the outset. In fact all that needs to be written in the first sentence is something as simple as "You can build and Ethernet gateway using almost any Ardunio model however as the Ethernet library uses more resources it would be best to look at a micro controller with greater than 2kb or ram so we recommend a Mega 2560 or similar if you intend to enabled signing or whitelist support."

                            mfalkviddM Offline
                            mfalkviddM Offline
                            mfalkvidd
                            Mod
                            wrote on last edited by mfalkvidd
                            #109

                            @itbeyond or if you add external libraries, or if you use debug, or if you change radio, or if, in the future, any of the used libraries increase in size, but not if, in the future, one or more of the included libraries result in smaller flash or ram usage because then it might work. Or if the Arduino IDE changes the compiler flags, thereby affecting the size - either up or down, or if gcc is in a future release changed so code size is affected.

                            As a programmer, I'm sure you understand that the number of variations increase exponentially, and most of the variables are not under control of the MySensors library.

                            I agree that a message or table would be nice. I just don't see how it would be feasible to construct and maintain it.

                            1 Reply Last reply
                            0
                            • I itbeyond

                              @gohan yes I understand perfectly I am a developer and have over 30 years coding experience in about 20 languages. What I find difficult is that there is no detail or documentation on library resource usage so one cannot predetermine the resource requirements when a library or piece of hardware is used. In this great site we have a statement at the top (first sentance) of the Ethernet Gateway page that states "You can build an Ethernet gateway using almost any Arduino model." Well this is not exactly true because if you want to enable some of the library features (ie: signing, and lets face it you should have this enabled if you have any locks or garage doors etc) you will run out of memory in the general models. I am not complaining I just think something so simple should be documented to help other uses look at the right equipment from the outset. In fact all that needs to be written in the first sentence is something as simple as "You can build and Ethernet gateway using almost any Ardunio model however as the Ethernet library uses more resources it would be best to look at a micro controller with greater than 2kb or ram so we recommend a Mega 2560 or similar if you intend to enabled signing or whitelist support."

                              gohanG Offline
                              gohanG Offline
                              gohan
                              Mod
                              wrote on last edited by
                              #110

                              @itbeyond said in 💬 Building an Ethernet Gateway:

                              "You can build an Ethernet gateway using almost any Arduino model."

                              I believe that "almost" is the right word, since in fact the basic Ethernet gateway can run on many devices but as the requirements increase you need to step up the HW, I don't see it as a big problem: just as you need more IO pins then a standard UNO you go to a Mega2560.

                              1 Reply Last reply
                              0
                              • I Offline
                                I Offline
                                itbeyond
                                wrote on last edited by
                                #111

                                I give up - at least if someone is thinking of building this gateway and wanting to use security they can hopefully read this thread before they start and will look at a higher level controller before they purchase the hardware. I am only trying to help others with what to me is still a simple and easy fix alas I must have upset the apple cart.

                                There is no big problem at all, just that it is really simple to know right now, with technology available today, if you need an Ethernet gateway and signing then use a Mega 2560 or better for the Ethernet Gateway controller to ensure you have the ram. @mfalkvidd - You state variations increase exponentially and most not under library control however using the MySensors Library and building the hardware shown and documented on this page using the sketch provided (completely under control of MySensors) you will need a Mega 2560 or better if you intend to enable signing (also under control of the Library). Do not get me wrong I really love the whole MySensors thing and have over 30 devices up and running and have enjoyed the whole learning thing however simple requirements (IMHO) like this should be detailed.

                                Hopefully this post will help the next person, it certainly would have help me and I am sure I am not the only one.

                                AnticimexA 1 Reply Last reply
                                1
                                • I itbeyond

                                  I give up - at least if someone is thinking of building this gateway and wanting to use security they can hopefully read this thread before they start and will look at a higher level controller before they purchase the hardware. I am only trying to help others with what to me is still a simple and easy fix alas I must have upset the apple cart.

                                  There is no big problem at all, just that it is really simple to know right now, with technology available today, if you need an Ethernet gateway and signing then use a Mega 2560 or better for the Ethernet Gateway controller to ensure you have the ram. @mfalkvidd - You state variations increase exponentially and most not under library control however using the MySensors Library and building the hardware shown and documented on this page using the sketch provided (completely under control of MySensors) you will need a Mega 2560 or better if you intend to enable signing (also under control of the Library). Do not get me wrong I really love the whole MySensors thing and have over 30 devices up and running and have enjoyed the whole learning thing however simple requirements (IMHO) like this should be detailed.

                                  Hopefully this post will help the next person, it certainly would have help me and I am sure I am not the only one.

                                  AnticimexA Offline
                                  AnticimexA Offline
                                  Anticimex
                                  Contest Winner
                                  wrote on last edited by
                                  #112

                                  @itbeyond signing is a completely optional feature of the library. One part of a great many optional features. It is a delicate tradeoff of providing detailed instruction and keeping documentation at a level where users actually care about reading it.

                                  Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                                  1 Reply Last reply
                                  1
                                  • jopebeJ Offline
                                    jopebeJ Offline
                                    jopebe
                                    wrote on last edited by
                                    #113

                                    Hallo,
                                    I`m running this ethernet-gateway with w5100 shield on uno.
                                    In the log of iobroker I always see this message again and again:
                                    mysensors.0 2018-01-26 11:10:58.942 error Error for "192.168.178.133": Error: read ECONNRESET
                                    mysensors.0 2018-01-26 11:10:55.105 info Received INTERNAL message: I_GATEWAY_READY: Gateway startup complete.
                                    mysensors.0 2018-01-26 11:10:55.103 warn ID not found. Inclusion mode OFF: {"id":"0","childId":"255","type":"presentation","ack":false,"payload":"2.1.1","subType":"S_ARDUINO_RELAY"}
                                    mysensors.0 2018-01-26 11:10:55.094 info Connected 192.168.178.133:49153
                                    mysensors.0 2018-01-26 11:10:54.897 error Error for "192.168.178.133": Error: read ECONNRESET
                                    I cannot find a solution in the forum of iobroker and also nothing about it in this forum.
                                    By the way: In the list of objects in iobroker there is always a child id 255 without any state or value.
                                    Is it an issue ?
                                    Perhaps of iobroker?
                                    Any solution?

                                    1 Reply Last reply
                                    0
                                    • gohanG Offline
                                      gohanG Offline
                                      gohan
                                      Mod
                                      wrote on last edited by
                                      #114

                                      Look at the gateway log and see if you get any error

                                      1 Reply Last reply
                                      0
                                      • jopebeJ Offline
                                        jopebeJ Offline
                                        jopebe
                                        wrote on last edited by
                                        #115

                                        Here the log from debug:
                                        0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.1
                                        0;255;3;0;9;TSM:INIT
                                        0;255;3;0;9;TSF:WUR:MS=0
                                        0;255;3;0;9;TSM:INIT:TSP OK
                                        0;255;3;0;9;TSM:INIT:GW MODE
                                        0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
                                        0;255;3;0;9;MCO:REG:NOT NEEDED
                                        IP: 192.168.178.133
                                        0;255;3;0;9;Eth: connect
                                        0;255;3;0;9;MCO:BGN:STP
                                        Can`t find any error.
                                        From here only reading nodes.

                                        1 Reply Last reply
                                        0
                                        • gohanG Offline
                                          gohanG Offline
                                          gohan
                                          Mod
                                          wrote on last edited by
                                          #116

                                          Can you try with latest mysensors 2.2?

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          18

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular