How to build raspberry gw 2.0.0

  • Hi, just want to create using - gateway on raspberry pi in version 2.0.0. I've done git clone then git checkout 2.0.0 - but there isn't .configure file and I don't know how to make it to work for me.
    Can anyone help me?
    Second way is to leave gw in newest version(2.1.1) and upgrade code in my node but I don't know how becouse my node is for version 2.0gw. I can post that code if anyone know how to upgrade it.

  • Mod

    @Huczas the raspberry pi gateway was developed after 2.0 was released, that's why it doesn't exist in 2.0.

    You should not need to change anything in your sketches when upgrading from 2.0 to 2.1.1. Just upgrade the MySensors library and re-upload your sketches. The only exception I am aware of is that sketches using getConfig need to be changed to use getControllerConfig instead but that is easy to fix and is only needed if you get the error described in these threads:

  • @mfalkvidd libraries in Arduino IDE updatet to 2.1.1 sketch uploaded - no errors.
    in RPi3, latest version of gateway installed and when all is up I get this:

    pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw -d
    mysgw: Starting gateway...
    mysgw: Protocol version - 2.1.1
    mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
    mysgw: TSM:INIT
    mysgw: TSF:WUR:MS=0
    mysgw: !TSM:INIT:TSP FAIL
    mysgw: TSM:FAIL:CNT=1
    mysgw: TSM:FAIL:PDT
    mysgw: TSM:FAIL:RE-INIT
    mysgw: TSM:INIT
    mysgw: !TSM:INIT:TSP FAIL
    mysgw: TSM:FAIL:CNT=2
    mysgw: TSM:FAIL:PDT
    mysgw: TSM:FAIL:RE-INIT
    mysgw: TSM:INIT
    mysgw: !TSM:INIT:TSP FAIL
    mysgw: TSM:FAIL:CNT=3
    mysgw: TSM:FAIL:PDT
    ^Cmysgw: Received SIGINT

    Do you have any guess on it? For me it looks like nothing is transmitting from node.
    My node code: maybe something is wrong with that code.

  • Mod

    @Huczas the code used for the node should not affect the gateway's ability to initialize the radio. In case you haven't seen it, information on the log messages is available at

    I don't know what could be wrong though. Have no experience with the raspberry pi gateway.

  • @mfalkvidd another thing, after changing version of gateway from 1.4 to 2.1.1:

  • What's your ./configure command? Can you post a picture/photo of your wiring?

  • @pansen

    ./configure --my-gateway=serial --my-serial-port=/dev/ttyAMA0 --my-serial-baudrate=115200 --my-transport=nrf24 --my-rf24-irq-pin=15

    Wiring was ok, and was working fine witch gw1.4 so - there is all ok, soldered well.

    Yesterday I connected gw2.1.1 on arduino uno - blue usb wire - it is working now, nodes are visible in my system, data is comming. If there well be no luck i will live in that way. It's just another thing behinde my speaker.

  • Plugin Developer

    I think you need to configure a virtual serial port.

    ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway

    If the serial gateway doesn't work for you, you can try and configure the ethernet gateway. Is there a reason you want to use the serial gateway?

  • @martinhjelmare don't know difference. Just have node using nrf24 and any configuration that will work would be ok for me.

  • For ethernet gateway listening on (i.e. on all interfaces) and port 5003 you can try:

    ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=13 --my-rf24-cs-pin=14

    Check for

    • Check for existance of spidev0.0 and replace if necessary
    • Also check the pin numbers, CE has to be physical pin 8, CN has to be physical pin 10.

    Also you need the latest dev version from git as far as I know.

    For more info check my comment here:

    @martinhjelmare: whats the difference between the virtual one and the "real" one?

  • Plugin Developer

    Since everything is connected to the RPi and I guess you also run the controller on the same RPi, you don't need any extra hardware, it's just a matter of how you configure the software to interface.

    If you configure a serial gateway, you configure your controller to connect to the virtual serial port. If you configure an ethernet gateway, you configure your controller to connect to a tcp socket on the correct port on localhost. Of course it depends on the controller what connection options are available.

  • Plugin Developer


    This is more a guess, but I think the real one (GPIO) is only for the interface between radio and serial gateway program. The virtual is for the interface between serial gateway program and controller. Serial interfaces are exclusive to one program at a time. Someone should verify what I just said though.

Log in to reply





Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.