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.
  • mfalkviddM Offline
    mfalkviddM Offline
    mfalkvidd
    Mod
    wrote on last edited by
    #28

    In http://forum.mysensors.org/topic/2305/nrf24l01-rpi2-direct-connection-problem/1 an user also got node id 194. Maybe the discussion there can help?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jpbabou
      wrote on last edited by jpbabou
      #29

      Hi
      something is missing..

      Is there a problem with the repository
      Tks a lot for your job!

      pi@domoticjp ~ $ sudo git clone https://github.com/mysensors/Raspberry.git
      Cloning into 'Raspberry'...
      remote: Counting objects: 273, done.
      remote: Compressing objects: 100% (3/3), done.
      remote: Total 273 (delta 0), reused 0 (delta 0), pack-reused 270
      Receiving objects: 100% (273/273), 215.00 KiB | 0 bytes/s, done.
      Resolving deltas: 100% (114/114), done.
      Checking connectivity... done.
      pi@domoticjp ~ $ cd Raspberry/librf24-bcm
      -bash: cd: Raspberry/librf24-bcm: No such file or directory
      alexsh1A mfalkviddM 2 Replies Last reply
      0
      • mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #30

        Ah yes, the guide became invalid yesterday when a PR was merged. I'll update the guide, thanks for noticing.

        Information about how to get the rf library is available in the readme in the Raspberry folder if you want to get going.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          msantang
          wrote on last edited by msantang
          #31

          I got it working on my rb2 but i got 100% of cpu ussage.

          I read a lot of post about this but i cant found a solution.

          Some one know how to fix this?

          OitzuO 1 Reply Last reply
          0
          • J jpbabou

            Hi
            something is missing..

            Is there a problem with the repository
            Tks a lot for your job!

            pi@domoticjp ~ $ sudo git clone https://github.com/mysensors/Raspberry.git
            Cloning into 'Raspberry'...
            remote: Counting objects: 273, done.
            remote: Compressing objects: 100% (3/3), done.
            remote: Total 273 (delta 0), reused 0 (delta 0), pack-reused 270
            Receiving objects: 100% (273/273), 215.00 KiB | 0 bytes/s, done.
            Resolving deltas: 100% (114/114), done.
            Checking connectivity... done.
            pi@domoticjp ~ $ cd Raspberry/librf24-bcm
            -bash: cd: Raspberry/librf24-bcm: No such file or directory
            alexsh1A Offline
            alexsh1A Offline
            alexsh1
            wrote on last edited by
            #32

            @jpbabou said:

            Hi
            something is missing..

            Is there a problem with the repository
            Tks a lot for your job!

            pi@domoticjp ~ $ sudo git clone https://github.com/mysensors/Raspberry.git
            Cloning into 'Raspberry'...
            remote: Counting objects: 273, done.
            remote: Compressing objects: 100% (3/3), done.
            remote: Total 273 (delta 0), reused 0 (delta 0), pack-reused 270
            Receiving objects: 100% (273/273), 215.00 KiB | 0 bytes/s, done.
            Resolving deltas: 100% (114/114), done.
            Checking connectivity... done.
            pi@domoticjp ~ $ cd Raspberry/librf24-bcm
            -bash: cd: Raspberry/librf24-bcm: No such file or directory
            

            Please go ahead and install the rf24 library from https://github.com/TMRh20/RF24
            The rest should be the same

            1 Reply Last reply
            0
            • M msantang

              I got it working on my rb2 but i got 100% of cpu ussage.

              I read a lot of post about this but i cant found a solution.

              Some one know how to fix this?

              OitzuO Offline
              OitzuO Offline
              Oitzu
              wrote on last edited by Oitzu
              #33

              @msantang said:

              I got it working on my rb2 but i got 100% of cpu ussage.

              I read a lot of post about this but i cant found a solution.

              Some one know how to fix this?

              The 100% cpu usage is probably due to the style of receiving new messages from rf24/serial port.
              The current state is that the PiSerialGateway tries to poll data in a endless loop from rf24/serial.
              This could maybe fixed with using the interrupt of the nrf24l01+ to signal new data and reading data from the serial in blocking mode.
              I want to solve this but using interrupts on the RPi isn't that trivial.

              1 Reply Last reply
              0
              • mfalkviddM Offline
                mfalkviddM Offline
                mfalkvidd
                Mod
                wrote on last edited by
                #34

                http://forum.mysensors.org/topic/2367/pigatewayserial-using-interrupts/2 has information on how to use interrupts. I haven't tried it myself though.

                OitzuO 1 Reply Last reply
                0
                • mfalkviddM mfalkvidd

                  http://forum.mysensors.org/topic/2367/pigatewayserial-using-interrupts/2 has information on how to use interrupts. I haven't tried it myself though.

                  OitzuO Offline
                  OitzuO Offline
                  Oitzu
                  wrote on last edited by
                  #35

                  @mfalkvidd said:

                  http://forum.mysensors.org/topic/2367/pigatewayserial-using-interrupts/2 has information on how to use interrupts. I haven't tried it myself though.

                  Oh yeah, thanks for the hint @Bens got the exact same problem and seem to solved the rf24 part already. I hope he gets back online and shares his results. :)

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    den2k
                    wrote on last edited by
                    #36

                    Hi all,
                    I'm following this thread and have upgraded to MySensors v1.5 and get the following error. Version mismatch.

                    It looks like the Protocol version is 1.4.

                    Does the Raspberry MySensors Gateway support v1.5 or only v1.4? Any ideas on how to fix?

                    upload-27647566-60ff-4341-97aa-4d1186e5e670

                    alexsh1A 1 Reply Last reply
                    1
                    • D den2k

                      Hi all,
                      I'm following this thread and have upgraded to MySensors v1.5 and get the following error. Version mismatch.

                      It looks like the Protocol version is 1.4.

                      Does the Raspberry MySensors Gateway support v1.5 or only v1.4? Any ideas on how to fix?

                      upload-27647566-60ff-4341-97aa-4d1186e5e670

                      alexsh1A Offline
                      alexsh1A Offline
                      alexsh1
                      wrote on last edited by
                      #37

                      @den2k said:

                      Hi all,
                      I'm following this thread and have upgraded to MySensors v1.5 and get the following error. Version mismatch.

                      It looks like the Protocol version is 1.4.

                      Does the Raspberry MySensors Gateway support v1.5 or only v1.4? Any ideas on how to fix?

                      Up until now, MySensors v1.4 only for nrf24l01+ direct connection.
                      Did you upgrade the GW or the sensors or both ?

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

                        Protocol version hasn't changed since 1.4
                        https://github.com/mysensors/Raspberry/blob/master/MyMessage.h#L41

                        So you must have some other problem.. As you can see you only get zeroes in the log...

                        D 1 Reply Last reply
                        0
                        • GertSandersG Offline
                          GertSandersG Offline
                          GertSanders
                          Hardware Contributor
                          wrote on last edited by GertSanders
                          #39

                          You can "fake" a later version (e.g, 1.5) on the Raspberry by changing the version code in the version.h file and recompiling the Gateway software.

                          As far as I understand, the gateway will still pass the messages to the controller, even is there is a version mismatch message on the console.

                          1 Reply Last reply
                          0
                          • alexsh1A alexsh1

                            @den2k said:

                            Hi all,
                            I'm following this thread and have upgraded to MySensors v1.5 and get the following error. Version mismatch.

                            It looks like the Protocol version is 1.4.

                            Does the Raspberry MySensors Gateway support v1.5 or only v1.4? Any ideas on how to fix?

                            Up until now, MySensors v1.4 only for nrf24l01+ direct connection.
                            Did you upgrade the GW or the sensors or both ?

                            D Offline
                            D Offline
                            den2k
                            wrote on last edited by
                            #40

                            @alexsh1 I know the sensors are on v1.5. As for the Raspberry Gateway, it looks like based on the info here, that is running v1.4.

                            1 Reply Last reply
                            0
                            • hekH hek

                              Protocol version hasn't changed since 1.4
                              https://github.com/mysensors/Raspberry/blob/master/MyMessage.h#L41

                              So you must have some other problem.. As you can see you only get zeroes in the log...

                              D Offline
                              D Offline
                              den2k
                              wrote on last edited by
                              #41

                              @hek I'm running a custom 1Mhz build bootloader on a Pro Mini for the Sensor side. This was paired with the standard Serial Gateway running on another Pro Mini with v1.5 on both gateway and sensor. That setup was working. But I moved over to using the Pi gatway+nRF24+ radio and have this issue. I don't believe the hookup is the problem. I've seen the 0 readings before, and that usually meant node side issue or uninitiated Gateway. I have not changed the Node, so it must be the Pi gateway that is the problem. Any thoughts on what to test?

                              1 Reply Last reply
                              0
                              • D Offline
                                D Offline
                                den2k
                                wrote on last edited by
                                #42

                                Noob question. Any one have an idea on solving the "Permission denied" error.

                                upload-a7ed9c85-5b6b-4198-af00-909e1861374e

                                1 Reply Last reply
                                0
                                • D Offline
                                  D Offline
                                  den2k
                                  wrote on last edited by
                                  #43

                                  Solved my own problem. Using the following command did the trick.

                                  sudo chown -h pi:pi ttyUSB20

                                  1 Reply Last reply
                                  0
                                  • D Offline
                                    D Offline
                                    den2k
                                    wrote on last edited by
                                    #44

                                    weird. Permission Denied problem again.

                                    What is the USER : GROUP that is needed for this to work?

                                    martinhjelmareM 1 Reply Last reply
                                    0
                                    • mfalkviddM Offline
                                      mfalkviddM Offline
                                      mfalkvidd
                                      Mod
                                      wrote on last edited by
                                      #45

                                      @den2k I think your best chance is to post in the Home Assistant category. I don't have any experience with Home Assistant unfortunately.

                                      1 Reply Last reply
                                      0
                                      • J jpbabou

                                        Hi
                                        something is missing..

                                        Is there a problem with the repository
                                        Tks a lot for your job!

                                        pi@domoticjp ~ $ sudo git clone https://github.com/mysensors/Raspberry.git
                                        Cloning into 'Raspberry'...
                                        remote: Counting objects: 273, done.
                                        remote: Compressing objects: 100% (3/3), done.
                                        remote: Total 273 (delta 0), reused 0 (delta 0), pack-reused 270
                                        Receiving objects: 100% (273/273), 215.00 KiB | 0 bytes/s, done.
                                        Resolving deltas: 100% (114/114), done.
                                        Checking connectivity... done.
                                        pi@domoticjp ~ $ cd Raspberry/librf24-bcm
                                        -bash: cd: Raspberry/librf24-bcm: No such file or directory
                                        mfalkviddM Offline
                                        mfalkviddM Offline
                                        mfalkvidd
                                        Mod
                                        wrote on last edited by
                                        #46

                                        @jpbabou said:

                                        Hi
                                        something is missing..

                                        Is there a problem with the repository
                                        Tks a lot for your job!

                                        pi@domoticjp ~ $ sudo git clone https://github.com/mysensors/Raspberry.git
                                        Cloning into 'Raspberry'...
                                        remote: Counting objects: 273, done.
                                        remote: Compressing objects: 100% (3/3), done.
                                        remote: Total 273 (delta 0), reused 0 (delta 0), pack-reused 270
                                        Receiving objects: 100% (273/273), 215.00 KiB | 0 bytes/s, done.
                                        Resolving deltas: 100% (114/114), done.
                                        Checking connectivity... done.
                                        pi@domoticjp ~ $ cd Raspberry/librf24-bcm
                                        -bash: cd: Raspberry/librf24-bcm: No such file or directory
                                        

                                        The guide has been updated to reflect the updated in the MySensors Raspberry repository now. Thanks @jpbabou !

                                        1 Reply Last reply
                                        0
                                        • D den2k

                                          weird. Permission Denied problem again.

                                          What is the USER : GROUP that is needed for this to work?

                                          martinhjelmareM Offline
                                          martinhjelmareM Offline
                                          martinhjelmare
                                          Plugin Developer
                                          wrote on last edited by martinhjelmare
                                          #47

                                          @den2k

                                          Hi!

                                          Have you added the user that runs homeassistant to the dialout group? This group is usually owner of serial ports.

                                          Check default group of serial port (change for your port below) after connecting it:

                                          pi@martin-pi:~ $ ls -l /dev/ttyUSB0 
                                          crw-rw---- 1 root dialout 188, 0 dec 18 03:21 /dev/ttyUSB0
                                          

                                          Check groups that user pi is in:

                                          pi@martin-pi:~ $ groups pi
                                          pi : pi adm dialout cdrom sudo audio video plugdev games users input netdev spi i2c gpio
                                          

                                          If pi runs homeassistant, which should be the case, and is not in dialout, add pi to dialout:

                                          sudo adduser pi dialout
                                          

                                          Changing owner of a port will only work until you disconnect it. Default owner will be restored upon reconnect, if you haven't written a special udev rule.

                                          Edit:
                                          According to the readme in the mysensors raspberry repo (https://github.com/mysensors/Raspberry), the group of the device is tty. So you should probably use that, and not dialout. But you will know, when you check with ls -l.

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


                                          10

                                          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