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. My Project
  3. My "hybrid" gateway

My "hybrid" gateway

Scheduled Pinned Locked Moved My Project
w5100serialgatewaydhcppcbethernetgateway
9 Posts 4 Posters 6.7k 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.
  • AnticimexA Offline
    AnticimexA Offline
    Anticimex
    Contest Winner
    wrote on last edited by Anticimex
    #1

    My gateway build project has progressed far enough to be "announced".
    Goal of the project: To create a gateway that is capable of providing serial/Ethernet/MQTT capabilities and securely authenticated transmissions. Because I like a challenge, I am doing this on a Arduino Nano. So far I have managed to squeeze in a sketch that can handle both serial and HDCP capable Ethernet (gateway becomes a serial if it cannot aquire an IP through DHCP). I am hoping to also fit MQTT code into it but I am not sure that is possible since I also want to put in a driver for my authentication chip and probably need a software SHA256 algorithm as well. But as the USB connector will be exposed, I can live with having to reprogram it, should I need to.

    The bill of material is as follows (may be updated as build progresses):

    • 1 Arduino Nano
    • 1 NRF23L01 PA-enabled radio transceiver
    • 1 W5100 Ethernet module
    • 1 LE33 regulator
    • 1 ATSHA204 authentication chip (on breakout board)
    • 1 Red LED
    • 1 Green LED
    • 1 Yellow LED
    • 3 330Ω resistors
    • 2 0Ω resistors (optional)
    • 2 4.7uF capacitors
    • 1 100pF capacitor
    • 1 10pF capacitor
    • 2 pushbuttons
    • 1 Adafruit half-size perma-proto PCB
    • A few meters of leads suitable for PCB wiring
    • Male/Female pin headers (cut to various sizes)
    • Heat shrink tubing

    This is the schematic:
    MySensorsGW.png
    also available on GitHub. gEDA is the tool used throught the HW design.
    Symbols and custom footprints are also on GitHub.

    I have modeled the perma-proto in the gEDA PCB tool in order to figure out the optimum wiring with respect to holes, component placement and wire widths and to make sure I do not miss any connection (almost every interconnect needs to be handwired/soldered).
    This is the top and bottom placements:
    MySensorsGW-placement-top.png
    MySensorsGW-placement-bottom.png

    And the routing of the sides (routing is done with respect to hand wiring and component clearances due to thick cables, hence the sometimes less-than-optimal routing paths). Also note that the back-side routing is displayed as viewed from the top.
    MySensorsGW-routing-top.png
    MySensorsGW-routing-bottom.png
    Start by cutting the PCB on the bottom side so that the modules can be inserted without shorts:
    P_20141011_173044.png
    P_20141011_173102.png

    After a few man-hours cutting and soldering:
    P_20141022_204532.png
    P_20141022_204544.png

    Top side with components:
    P_20141106_202525.jpg
    The LEDs are "tall" because I have not yet decided on exact box format, so this gives me some flexibility in positioning/aligning the LEDs.

    Bottom side with components:
    P_20141106_202635.jpg

    The antenna connector aligns with one of the ground-rails, so it can be soldered down on the board as well to provide additional support for the RF module:
    P_20141106_202927.jpg

    Gateway sketch has been updated to manage the ETH_SPI_EN signal. Available on GitHub. Please note that I will at my own leisure do force-pushes to this branch, so if you clone it; you have been warned. You are welcome to copy it anyway you like.

    Also note that the ATSHA204_SDA has been moved from A7 to A3 so the graphics above are not entirely true (but GitHub is).

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

    1 Reply Last reply
    3
    • daulagariD Offline
      daulagariD Offline
      daulagari
      Hero Member
      wrote on last edited by
      #2

      Nice projects and good to see that you can combine a serial and Ethernet gateway, although I am not so sure what is the use-case ;-)

      The ATSHA204 chip has SHA1 and an unique 72-bit serial number and is low-cost and low-current, nice chip. Yes, with that you can do authentication, already some ideas on how to fit in into the packets?

      AnticimexA 1 Reply Last reply
      0
      • daulagariD daulagari

        Nice projects and good to see that you can combine a serial and Ethernet gateway, although I am not so sure what is the use-case ;-)

        The ATSHA204 chip has SHA1 and an unique 72-bit serial number and is low-cost and low-current, nice chip. Yes, with that you can do authentication, already some ideas on how to fit in into the packets?

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

        @daulagari actually the at chip does sha256. I have posted a link to a sequence diagram showing how one could implement message signing and authentication in the security thread.
        About the serial/ethernet thing, it is more for fun and to not have to bring the gw to the computer for reprogramming should I like to switch mode of operation.

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

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

          EDIT: Updated with more pictures. The electrical build is now complete. GitHub is also updated with the HW design.

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

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

            EDIT 2: I found out the hard way that pin A7 cannot be used for digital IO. So I had to patch the ATSHA204 signal to use A3 insterad (this also matches other MySensors HW that uses ATSHA204, ping @tbowmo).

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

            bjornhallbergB 1 Reply Last reply
            1
            • tbowmoT Offline
              tbowmoT Offline
              tbowmo
              Admin
              wrote on last edited by
              #6

              @Anticimex

              Same thing hapenned to me on the first Mysensors Micro board, I had attached a LED to A6, which is also only an input pin.. So Had to hack things, in order to get it working (it also sparked of a new iteration of the PCB, which now includes the atsha204, so something good came out of it anyways :))

              1 Reply Last reply
              1
              • AnticimexA Anticimex

                EDIT 2: I found out the hard way that pin A7 cannot be used for digital IO. So I had to patch the ATSHA204 signal to use A3 insterad (this also matches other MySensors HW that uses ATSHA204, ping @tbowmo).

                bjornhallbergB Offline
                bjornhallbergB Offline
                bjornhallberg
                Hero Member
                wrote on last edited by
                #7

                @Anticimex How do you manage SPI_EN from software? I seem to have run into the same problem with SPI and the Ethernet gateway (despite having run the MQTT gateway for months with no issue). Thinking of doing the hardware hack on the ethernet shield to avoid soft spi (better to solder one more wire than de-solder and re-solder a bunch of wires).

                AnticimexA 1 Reply Last reply
                0
                • bjornhallbergB bjornhallberg

                  @Anticimex How do you manage SPI_EN from software? I seem to have run into the same problem with SPI and the Ethernet gateway (despite having run the MQTT gateway for months with no issue). Thinking of doing the hardware hack on the ethernet shield to avoid soft spi (better to solder one more wire than de-solder and re-solder a bunch of wires).

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

                  @bjornhallberg i am going to put my gw hacks on a branch and publish it on github. I'll post a link when that's done.

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

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

                    Original post is now updated (look at the bottom of it). (ping @bjornhallberg)

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

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


                    10

                    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