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. Announcements
  3. 💬 Building a Raspberry Pi Gateway

💬 Building a Raspberry Pi Gateway

Scheduled Pinned Locked Moved Announcements
1.1k Posts 173 Posters 423.0k Views 131 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.
  • N Offline
    N Offline
    niehoff80
    wrote on last edited by
    #588

    Yesterday I've tried compiling it also (first time for me) and I had same error.

    mfalkviddM 1 Reply Last reply
    0
    • N niehoff80

      Yesterday I've tried compiling it also (first time for me) and I had same error.

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #589

      @niehoff80 and/or @Oliviakrk can you run

      sudo raspi-config
      

      (install it using sudo apt-get install raspi-config if it isn't already installed)
      Select

      8 Advanced Options
      

      and

      A6 SPI
      

      and

      Yes
      

      to all questions. Reboot the raspberry pi and try running make again. If that works I'll add it to the documentation.

      1 Reply Last reply
      1
      • N Offline
        N Offline
        niehoff80
        wrote on last edited by
        #590

        @mfalkvidd

        I was able to compile it after doing what you're suggesting. It's still have error message during communication with the gateway but that is probably a noobs-error in my config. so I have to investigate a bit more.

        1 Reply Last reply
        1
        • O Offline
          O Offline
          Oliviakrk
          wrote on last edited by
          #591

          Hi

          I enabled SPI. For Rasberry PI B it was under 5. Interfacing options. The build completed successfully. Thanks!

          But there is a problem...When I run mysqgw -d I get:
          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

          I also tried development release. Works perfectly. Looks like there is problem with stable.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            syotos
            wrote on last edited by
            #592

            Have the same problem with the stable branch as @Oliviakrk using the NRF24 transport on an Raspberry PI B, it might be a driver issue, is see that the make for the development branche builds the BCM drivers while the master branche does not.

            1 Reply Last reply
            0
            • N Offline
              N Offline
              niehoff80
              wrote on last edited by
              #593

              Ok, I had same error as Oliviakrk & syotos on my Raspberry Pi 3 and I also tried the development release and that one works perfectly!

              1 Reply Last reply
              1
              • M Offline
                M Offline
                mikkelox
                wrote on last edited by
                #594

                Hi I followed the instructions, but I can't get it to work, I have a Raspberry Pi 1 Rev1 with NRF24 connected following the instructions.
                First I configured it just using ./configure --spi-driver=SPIDEV --spi-spidev-device=/dev/spidev0.0 --soc=BCM2835 --my-transport=nrf24 --my-rf24-ce-pin=22 --my-rf24-cs-pin=24 --my-gateway=ethernet --my-port=5003
                I also tried with almost every combination but I always get the same errors.
                The idea is for it to be used as a standalone GW running from RPI with RF directly attached to it (SPI is enabled and I don't get any errors when compiling)
                I can send the logs if needed, any help will be welcome, thanks!
                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: TSF:LRT:OK
                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

                1 Reply Last reply
                0
                • gohanG Offline
                  gohanG Offline
                  gohan
                  Mod
                  wrote on last edited by
                  #595

                  Try latest mysensors version from development branch

                  M 1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mikkelox
                    wrote on last edited by
                    #596

                    Tried it and got the same output, I also tried with a different NRF24 just in case and doublechecked the connections. are the options I am using ok?
                    ./configure --spi-driver=SPIDEV --spi-spidev-device=/dev/spidev0.0 --soc=BCM2835 --my-debug=enable --my-transport=nrf24 --my-rf24-ce-pin=22 --my-rf24-cs-pin=24 --my-gateway=ethernet --my-port=5003

                    1 Reply Last reply
                    0
                    • gohanG gohan

                      Try latest mysensors version from development branch

                      M Offline
                      M Offline
                      mikkelox
                      wrote on last edited by
                      #597

                      @gohan, Thank you! I got it to work. First I tried with the development branch and it didn't work either, then I used the following instructions https://forum.mysensors.org/topic/1151/tutorial-raspberry-pi-nrf24l01-direct-connection
                      And when that didn't work either I rechecked the wiring which ended up being the reason for it to fail previously, "faulty wires".
                      I got it to work with the master branch.

                      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: TSF:LRT:OK
                      mysgw: TSM:INIT
                      mysgw: TSF:WUR:MS=0
                      mysgw: TSM:INIT:TSP OK
                      mysgw: TSM:INIT:GW MODE
                      mysgw: TSM:READY:ID=0,PAR=0,DIS=0
                      mysgw: MCO:REG:NOT NEEDED

                      1 Reply Last reply
                      1
                      • Z Offline
                        Z Offline
                        Zuhairi
                        wrote on last edited by
                        #598

                        Sorry, just want to ask does anyone have the output of this gateway?

                        gohanG 1 Reply Last reply
                        0
                        • Z Zuhairi

                          Sorry, just want to ask does anyone have the output of this gateway?

                          gohanG Offline
                          gohanG Offline
                          gohan
                          Mod
                          wrote on last edited by
                          #599

                          @Zuhairi the previous post?

                          1 Reply Last reply
                          0
                          • Djames SuhankoD Offline
                            Djames SuhankoD Offline
                            Djames Suhanko
                            wrote on last edited by
                            #600

                            Hi.
                            I have a Raspberry Pi already configured as gateway, but I don't know how to interact with. I means, how can I read incoming data from? I tried open /dev/ttyMySensorsGateway as a common serial port but I got a message error:
                            cu: open (/dev/ttyMySensorsGateway): Permission denied
                            cu: /dev/ttyMySensorsGateway: Line in use
                            With 'ps ax' command I can see only '/usr/local/sbin/PiGatewaySerial -d' running as a deamon.
                            Could someone explain me what's ne next step for?

                            mfalkviddM 1 Reply Last reply
                            0
                            • gohanG Offline
                              gohanG Offline
                              gohan
                              Mod
                              wrote on last edited by
                              #601

                              I'd compile it as ethernet gateway, follow the guide on how to configure the parameters, then you can use MySController (search the forum, there is a topic with download link) and use that to connect to it

                              Djames SuhankoD 1 Reply Last reply
                              1
                              • Djames SuhankoD Djames Suhanko

                                Hi.
                                I have a Raspberry Pi already configured as gateway, but I don't know how to interact with. I means, how can I read incoming data from? I tried open /dev/ttyMySensorsGateway as a common serial port but I got a message error:
                                cu: open (/dev/ttyMySensorsGateway): Permission denied
                                cu: /dev/ttyMySensorsGateway: Line in use
                                With 'ps ax' command I can see only '/usr/local/sbin/PiGatewaySerial -d' running as a deamon.
                                Could someone explain me what's ne next step for?

                                mfalkviddM Offline
                                mfalkviddM Offline
                                mfalkvidd
                                Mod
                                wrote on last edited by
                                #602

                                Welcome to the MySensors community @Djames-Suhanko

                                It looks like you are using the Raspberry Pi gateway for MySensors 1.5. If you are just starting out, I suggest you use the gateway for the current version instead. Documentation: https://www.mysensors.org/build/raspberry

                                That version of the gateway has a debug mode where you can see the messages in the console.

                                The next step would be to select a controller. Information about this is available at https://www.mysensors.org/about/network

                                Djames SuhankoD 1 Reply Last reply
                                1
                                • gohanG gohan

                                  I'd compile it as ethernet gateway, follow the guide on how to configure the parameters, then you can use MySController (search the forum, there is a topic with download link) and use that to connect to it

                                  Djames SuhankoD Offline
                                  Djames SuhankoD Offline
                                  Djames Suhanko
                                  wrote on last edited by
                                  #603

                                  @gohan Thank you to answer! Good tip, I will do that!

                                  1 Reply Last reply
                                  0
                                  • mfalkviddM mfalkvidd

                                    Welcome to the MySensors community @Djames-Suhanko

                                    It looks like you are using the Raspberry Pi gateway for MySensors 1.5. If you are just starting out, I suggest you use the gateway for the current version instead. Documentation: https://www.mysensors.org/build/raspberry

                                    That version of the gateway has a debug mode where you can see the messages in the console.

                                    The next step would be to select a controller. Information about this is available at https://www.mysensors.org/about/network

                                    Djames SuhankoD Offline
                                    Djames SuhankoD Offline
                                    Djames Suhanko
                                    wrote on last edited by
                                    #604

                                    @mfalkvidd Yes, I'm using 1.5. Thank you for suggest me the newer version. I will update it today!

                                    1 Reply Last reply
                                    1
                                    • Djames SuhankoD Offline
                                      Djames SuhankoD Offline
                                      Djames Suhanko
                                      wrote on last edited by Djames Suhanko
                                      #605

                                      Hello, all!
                                      I read a lot of comments to find a solution to my problem, but seems it's something that I couldn't understand yet.

                                      The old version was working in my Raspberry Pi using Raspbian Wheeze, so, to install the new version i updated my system until the latest version (Raspbian Stetch). I could compile MySensors, but I'm getting the common error when testing with mysgw -d:
                                      "MYSGW: MCD:BGN INIT GW, CP=RNNG---,VER-2.1.1" and so on.

                                      I used this parameters in configure:
                                      ./configure --my-transport=nrf24 --my-gateway=ethernet
                                      --my-port=5003 --my-controlle-ip-address=192.168.1.2
                                      --my-gateway=mqtt --my-mqtt-publish-topic-prefix=mysensors-out
                                      --my-mqtt-subscribe-topic-prefix=mysensors-in
                                      --my-mqtt-client-id=mygateway1

                                      I couldn't find a solution yet. Can someone help me?

                                      mfalkviddM 1 Reply Last reply
                                      0
                                      • Djames SuhankoD Djames Suhanko

                                        Hello, all!
                                        I read a lot of comments to find a solution to my problem, but seems it's something that I couldn't understand yet.

                                        The old version was working in my Raspberry Pi using Raspbian Wheeze, so, to install the new version i updated my system until the latest version (Raspbian Stetch). I could compile MySensors, but I'm getting the common error when testing with mysgw -d:
                                        "MYSGW: MCD:BGN INIT GW, CP=RNNG---,VER-2.1.1" and so on.

                                        I used this parameters in configure:
                                        ./configure --my-transport=nrf24 --my-gateway=ethernet
                                        --my-port=5003 --my-controlle-ip-address=192.168.1.2
                                        --my-gateway=mqtt --my-mqtt-publish-topic-prefix=mysensors-out
                                        --my-mqtt-subscribe-topic-prefix=mysensors-in
                                        --my-mqtt-client-id=mygateway1

                                        I couldn't find a solution yet. Can someone help me?

                                        mfalkviddM Offline
                                        mfalkviddM Offline
                                        mfalkvidd
                                        Mod
                                        wrote on last edited by mfalkvidd
                                        #606

                                        @Djames-Suhanko MYSGW: MCD:BGN INIT GW, CP=RNNG---,VER-2.1.1 means that the gateway is starting up. It is not an error.

                                        "controller" is misspelled in your configure command though.

                                        1 Reply Last reply
                                        1
                                        • gohanG Offline
                                          gohanG Offline
                                          gohan
                                          Mod
                                          wrote on last edited by
                                          #607

                                          @Djames-Suhanko I think you have to decide wether you want to make an ethernet or mqtt gateway, you can't specify both

                                          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.0k

                                          Posts


                                          Copyright 2019 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