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 1.0m 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.
  • 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
                                  • Djames SuhankoD Offline
                                    Djames SuhankoD Offline
                                    Djames Suhanko
                                    wrote on last edited by Djames Suhanko
                                    #608

                                    wow, it's was really fast! Thanks to answer. I'm use an ethernet interface. It's up but have no cable on their. I didn't install a controller yet, so, is there no problem yet, right?
                                    Sorry that, I'm really a newbie using MySensors.

                                    [updating]
                                    ysgw: 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

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

                                      @Djames-Suhanko said in 💬 Building a Raspberry Pi Gateway:

                                      --my-controlle-ip-address

                                      this also is not necessary. Also for now remove all these --my-gateway=mqtt --my-mqtt-publish-topic-prefix=mysensors-out
                                      --my-mqtt-subscribe-topic-prefix=mysensors-in
                                      --my-mqtt-client-id=mygateway1
                                      and use it as ethernet gateway to keep it simple

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

                                        Ok, I will try it right now!

                                        1 Reply Last reply
                                        0
                                        • E Offline
                                          E Offline
                                          erobot
                                          wrote on last edited by
                                          #611

                                          Hello folks,
                                          my past experience is using nrf24 library at https://github.com/Blavery/lib_nrf24, and i was able to send/receive "text" data (or "string" data) in between Raspi3 (master node) and Arduino (slave). And this is a big issue, because what i need is numerical data (float or integer), not text data, so Raspi 3 can process the numerical data (such as to do the plotting), and based on the processed data to make some decisions. My raspi 3 is controlling a moving robot. Can you advise appropriate nrf24 library for raspberry pi and Arduino, and sample codes for this kind of applicaitons? Thanks

                                          mfalkviddM 1 Reply Last reply
                                          0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          12

                                          Online

                                          12.0k

                                          Users

                                          11.2k

                                          Topics

                                          113.4k

                                          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