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. Feature Requests
  3. Controller IP auto-discovery for EthernetGW

Controller IP auto-discovery for EthernetGW

Scheduled Pinned Locked Moved Feature Requests
ethernetcontrollerethernetgateway
20 Posts 4 Posters 8.8k Views 1 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.
  • daulagariD Offline
    daulagariD Offline
    daulagari
    Hero Member
    wrote on last edited by
    #11

    @Zen : Agreed UPnP is overkill (but would be cool), your approach is much simpler and therefore better but what would be good is to standardize on something so Controller can add support for it.

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      Zen
      wrote on last edited by
      #12

      @daulagari
      I am all for a standard way of doing this, but as present Ethernet Library implementation we have to alter our libraries to support multicast broadcasts, and therefore it is not possible to do a standardized implementation, since it wont be compatible with the current Ethernet Libraray.

      We have to wait for the library to include this functionality, or come up with a way to do this without multicast and still keep it small.

      nneeooN 1 Reply Last reply
      0
      • Z Zen

        @daulagari
        I am all for a standard way of doing this, but as present Ethernet Library implementation we have to alter our libraries to support multicast broadcasts, and therefore it is not possible to do a standardized implementation, since it wont be compatible with the current Ethernet Libraray.

        We have to wait for the library to include this functionality, or come up with a way to do this without multicast and still keep it small.

        nneeooN Offline
        nneeooN Offline
        nneeoo
        wrote on last edited by
        #13

        @Zen
        Multicast and broadcast are two different things. You can broadcast a packet by sending it to a broadcast IP address of the network you are on.

        So if you are on network 192.168.1.0/24, the broadcast address will be 192.168.1.255. Then the controller listening on a socket with IP address from that network should get it.

        I think it can be achieved by simply sending a special (new) internal message from GW to the broadcast IP address using UDP (we should use some specific port all the time). The Controller will get it and respond to with the same type of internal message that can contain its IP address (or GW can extract the IP from response).

        The first step from my point of view is adding a new internal message type. I will try out my ideas during the weekend and if working create a pull request on Github. I wanted to get some feedback, since I think it might be an interesting Feature, rather than hard-coding everything into GW.

        Z 1 Reply Last reply
        0
        • nneeooN nneeoo

          @Zen
          Multicast and broadcast are two different things. You can broadcast a packet by sending it to a broadcast IP address of the network you are on.

          So if you are on network 192.168.1.0/24, the broadcast address will be 192.168.1.255. Then the controller listening on a socket with IP address from that network should get it.

          I think it can be achieved by simply sending a special (new) internal message from GW to the broadcast IP address using UDP (we should use some specific port all the time). The Controller will get it and respond to with the same type of internal message that can contain its IP address (or GW can extract the IP from response).

          The first step from my point of view is adding a new internal message type. I will try out my ideas during the weekend and if working create a pull request on Github. I wanted to get some feedback, since I think it might be an interesting Feature, rather than hard-coding everything into GW.

          Z Offline
          Z Offline
          Zen
          wrote on last edited by
          #14

          @nneeoo
          I am well aware of this, but it requires you to actually know the broadcast address of your segment.

          In multicast you choose the multicast address you want to use, and this is regardless of your segment, which actually makes it abit easier.

          JohnJ 1 Reply Last reply
          0
          • Z Zen

            @nneeoo
            I am well aware of this, but it requires you to actually know the broadcast address of your segment.

            In multicast you choose the multicast address you want to use, and this is regardless of your segment, which actually makes it abit easier.

            JohnJ Offline
            JohnJ Offline
            John
            Plugin Developer
            wrote on last edited by
            #15

            @Zen
            Use the mask to determine the broadcast ip.

            Instead of multicast use anycast, this way you do not have to keep track of interested parties.

            UPNP is also a possibility, it does not automatically implies router configuration options. Only implementing presence would suffice. All though space on the chips should then be looked at.

            [JUSTATHOUGHT]
            UPNP could also cover a bigger range of possible options where not only specific mysensor controllers can jump in to, but also other applications. UPNP enabled devices could see a MySensors gateway (it is even possible you will see it in your windows network discovery). I'm not saying to implement an UPNP subset, but broaden the gateway visibility.

            I for example are going to implement UPNP for media discovery, or even other possible devices support so adding components/devices can be easier, having MySensors doing UPNP would let it appear on the list.
            [/JUSTATHOUGHT]

            My Domotica project: http://www.pidome.org

            Z 1 Reply Last reply
            0
            • JohnJ John

              @Zen
              Use the mask to determine the broadcast ip.

              Instead of multicast use anycast, this way you do not have to keep track of interested parties.

              UPNP is also a possibility, it does not automatically implies router configuration options. Only implementing presence would suffice. All though space on the chips should then be looked at.

              [JUSTATHOUGHT]
              UPNP could also cover a bigger range of possible options where not only specific mysensor controllers can jump in to, but also other applications. UPNP enabled devices could see a MySensors gateway (it is even possible you will see it in your windows network discovery). I'm not saying to implement an UPNP subset, but broaden the gateway visibility.

              I for example are going to implement UPNP for media discovery, or even other possible devices support so adding components/devices can be easier, having MySensors doing UPNP would let it appear on the list.
              [/JUSTATHOUGHT]

              Z Offline
              Z Offline
              Zen
              wrote on last edited by
              #16

              @John
              But in anycase, I have only 1190 bytes left, and this is with debugging disabled.

              I was hoping I could get a simplified serial library going to show the ip on a lcd aswell, but I am guessing this is more or less a no go.

              JohnJ 1 Reply Last reply
              0
              • Z Zen

                @John
                But in anycase, I have only 1190 bytes left, and this is with debugging disabled.

                I was hoping I could get a simplified serial library going to show the ip on a lcd aswell, but I am guessing this is more or less a no go.

                JohnJ Offline
                JohnJ Offline
                John
                Plugin Developer
                wrote on last edited by
                #17

                @Zen
                Oh.. Dealbreaker, A bigger reason to do anycast (if going for the *cast route), It ain't possible to squeeze a broadcast calculator in it if the multicast code would be removed?

                My Domotica project: http://www.pidome.org

                Z 1 Reply Last reply
                0
                • JohnJ John

                  @Zen
                  Oh.. Dealbreaker, A bigger reason to do anycast (if going for the *cast route), It ain't possible to squeeze a broadcast calculator in it if the multicast code would be removed?

                  Z Offline
                  Z Offline
                  Zen
                  wrote on last edited by
                  #18

                  @John
                  well I am not all that familiar with anycast, is that the same as the segment's broadcast address ?

                  JohnJ 1 Reply Last reply
                  0
                  • Z Zen

                    @John
                    well I am not all that familiar with anycast, is that the same as the segment's broadcast address ?

                    JohnJ Offline
                    JohnJ Offline
                    John
                    Plugin Developer
                    wrote on last edited by
                    #19

                    @Zen
                    anycast is almost like broadcast, but with some restrictions. The most important one is broadcast (old convention method) does not care who where anycast does. More info here (too much to post): http://en.wikipedia.org/wiki/Anycast

                    My Domotica project: http://www.pidome.org

                    1 Reply Last reply
                    0
                    • nneeooN Offline
                      nneeooN Offline
                      nneeoo
                      wrote on last edited by
                      #20

                      If anyone is interested in trying out the implementation using UDP packets sent to the subnet broadcast address, check out my pull request https://github.com/mysensors/Arduino/pull/66

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


                      12

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.1k

                      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