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. Hardware
  3. Step-by-step procedure to connect the NRF24L01+ to the GPIO pins and use the Raspberry as a Serial Gateway (MySensors 1.x)

Step-by-step procedure to connect the NRF24L01+ to the GPIO pins and use the Raspberry as a Serial Gateway (MySensors 1.x)

Scheduled Pinned Locked Moved Hardware
nrf24raspberry piraspberryraspberry nrf24l01 gpiogateway
168 Posts 47 Posters 175.0k Views 36 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.
  • Tore André RosanderT Offline
    Tore André RosanderT Offline
    Tore André Rosander
    wrote on last edited by Tore André Rosander
    #97

    Does anyone know what this error is about?
    RPi2, NRF24l01, OSMC (Debian jessie), Domoticz v3.5051.

    osmc@osmc:~/Raspberry$ sudo make install
    Installing PiGatewaySerial to /usr/local/sbin
    Installing PiGateway to /usr/local/sbin
    Installing initscripts to /etc/init.d
    Installing syslog config to /etc/rsyslog.d
    Failed to restart rsyslog.service: Unit rsyslog.service failed to load: No such file or directory.
    Makefile:79: recipe for target 'install-initscripts' failed
    make: *** [install-initscripts] Error 6
    

    I can run the gateway even with the error, i can also add it to Domoticz and send/receive data.
    But after a few minutes i get a massive error in domoticz saying "(24) Too many files open" on every logentry and my domoticz loose connection to the Logitech mediaserver, remote Kodi hardware, mqtt server etc.

    osmc@osmc:~/Raspberry$ sudo ./PiGatewaySerial
    Starting PiGatewaySerial...
    Protocol version - 1.4
    Created PTY '/dev/pts/2'
    Gateway tty: /dev/ttyMySensorsGateway
    ================ SPI Configuration ================
    CSN Pin          = CE0 (PI Hardware Driven)
    CE Pin           = Custom GPIO25
    Clock Speed      = 8 Mhz
    ================ NRF Configuration ================
    STATUS           = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
    RX_ADDR_P0-1     = 0xa8a8e1fc00 0xa8a8e1fc00
    RX_ADDR_P2-5     = 0xff 0xc4 0xc5 0xc6
    TX_ADDR          = 0xa8a8e1fc02
    RX_PW_P0-6       = 0x20 0x20 0x20 0x00 0x00 0x00
    EN_AA            = 0x3b
    EN_RXADDR        = 0x06
    RF_CH            = 0x4c
    RF_SETUP         = 0x23
    CONFIG           = 0x0e
    DYNPD/FEATURE    = 0x3f 0x06
    Data Rate        = 250KBPS
    Model            = nRF24L01+
    CRC Length       = 16 bits
    PA Power         = PA_LOW
    
    1 Reply Last reply
    0
    • C Offline
      C Offline
      cingolanifede
      wrote on last edited by
      #98

      Hi, is signing supported using this library? thanks.

      mfalkviddM 1 Reply Last reply
      0
      • C cingolanifede

        Hi, is signing supported using this library? thanks.

        mfalkviddM Online
        mfalkviddM Online
        mfalkvidd
        Mod
        wrote on last edited by
        #99

        @cingolanifede the Raspberry Pi gateway does not support signing.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          BikeDan
          wrote on last edited by
          #100

          I'm looking for some help in getting "PiGatewaySerial" running properly. I am having no issue running "PiGateway" and receiving all data from a counter node I'm using for testing. When I try to run "PiGatewaySerial", only intermittent data appears. For this example, I have my counter sending increasing integers at 1 second intervals, and receives fewer than 1 in 25 through the "PiGatewaySerial" script. I previously had this working reliably on a RPi2, reading in the tty output and logging it to a file. Now, I cannot repeat that on either that device, nor the current RPi B+ I'm working with. I'm sure there's some basic setting that I'm missing, but I can't seem to figure it out. Thanks!

          An example of "PiGateway" correctly receiving all messages:

          pi@raspberrypi:/dev/pts $ sudo /usr/local/sbin/PiGateway
          Starting Gateway...
          ================ SPI Configuration ================
          CSN Pin  	 = CE0 (PI Hardware Driven)
          CE Pin  	 = Custom GPIO25
          Clock Speed	 = 8 Mhz
          ================ NRF Configuration ================
          STATUS		 = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
          RX_ADDR_P0-1	 = 0xa8a8e1fc00 0xa8a8e1fc00
          RX_ADDR_P2-5	 = 0xff 0xc4 0xc5 0xc6
          TX_ADDR		 = 0xe7e7e7e7e7
          RX_PW_P0-6	 = 0x20 0x20 0x20 0x00 0x00 0x00
          EN_AA		 = 0x3b
          EN_RXADDR	 = 0x06
          RF_CH		 = 0x4c
          RF_SETUP	 = 0x23
          CONFIG		 = 0x0e
          DYNPD/FEATURE	 = 0x3f 0x06
          Data Rate	 = 250KBPS
          Model		 = nRF24L01+
          CRC Length	 = 16 bits
          PA Power	 = PA_LOW
          [CALLBACK]0;0;3;0;14;Gateway startup complete.
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:906
          [CALLBACK]0;33;1;0;38;906
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:907
          [CALLBACK]0;33;1;0;38;907
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:908
          [CALLBACK]0;33;1;0;38;908
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:909
          [CALLBACK]0;33;1;0;38;909
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:910
          [CALLBACK]0;33;1;0;38;910
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:911
          [CALLBACK]0;33;1;0;38;911
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:912
          [CALLBACK]0;33;1;0;38;912
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:913
          [CALLBACK]0;33;1;0;38;913
          

          an example of "PiGatewaySerial" missing most messages:

          pi@raspberrypi:/dev/pts $ sudo /usr/local/sbin/PiGatewaySerial
          Starting PiGatewaySerial...
          Protocol version - 1.4
          Created PTY '/dev/pts/1'
          Gateway tty: /dev/ttyMySensorsGateway
          ================ SPI Configuration ================
          CSN Pin  	 = CE0 (PI Hardware Driven)
          CE Pin  	 = Custom GPIO25
          Clock Speed	 = 8 Mhz
          ================ NRF Configuration ================
          STATUS		 = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
          RX_ADDR_P0-1	 = 0xa8a8e1fc00 0xa8a8e1fc00
          RX_ADDR_P2-5	 = 0xff 0xc4 0xc5 0xc6
          TX_ADDR		 = 0xe7e7e7e7e7
          RX_PW_P0-6	 = 0x20 0x20 0x20 0x00 0x00 0x00
          EN_AA		 = 0x3b
          EN_RXADDR	 = 0x06
          RF_CH		 = 0x4c
          RF_SETUP	 = 0x23
          CONFIG		 = 0x0e
          DYNPD/FEATURE	 = 0x3f 0x06
          Data Rate	 = 250KBPS
          Model		 = nRF24L01+
          CRC Length	 = 16 bits
          PA Power	 = PA_LOW
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:301
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:302
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:303
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:328
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:353
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:378
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:403
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:428
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:454
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:479
          read: 0-0-0 s=33,c=1,t=38,pt=2,l=2:504
          

          I'm running a RPi B+, NRF24l01+, on a clean install of Jessie, and using only a few percent of the CPU power.

          1 Reply Last reply
          0
          • rmtuckerR Offline
            rmtuckerR Offline
            rmtucker
            wrote on last edited by
            #101

            I have been thinking about giving this a try But:-
            The Raspberry port is using protocol version 1.4.
            Do the sensors also have to use version 1.4?

            GertSandersG 1 Reply Last reply
            0
            • rmtuckerR rmtucker

              I have been thinking about giving this a try But:-
              The Raspberry port is using protocol version 1.4.
              Do the sensors also have to use version 1.4?

              GertSandersG Offline
              GertSandersG Offline
              GertSanders
              Hardware Contributor
              wrote on last edited by
              #102

              @rmtucker
              No, the sensors can be running 1.5 or 2.0-beta, the PI will run a 1.4 version.
              The only thing not supported by the PiGateway is message signing.
              But I have a mix of sensors in 1.5, 1.6-beta and 2.0-beta in my home network, so it certainly works.

              rmtuckerR 1 Reply Last reply
              1
              • GertSandersG GertSanders

                @rmtucker
                No, the sensors can be running 1.5 or 2.0-beta, the PI will run a 1.4 version.
                The only thing not supported by the PiGateway is message signing.
                But I have a mix of sensors in 1.5, 1.6-beta and 2.0-beta in my home network, so it certainly works.

                rmtuckerR Offline
                rmtuckerR Offline
                rmtucker
                wrote on last edited by
                #103

                @GertSanders

                Is it best to start with a blank jessie image and manually install/compile domoticz or just use the domoticz sd image?
                The latter would be the easiest for me because i am useless with the CLI but if the first method is best??

                mfalkviddM 1 Reply Last reply
                0
                • AnticimexA Offline
                  AnticimexA Offline
                  Anticimex
                  Contest Winner
                  wrote on last edited by
                  #104

                  Adding support for signing on a pi gw should just be a matter of implementing random number generation and use software signing. With slight modification in the software signing backend as it assumes Arduino api:s for obtaining a seed for the rng.

                  Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                  1 Reply Last reply
                  0
                  • rmtuckerR rmtucker

                    @GertSanders

                    Is it best to start with a blank jessie image and manually install/compile domoticz or just use the domoticz sd image?
                    The latter would be the easiest for me because i am useless with the CLI but if the first method is best??

                    mfalkviddM Online
                    mfalkviddM Online
                    mfalkvidd
                    Mod
                    wrote on last edited by
                    #105

                    @rmtucker if you want to be able to run the very latest version of Domoticz, use the Debian image and compile Domoticz from git.

                    I use the Domoticz image. The downside is that I need to wait for new "official" Domoticz builds before upgrading, but the upside is that getting up and running was very easy.

                    GertSandersG 1 Reply Last reply
                    0
                    • mfalkviddM mfalkvidd

                      @rmtucker if you want to be able to run the very latest version of Domoticz, use the Debian image and compile Domoticz from git.

                      I use the Domoticz image. The downside is that I need to wait for new "official" Domoticz builds before upgrading, but the upside is that getting up and running was very easy.

                      GertSandersG Offline
                      GertSandersG Offline
                      GertSanders
                      Hardware Contributor
                      wrote on last edited by
                      #106

                      @mfalkvidd
                      Actually ... I started with an official Domoticz build, and then I indicated in the settings that I wanted to update with the beta version. Since then I'm always on the latest beta (v5143 at the moment).

                      mfalkviddM 1 Reply Last reply
                      0
                      • GertSandersG GertSanders

                        @mfalkvidd
                        Actually ... I started with an official Domoticz build, and then I indicated in the settings that I wanted to update with the beta version. Since then I'm always on the latest beta (v5143 at the moment).

                        mfalkviddM Online
                        mfalkviddM Online
                        mfalkvidd
                        Mod
                        wrote on last edited by
                        #107

                        @GertSanders cool. How often is the beta updated? Every build?

                        GertSandersG 1 Reply Last reply
                        0
                        • rmtuckerR Offline
                          rmtuckerR Offline
                          rmtucker
                          wrote on last edited by
                          #108

                          Just set this up on my existing Raspberry pi B+ Domoticz server and it is working perfectly so i have managed to get rid of the uno Gateway.
                          Thank you so much,I can now try and squeeze it all in the Raspi case and the job is finished.

                          1 Reply Last reply
                          1
                          • rmtuckerR Offline
                            rmtuckerR Offline
                            rmtucker
                            wrote on last edited by
                            #109

                            This is the cpu usage,the spike is me compiling the software as above.
                            0_1463683081123_chart(2).jpeg

                            1 Reply Last reply
                            0
                            • mfalkviddM mfalkvidd

                              @GertSanders cool. How often is the beta updated? Every build?

                              GertSandersG Offline
                              GertSandersG Offline
                              GertSanders
                              Hardware Contributor
                              wrote on last edited by
                              #110

                              @mfalkvidd
                              Well, that seems to be the case. Sometimes I see daily updates, sometimes a week passes by without any changes. I selected the BETA channel for updates and since then I have seen new functionality come in on a regular basis. Not all of it is relevant to Mysensors of course, but none the less it's fun to see Domoticz is developed actively.

                              W 1 Reply Last reply
                              1
                              • GertSandersG GertSanders

                                @mfalkvidd
                                Well, that seems to be the case. Sometimes I see daily updates, sometimes a week passes by without any changes. I selected the BETA channel for updates and since then I have seen new functionality come in on a regular basis. Not all of it is relevant to Mysensors of course, but none the less it's fun to see Domoticz is developed actively.

                                W Offline
                                W Offline
                                wergeld
                                wrote on last edited by
                                #111

                                @GertSanders I have seen no issues in Domoticz stable with CPU usage. Thing just purrs along. Will have to check when I get home but i believe my system uptime is approaching 1 year. It "just works" as they say.

                                I would like to upgrade to mysensors 2.0 library by it looks like the Pi repo has not being updated as often (last I checked, anyway).

                                GertSandersG 1 Reply Last reply
                                0
                                • W wergeld

                                  @GertSanders I have seen no issues in Domoticz stable with CPU usage. Thing just purrs along. Will have to check when I get home but i believe my system uptime is approaching 1 year. It "just works" as they say.

                                  I would like to upgrade to mysensors 2.0 library by it looks like the Pi repo has not being updated as often (last I checked, anyway).

                                  GertSandersG Offline
                                  GertSandersG Offline
                                  GertSanders
                                  Hardware Contributor
                                  wrote on last edited by
                                  #112

                                  @wergeld
                                  Correct, the PI repo is basically unchanged. But it still is compatible with the 2.0-beta Mysensors library.

                                  W 1 Reply Last reply
                                  0
                                  • GertSandersG GertSanders

                                    @wergeld
                                    Correct, the PI repo is basically unchanged. But it still is compatible with the 2.0-beta Mysensors library.

                                    W Offline
                                    W Offline
                                    wergeld
                                    wrote on last edited by
                                    #113

                                    @GertSanders What? I was under the impression that some features (like sending messages to nodes from domitcz wouldn't work).

                                    GertSandersG 1 Reply Last reply
                                    0
                                    • W wergeld

                                      @GertSanders What? I was under the impression that some features (like sending messages to nodes from domitcz wouldn't work).

                                      GertSandersG Offline
                                      GertSandersG Offline
                                      GertSanders
                                      Hardware Contributor
                                      wrote on last edited by
                                      #114

                                      @wergeld
                                      Did not notice that, I can send values and "switch on" messages to nodes. The only thing I miss is the signing via ATSHA204. Even V_TEXT sending to and from nodes works.

                                      1 Reply Last reply
                                      0
                                      • Tore André RosanderT Offline
                                        Tore André RosanderT Offline
                                        Tore André Rosander
                                        wrote on last edited by
                                        #115

                                        I have some trouble with the gateway not storing the network map, if i restart the gateway my non-sensor nodes need to send some kind of heartbeat to reconnect to the gateway.

                                        Is this a known problem or is it something wrong with my setup?

                                        1 Reply Last reply
                                        0
                                        • hekH Offline
                                          hekH Offline
                                          hek
                                          Admin
                                          wrote on last edited by
                                          #116

                                          Yes, known problem.

                                          I had some hopes on @marceloaqno and @aaron832 providing a PR into development branch (so we can scrap the old RPI code). But there hasn't been any activity in a while.
                                          https://forum.mysensors.org/topic/2759/mysensors-raspberry-port-suggestions/12

                                          Tore André RosanderT 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          8

                                          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