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. Troubleshooting
  3. Combining Serial and MQTT/Ethernet Gateway

Combining Serial and MQTT/Ethernet Gateway

Scheduled Pinned Locked Moved Troubleshooting
ethernetmqttserial
6 Posts 4 Posters 3.4k Views 2 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.
  • C Offline
    C Offline
    codenea
    wrote on last edited by
    #1

    Hello,

    I'm about to make my first gateway and since I want the flexibility to switch controller, since I'm note sure if I want to run Indigo or OpenHAB, I thought of building a gateway that has the Ethernet module installed on the board. Then if I want to use it as a serial gateway for Indigo I can just re-flash the Arduino with the Serial Gateway firmware instead, and if I want to use MQTT or Ethernet - I'll just re-flash with those firmwares.

    Now since the radio needs to be soldered differently on the Ethernet/MQTT gateway, is it sufficient to just change the pin locations in the Serial firmware? In other words I'll just change the following line:

    MyGateway gw(DEFAULT_CE_PIN, DEFAULT_CS_PIN, INCLUSION_MODE_TIME, INCLUSION_MODE_PIN,  6, 5, 4);
    

    To:

    MyGateway gw(5, 6, INCLUSION_MODE_TIME, INCLUSION_MODE_PIN);
    

    Is that correct? I'm not sure what the 6, 5, 4 pins are for though?

    Also: Is it possible to hook up the MQTT gateway into the router instead, and still let the controller interact with it?

    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      Or you can compile the serial gateway with SOFTSPI enabled if you don't want to rewire.

      C 1 Reply Last reply
      0
      • hekH hek

        Or you can compile the serial gateway with SOFTSPI enabled if you don't want to rewire.

        C Offline
        C Offline
        codenea
        wrote on last edited by
        #3

        @hek Hmm, what do you mean? That I build the Ethernet Gateway, and when I want to Serial fw, I compile it with SOFTSPI so I don't need to change pin locations?

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

          I made a GW sketch that could handle serial and ethernet simultaneously (by reboot). If ethernet cannot obtain IP through DHCP (cable not inserted) it reverts to acting as serial GW. Unfortunately, ethernet GW sketch with DHCP is too big to fit an Arduino Nano without some form of tweaking to the code (on development branch). For that reason I have not published my sketch.
          But it is not that difficult to merge the two sketches anyway if you wanted to try it.

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

          1 Reply Last reply
          0
          • L Offline
            L Offline
            lafleur
            wrote on last edited by
            #5

            any chance you can send me the dual serial/ethernet code?

            Thanks

            AnticimexA 1 Reply Last reply
            0
            • L lafleur

              any chance you can send me the dual serial/ethernet code?

              Thanks

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

              @lafleur I abandoned it due to the fact that my Nano cannot fit it together with signing support.

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

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


              8

              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