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.
  • R Offline
    R Offline
    romeo01
    wrote on last edited by
    #407

    nrf24 connected to a arduino nano and plugged to the raspberry over the usb/serial cable is not considered as a serial device ?

    What is this option ?

    --my-gateway=serial
    

    If for some reason you can't use the GPIO pins of the Raspberry Pi, you could connect the radio to a arduino with the GatewaySerial sketch and feed the pi through a serial port:

    That's exactly what I need, but how to do ??

    ./configure --my-gateway=serial --my-serial-port=/dev/ttyUSB0 --my-serial-baudrate=115200
    

    Serial port /dev/ttyUSB0 is ok, because I use this with domoticz and it'running good.

    My initial question is how to use my old gatway (arduino + nrf24) with the gateway compiled on the raspberry over the usb/serial cable ?
    I can not use GPIO port.

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

      The serial gateway on the raspberry does what your nano is doing and you can't have gateways talking to each other. Maybe you could look at mycontroller and see if can manage nodes the way you want.

      R 1 Reply Last reply
      0
      • dirkcD Offline
        dirkcD Offline
        dirkc
        wrote on last edited by dirkc
        #409

        When talking about this Raspberry Pi Gateway, I suppose, that its just connecting the NFR24L01+ to the Raspberry Pi GPIO and run

        ./bin/mysgw -d
        

        right? On my Pi it does not work this way, maybe the NFR24L01+ is not ok. Instead I am running an external esp-wifi-gateway, but a direct gateway seems the better solution to me.
        So did I get it right, that I can use a NFR24L01+ connected to the Raspberry PI GPIO without any external gateway? If so, what are the parameters for building the mysgw daemon? I tried this one:

        ./configure --spi-driver=SPIDEV --spi-spidev-device=/dev/spidev0.0
        

        update: as in https://www.mysensors.org/view/180#wiring
        22 โ€“ CE
        24 โ€“ CSN/CS
        23 โ€“ SCK
        19 โ€“ MOSI
        21 โ€“ MISO

        SPI is activated:

        $ls /dev/spidev*
        /dev/spidev0.0  /dev/spidev0.1
        

        And this is the result, when building it with the settings mentioned above. (Raspberry Pi 3, jessie 4.9.13-v7+)

        $ 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
        mysgw: TSM:FAIL:RE-INIT
        mysgw: TSM:INIT
        mysgw: !TSM:INIT:TSP FAIL
        mysgw: TSM:FAIL:CNT=4
        mysgw: TSM:FAIL:PDT
        

        And can someone show how to bind this gateway into FHEM? As said, today I am running an esp-wifi-gateay.

        Thanks in advance for any support...

        Controller: Home Assistant & FHEM - Gateway: ESP8266wifi - MySensors: 2.3.2 (nRF24)

        M gohanG 2 Replies Last reply
        0
        • gohanG gohan

          The serial gateway on the raspberry does what your nano is doing and you can't have gateways talking to each other. Maybe you could look at mycontroller and see if can manage nodes the way you want.

          R Offline
          R Offline
          romeo01
          wrote on last edited by
          #410

          @gohan
          With the serial Gateway on the raspberry; how is connected the nfr24 ??
          If usb/serial port is no possible, which serial port to use ?

          M 1 Reply Last reply
          0
          • gohanG gohan

            @keldandorin just add a capacitor between vcc and gnd on the radio module as I suggested above.

            keldandorinK Offline
            keldandorinK Offline
            keldandorin
            wrote on last edited by
            #411

            @gohan Been trying to find my old post to tell you all how it got with my rpi and nodes that did not register. I bougt some voltage regulators LM350. used the 5v output insted of 3.3 V but still no luck to get node to register. when messauring volatage when GW send awnser it drops way below 3.3v. I think voltage output from rpi just is to bad. So I bought a nodemcu for GW instead and it works like a sharm :)

            1 Reply Last reply
            0
            • R romeo01

              @gohan
              With the serial Gateway on the raspberry; how is connected the nfr24 ??
              If usb/serial port is no possible, which serial port to use ?

              M Offline
              M Offline
              marceloaqno
              Code Contributor
              wrote on last edited by
              #412

              @romeo01 You have to connect the nrf24 to the GPIO if you want to use it with the RPi, the information on the wiki was wrong, sorry about that.

              gohanG R 2 Replies Last reply
              0
              • M marceloaqno

                @romeo01 You have to connect the nrf24 to the GPIO if you want to use it with the RPi, the information on the wiki was wrong, sorry about that.

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

                @marceloaqno he said he can't connect nrf24 chip on the rpi, so that's why he is struggling

                1 Reply Last reply
                0
                • dirkcD dirkc

                  When talking about this Raspberry Pi Gateway, I suppose, that its just connecting the NFR24L01+ to the Raspberry Pi GPIO and run

                  ./bin/mysgw -d
                  

                  right? On my Pi it does not work this way, maybe the NFR24L01+ is not ok. Instead I am running an external esp-wifi-gateway, but a direct gateway seems the better solution to me.
                  So did I get it right, that I can use a NFR24L01+ connected to the Raspberry PI GPIO without any external gateway? If so, what are the parameters for building the mysgw daemon? I tried this one:

                  ./configure --spi-driver=SPIDEV --spi-spidev-device=/dev/spidev0.0
                  

                  update: as in https://www.mysensors.org/view/180#wiring
                  22 โ€“ CE
                  24 โ€“ CSN/CS
                  23 โ€“ SCK
                  19 โ€“ MOSI
                  21 โ€“ MISO

                  SPI is activated:

                  $ls /dev/spidev*
                  /dev/spidev0.0  /dev/spidev0.1
                  

                  And this is the result, when building it with the settings mentioned above. (Raspberry Pi 3, jessie 4.9.13-v7+)

                  $ 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
                  mysgw: TSM:FAIL:RE-INIT
                  mysgw: TSM:INIT
                  mysgw: !TSM:INIT:TSP FAIL
                  mysgw: TSM:FAIL:CNT=4
                  mysgw: TSM:FAIL:PDT
                  

                  And can someone show how to bind this gateway into FHEM? As said, today I am running an esp-wifi-gateay.

                  Thanks in advance for any support...

                  M Offline
                  M Offline
                  marceloaqno
                  Code Contributor
                  wrote on last edited by
                  #414

                  @dirkc Try to connect your module to the SPI0 (https://www.mysensors.org/view/180#wiring).
                  You only need to enable the SPIDEV if you want to use the SPI1.

                  1 Reply Last reply
                  0
                  • dirkcD dirkc

                    When talking about this Raspberry Pi Gateway, I suppose, that its just connecting the NFR24L01+ to the Raspberry Pi GPIO and run

                    ./bin/mysgw -d
                    

                    right? On my Pi it does not work this way, maybe the NFR24L01+ is not ok. Instead I am running an external esp-wifi-gateway, but a direct gateway seems the better solution to me.
                    So did I get it right, that I can use a NFR24L01+ connected to the Raspberry PI GPIO without any external gateway? If so, what are the parameters for building the mysgw daemon? I tried this one:

                    ./configure --spi-driver=SPIDEV --spi-spidev-device=/dev/spidev0.0
                    

                    update: as in https://www.mysensors.org/view/180#wiring
                    22 โ€“ CE
                    24 โ€“ CSN/CS
                    23 โ€“ SCK
                    19 โ€“ MOSI
                    21 โ€“ MISO

                    SPI is activated:

                    $ls /dev/spidev*
                    /dev/spidev0.0  /dev/spidev0.1
                    

                    And this is the result, when building it with the settings mentioned above. (Raspberry Pi 3, jessie 4.9.13-v7+)

                    $ 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
                    mysgw: TSM:FAIL:RE-INIT
                    mysgw: TSM:INIT
                    mysgw: !TSM:INIT:TSP FAIL
                    mysgw: TSM:FAIL:CNT=4
                    mysgw: TSM:FAIL:PDT
                    

                    And can someone show how to bind this gateway into FHEM? As said, today I am running an esp-wifi-gateay.

                    Thanks in advance for any support...

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

                    @dirkc I don't know where you got those pin numbers but they don't look like the ones on the guide. In addition you don't have to use spi driver. The PA version of nrf24 are quite a pain to get them working, so I suggest you first test with regular modules and then upgrade to PA

                    1 Reply Last reply
                    0
                    • dirkcD Offline
                      dirkcD Offline
                      dirkc
                      wrote on last edited by
                      #416

                      @gohan, @marceloaqno : sorry, I corrected the "typo", the NRF was already connected as shown in https://www.mysensors.org/view/180#wiring. I double checked that again.
                      What is the correct setup for ./configure ?

                      Controller: Home Assistant & FHEM - Gateway: ESP8266wifi - MySensors: 2.3.2 (nRF24)

                      M 1 Reply Last reply
                      0
                      • M marceloaqno

                        @romeo01 You have to connect the nrf24 to the GPIO if you want to use it with the RPi, the information on the wiki was wrong, sorry about that.

                        R Offline
                        R Offline
                        romeo01
                        wrote on last edited by
                        #417

                        @marceloaqno

                        Thanks marceloagno, the answer is clear.

                        Keep up the great work !

                        1 Reply Last reply
                        0
                        • dirkcD dirkc

                          @gohan, @marceloaqno : sorry, I corrected the "typo", the NRF was already connected as shown in https://www.mysensors.org/view/180#wiring. I double checked that again.
                          What is the correct setup for ./configure ?

                          M Offline
                          M Offline
                          marceloaqno
                          Code Contributor
                          wrote on last edited by
                          #418

                          @dirkc The default settings for ./configure is to use the nrf24 module connected in the same way as shown in the guide and as an ethernet gateway.

                          dirkcD 1 Reply Last reply
                          0
                          • L Offline
                            L Offline
                            lshield
                            wrote on last edited by lshield
                            #419

                            I'm having issues with the LED setup as shown on the page. The LEDs are just constantly on even though everything looks like it's setup just like the picture. I'm new at this so I could be doing something stupid.

                            1 Reply Last reply
                            0
                            • M marceloaqno

                              @dirkc The default settings for ./configure is to use the nrf24 module connected in the same way as shown in the guide and as an ethernet gateway.

                              dirkcD Offline
                              dirkcD Offline
                              dirkc
                              wrote on last edited by
                              #420

                              @marceloaqno ok, thanks, I will change the radio.

                              Controller: Home Assistant & FHEM - Gateway: ESP8266wifi - MySensors: 2.3.2 (nRF24)

                              1 Reply Last reply
                              0
                              • M Offline
                                M Offline
                                marceloaqno
                                Code Contributor
                                wrote on last edited by
                                #421

                                Support for RFM69 was added to the development branch (finally!).

                                jirmJ 1 Reply Last reply
                                1
                                • M marceloaqno

                                  Support for RFM69 was added to the development branch (finally!).

                                  jirmJ Offline
                                  jirmJ Offline
                                  jirm
                                  wrote on last edited by
                                  #422

                                  @marceloaqno

                                  Iยดm really happy ear that !

                                  RFM69 is one of best RF transceivers in these days for IoT.
                                  So good news I believe for Mysensors community.

                                  You know if are any hope that RFM69 will be added too to OPI boards support mysgw development ?

                                  Congratulations for that great work !

                                  M 1 Reply Last reply
                                  0
                                  • jirmJ jirm

                                    @marceloaqno

                                    Iยดm really happy ear that !

                                    RFM69 is one of best RF transceivers in these days for IoT.
                                    So good news I believe for Mysensors community.

                                    You know if are any hope that RFM69 will be added too to OPI boards support mysgw development ?

                                    Congratulations for that great work !

                                    M Offline
                                    M Offline
                                    marceloaqno
                                    Code Contributor
                                    wrote on last edited by
                                    #423

                                    @jirm Support for RFM69 also applies to the OrangePi :wink:

                                    jirmJ 1 Reply Last reply
                                    0
                                    • M marceloaqno

                                      @jirm Support for RFM69 also applies to the OrangePi :wink:

                                      jirmJ Offline
                                      jirmJ Offline
                                      jirm
                                      wrote on last edited by jirm
                                      #424

                                      @marceloaqno

                                      Awesome !!!
                                      Thank you so much.

                                      Best regards

                                      1 Reply Last reply
                                      0
                                      • F Offline
                                        F Offline
                                        ftw64
                                        wrote on last edited by
                                        #425

                                        When I configure "MY_RFM69_MAX_POWER_LEVEL_DBM" in MyConfig.h, compiling fails.
                                        Perhaps you should change the code in ./drivers/RFM69/new/RFM69_new.h from:

                                        #define RFM69_MAX_POWER_LEVEL_DBM MY_RFM69_MAX_POWER_LEVEL_DBM //!< MY_RFM69_MAX_POWER_LEVEL_DBM

                                        to:

                                        #define RFM69_MAX_POWER_LEVEL_DBM ((rfm69_powerlevel_t)MY_RFM69_MAX_POWER_LEVEL_DBM) //!< MY_RFM69_MAX_POWER_LEVEL_DBM

                                        1 Reply Last reply
                                        0
                                        • F Offline
                                          F Offline
                                          ftw64
                                          wrote on last edited by
                                          #426

                                          I cannot get the RFM69(HW) working. When I start myswg in debug mode (-d), I see:

                                          mysgw: Starting gateway...
                                          mysgw: Protocol version - 2.2.0-beta
                                          mysgw: MCO:BGN:INIT GW,CP=RPNG----,VER=2.2.0-beta
                                          mysgw: TSF:LRT:OK
                                          mysgw: TSM:INIT
                                          mysgw: TSF:WUR:MS=0
                                          mysgw: RFM69:INIT
                                          mysgw: RFM69:INIT:PIN,CS=24,IQP=22,IQN=22
                                          mysgw: RFM69:PTX:LEVEL=5 dBm
                                          mysgw: TSM:INIT:TSP OK
                                          mysgw: TSM:INIT:GW MODE
                                          mysgw: TSM:READY:ID=0,PAR=0,DIS=0
                                          mysgw: MCO:REG:NOT NEEDED
                                          mysgw: Listening for connections on 0.0.0.0:5003
                                          mysgw: MCO:BGN:STP
                                          mysgw: MCO:BGN:INIT OK,TSP=1
                                          

                                          But I can see ('hear' with a radio on 868.000 MHz) no transmission of the RFM69. When I power up a node, the node does not connect to the gateway: "NO REPLY":+1:

                                          0 MCO:BGN:INIT NODE,CP=RRNNA--,VER=2.1.1
                                          4 TSM:INIT
                                          4 TSF:WUR:MS=0
                                          8 TSM:INIT:TSP OK
                                          10 TSM:INIT:STATID=4
                                          12 TSF:SID:OK,ID=4
                                          14 TSM:FPAR
                                          274 TSF:MSG:SEND,4-4-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                                          2281 !TSM:FPAR:NO REPLY
                                          2283 TSM:FPAR
                                          2562 TSF:MSG:SEND,4-4-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                                          4569 !TSM:FPAR:NO REPLY
                                          4571 TSM:FPAR
                                          4831 TSF:MSG:SEND,4-4-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                                          6838 !TSM:FPAR:NO REPLY
                                          6840 TSM:FPAR
                                          7100 TSF:MSG:SEND,4-4-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                                          9107 !TSM:FPAR:FAIL
                                          9109 TSM:FAIL:CNT=1
                                          9111 TSM:FAIL:PDT
                                          

                                          Is there any 'check' I can do to perform basic RFM69HW testing on my RPI?

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


                                          23

                                          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