My "hybrid" gateway


  • Contest Winner

    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):

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


  • Hero Member

    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?


  • Contest Winner

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


  • Contest Winner

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


  • Contest Winner

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


  • Admin

    @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 :))


  • Hero Member

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


  • Contest Winner

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


  • Contest Winner

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



Suggested Topics

  • 69
  • 16
  • 6
  • 1
  • 9
  • 8
  • 8

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts