Skip to content
  • 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
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

💬 Building a Raspberry Pi Gateway

Scheduled Pinned Locked Moved Announcements
1.1k Posts 173 Posters 422.5k 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.
  • skywatchS skywatch

    OK! - Now I am not saying I have the solution to your problem, but I think it is worth ruling out a few things.

    If nothing is attached to the USB hub, disconnect it.
    With your voltmeter set to DC Volts, measure between TP1 and TP2 on the pi. You should see 5V DC. Up to about 5.5V is OK, but less than 4.8V can affect some things. Many time I have seen power issues be the problem.

    Why not wire the NRF24L01 direct to the pi?

    If all is well, then seems it is software problem after all ;)

    S Offline
    S Offline
    sineverba
    Hardware Contributor
    wrote on last edited by sineverba
    #533

    @skywatch

    Thank you for your support.
    So, I did disconnect everything.
    I did try and I have 4.95 - 4.98v on every moment, also during the "make" of ./configure.

    alt text

    A bit low, but I think no so low. The mysgw -d lock / hangs with every power supply...

    PS Radio between headers because I want learn skill solders and more easy swap to test others radio, and, last but not last, with headers dupont/wires are more firmly than directly on the radio.

    1 Reply Last reply
    0
    • skywatchS Offline
      skywatchS Offline
      skywatch
      wrote on last edited by skywatch
      #534

      That all seems to be OK - Always worth checking though if you ever get issues.
      That means that I am lost for any ideas on why you have problems with ./configure>make>make install. It seems odd. Do you have another pi to try it on? That's the only thing I can think of now....even a cheap pi zero would be OK for a test.

      I would still disconnect the USB hub and all the gpio wiring at the pi and see how it goes.

      Good Luck! :)

      S 1 Reply Last reply
      0
      • skywatchS skywatch

        That all seems to be OK - Always worth checking though if you ever get issues.
        That means that I am lost for any ideas on why you have problems with ./configure>make>make install. It seems odd. Do you have another pi to try it on? That's the only thing I can think of now....even a cheap pi zero would be OK for a test.

        I would still disconnect the USB hub and all the gpio wiring at the pi and see how it goes.

        Good Luck! :)

        S Offline
        S Offline
        sineverba
        Hardware Contributor
        wrote on last edited by
        #535

        @skywatch Unfortuntately not, it's only pi that I have.
        No problem, better to check everything. I don't know if open in github, leave here, pass to arduino connected via USB.....

        And.. for Arduino connected via USB, I need to abilitate something with raspi-config or the only thing to do is to connect and domoticz will read it? (of course with sketch gateway loaded on arduino!)

        1 Reply Last reply
        0
        • OliverDogO OliverDog

          Why do Tx and Rx Leds blink every 5 to 6 seconds?

          Is it about communication between RPi and Gateway?

          Is there a way to disable it and keep blinks only with nodes communication?

          OliverDogO Offline
          OliverDogO Offline
          OliverDog
          wrote on last edited by
          #536

          @OliverDog said in 💬 Building a Raspberry Pi Gateway:

          Why do Tx and Rx Leds blink every 5 to 6 seconds?
          Is it about communication between RPi and Gateway?
          Is there a way to disable it and keep blinks only with nodes communication?

          Is there an answer for that?
          Thanks again

          1 Reply Last reply
          0
          • P Offline
            P Offline
            pandy
            wrote on last edited by
            #537

            Hi and sorry for the question..
            I have been trying to build a gateway with a raspberry pi 1 and a radio module nrf24 + for several days without success. .I am analyzing step by step what I can be wrong..
            You can kindly indicate the exact command syntax ./configure I have to give?
            thank you so much

            mfalkviddM S 2 Replies Last reply
            0
            • P pandy

              Hi and sorry for the question..
              I have been trying to build a gateway with a raspberry pi 1 and a radio module nrf24 + for several days without success. .I am analyzing step by step what I can be wrong..
              You can kindly indicate the exact command syntax ./configure I have to give?
              thank you so much

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

              Welcome to the MySensors community @pandy

              ./configure --my-transport=nrf24
              

              should be sufficient. What results did you get from the make and sudo ./bin/mysgw -d commands?

              P 1 Reply Last reply
              0
              • mfalkviddM mfalkvidd

                Welcome to the MySensors community @pandy

                ./configure --my-transport=nrf24
                

                should be sufficient. What results did you get from the make and sudo ./bin/mysgw -d commands?

                P Offline
                P Offline
                pandy
                wrote on last edited by
                #539

                @mfalkvidd said in 💬 Building a Raspberry Pi Gateway:

                ./configure --my-transport=nrf24

                Hi and thanks for the quick answer..
                This is the result of the command:

                [SECTION] Detecting target machine.
                [OK] machine detected: SoC=BCM2835, Type=rpi1, CPU=armv6l.
                [SECTION] Detecting SPI driver.
                [OK] SPI driver detected:BCM.
                [SECTION] Detecting init system.
                [OK] init system detected: systemd.
                [SECTION] Saving configuration.
                [SECTION] Cleaning previous builds.
                [OK] Finished.

                P 1 Reply Last reply
                0
                • P pandy

                  @mfalkvidd said in 💬 Building a Raspberry Pi Gateway:

                  ./configure --my-transport=nrf24

                  Hi and thanks for the quick answer..
                  This is the result of the command:

                  [SECTION] Detecting target machine.
                  [OK] machine detected: SoC=BCM2835, Type=rpi1, CPU=armv6l.
                  [SECTION] Detecting SPI driver.
                  [OK] SPI driver detected:BCM.
                  [SECTION] Detecting init system.
                  [OK] init system detected: systemd.
                  [SECTION] Saving configuration.
                  [SECTION] Cleaning previous builds.
                  [OK] Finished.

                  P Offline
                  P Offline
                  pandy
                  wrote on last edited by
                  #540

                  The result of the "make" command is very long ..

                  P 1 Reply Last reply
                  0
                  • P pandy

                    Hi and sorry for the question..
                    I have been trying to build a gateway with a raspberry pi 1 and a radio module nrf24 + for several days without success. .I am analyzing step by step what I can be wrong..
                    You can kindly indicate the exact command syntax ./configure I have to give?
                    thank you so much

                    S Offline
                    S Offline
                    sineverba
                    Hardware Contributor
                    wrote on last edited by
                    #541

                    @pandy

                    On pi1 I cannot get a stable and re-doable configuration. See some post before.

                    I finally swith to Arduino connected via USB. WOrks like a charme. Probably an issue with PI1.

                    1 Reply Last reply
                    0
                    • P pandy

                      The result of the "make" command is very long ..

                      P Offline
                      P Offline
                      pandy
                      wrote on last edited by
                      #542

                      the result of sudo ./bin/mysgw -d is :

                      mysgw: Starting gateway...
                      mysgw: Protocol version - 2.2.0-beta

                      and it blocks..

                      gohanG S 2 Replies Last reply
                      0
                      • P pandy

                        the result of sudo ./bin/mysgw -d is :

                        mysgw: Starting gateway...
                        mysgw: Protocol version - 2.2.0-beta

                        and it blocks..

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

                        @pandy that's definitely a problem. What linux are you using?

                        1 Reply Last reply
                        0
                        • P pandy

                          the result of sudo ./bin/mysgw -d is :

                          mysgw: Starting gateway...
                          mysgw: Protocol version - 2.2.0-beta

                          and it blocks..

                          S Offline
                          S Offline
                          sineverba
                          Hardware Contributor
                          wrote on last edited by
                          #544

                          @pandy Same my problem.
                          @gohan I did try also the DIETPI, how you did suggest to me some days ago. Only to say to @pandy let down the idea to use PI1. Use arduino usb/serial with your PI1.
                          I did use several nights.... :(

                          P 1 Reply Last reply
                          0
                          • P Offline
                            P Offline
                            pandy
                            wrote on last edited by
                            #545

                            Thanks to everyone for the answers and suggestions...
                            At this point I think the problem is the raspberry type..
                            I will try the suggested solution above otherwise I will be forced to change raspberry ..
                            Thanks to everyone for help

                            gohanG 1 Reply Last reply
                            0
                            • S sineverba

                              @pandy Same my problem.
                              @gohan I did try also the DIETPI, how you did suggest to me some days ago. Only to say to @pandy let down the idea to use PI1. Use arduino usb/serial with your PI1.
                              I did use several nights.... :(

                              P Offline
                              P Offline
                              pandy
                              wrote on last edited by
                              #546

                              @sineverba thank you for your suggestion..Do you have a link where I can find a tutorial for this system?
                              thank you so much

                              1 Reply Last reply
                              0
                              • P pandy

                                Thanks to everyone for the answers and suggestions...
                                At this point I think the problem is the raspberry type..
                                I will try the suggested solution above otherwise I will be forced to change raspberry ..
                                Thanks to everyone for help

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

                                @pandy go for a new rpi3 that works very well.

                                1 Reply Last reply
                                1
                                • Velo17V Offline
                                  Velo17V Offline
                                  Velo17
                                  wrote on last edited by
                                  #548

                                  Hello everyone!

                                  I am trying to use a NRF24 module on the SPI1 of a Raspberry2 (so that I can also use a touch tft on SPI0).

                                  I enabled it in the config.txt so that is lists under /dev/spidev1.0 - for conveniency I configured the CS0 to be at GPIO16=Pin36 (by using dtoverlay=spi1-1cs,cs0_pin=16).

                                  I use the dev branch of MySensors.git as the master branch does not recognize my Pi. I used this configure line:

                                  ./configure --my-rf24-channel=124 --my-rf24-irq-pin=29 --my-rf24-ce-pin=31 --my-rf24-cs-pin=36 --spi-driver=SPIDEV --spi-spidev-device=/dev/spidev1.0
                                  

                                  successful make
                                  but when I run the gateway in the shell with sudo ./bin/mysgw -d, I get the following:

                                  mysgw: Starting gateway...
                                  mysgw: Protocol version - 2.2.0-beta
                                   __  __       ____
                                  |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
                                  | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
                                  | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
                                  |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
                                          |___/                      2.2.0-beta
                                  
                                  mysgw: MCO:BGN:INIT CP=RNNG--Q-
                                  mysgw: TSF:LRT:OK
                                  mysgw: TSM:INIT
                                  mysgw: TSF:WUR:MS=0
                                  mysgw: pinMode: invalid pin: 29
                                  mysgw: pinMode: invalid pin: 31
                                  mysgw: pinMode: invalid pin: 36
                                  mysgw: digitalWrite: invalid pin: 31
                                  mysgw: digitalWrite: invalid pin: 36
                                  mysgw: digitalPinToInterrupt: invalid pin: 29
                                  mysgw: digitalPinToInterrupt: invalid pin: 29
                                  mysgw: digitalWrite: invalid pin: 36
                                  

                                  Any ideas what I can do to make it work?

                                  Velo17V 1 Reply Last reply
                                  0
                                  • Velo17V Velo17

                                    Hello everyone!

                                    I am trying to use a NRF24 module on the SPI1 of a Raspberry2 (so that I can also use a touch tft on SPI0).

                                    I enabled it in the config.txt so that is lists under /dev/spidev1.0 - for conveniency I configured the CS0 to be at GPIO16=Pin36 (by using dtoverlay=spi1-1cs,cs0_pin=16).

                                    I use the dev branch of MySensors.git as the master branch does not recognize my Pi. I used this configure line:

                                    ./configure --my-rf24-channel=124 --my-rf24-irq-pin=29 --my-rf24-ce-pin=31 --my-rf24-cs-pin=36 --spi-driver=SPIDEV --spi-spidev-device=/dev/spidev1.0
                                    

                                    successful make
                                    but when I run the gateway in the shell with sudo ./bin/mysgw -d, I get the following:

                                    mysgw: Starting gateway...
                                    mysgw: Protocol version - 2.2.0-beta
                                     __  __       ____
                                    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
                                    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
                                    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
                                    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
                                            |___/                      2.2.0-beta
                                    
                                    mysgw: MCO:BGN:INIT CP=RNNG--Q-
                                    mysgw: TSF:LRT:OK
                                    mysgw: TSM:INIT
                                    mysgw: TSF:WUR:MS=0
                                    mysgw: pinMode: invalid pin: 29
                                    mysgw: pinMode: invalid pin: 31
                                    mysgw: pinMode: invalid pin: 36
                                    mysgw: digitalWrite: invalid pin: 31
                                    mysgw: digitalWrite: invalid pin: 36
                                    mysgw: digitalPinToInterrupt: invalid pin: 29
                                    mysgw: digitalPinToInterrupt: invalid pin: 29
                                    mysgw: digitalWrite: invalid pin: 36
                                    

                                    Any ideas what I can do to make it work?

                                    Velo17V Offline
                                    Velo17V Offline
                                    Velo17
                                    wrote on last edited by Velo17
                                    #549

                                    I think I might have found the root of the problem. The ./configure detects my Rpi2 as such (rpi2) but in the RPi.cpp in line 26 there is the pin to GPIO translation array and it is lacking translations for the high pin numbers - which is obviously wrong as on the RPi2 you have the extended GPIO connector with 40 pins...

                                    const static int pin_to_gpio_rev1[41] = {-1, -1, -1, 0, -1, 1, -1, 4, 14, -1, 15, 17, 18, 21, -1, 22, 23, -1, 24, 10, -1, 9, 25, 11, 8, -1, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
                                    const static int pin_to_gpio_rev2[41] = {-1, -1, -1, 2, -1, 3, -1, 4, 14, -1, 15, 17, 18, 27, -1, 22, 23, -1, 24, 10, -1, 9, 25, 11, 8, -1, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
                                    const static int pin_to_gpio_rev3[41] = {-1, -1, -1, 2, -1, 3, -1, 4, 14, -1, 15, 17, 18, 27, -1, 22, 23, -1, 24, 10, -1, 9, 25, 11, 8, -1, 7, -1, -1, 5, -1, 6, 12, 13, -1, 19, 16, 26, 20, -1, 21 };
                                    

                                    I copied the rev3 array to the rev2 array and compiled this and it seems to work in my case!

                                    W 1 Reply Last reply
                                    3
                                    • Velo17V Velo17

                                      I think I might have found the root of the problem. The ./configure detects my Rpi2 as such (rpi2) but in the RPi.cpp in line 26 there is the pin to GPIO translation array and it is lacking translations for the high pin numbers - which is obviously wrong as on the RPi2 you have the extended GPIO connector with 40 pins...

                                      const static int pin_to_gpio_rev1[41] = {-1, -1, -1, 0, -1, 1, -1, 4, 14, -1, 15, 17, 18, 21, -1, 22, 23, -1, 24, 10, -1, 9, 25, 11, 8, -1, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
                                      const static int pin_to_gpio_rev2[41] = {-1, -1, -1, 2, -1, 3, -1, 4, 14, -1, 15, 17, 18, 27, -1, 22, 23, -1, 24, 10, -1, 9, 25, 11, 8, -1, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
                                      const static int pin_to_gpio_rev3[41] = {-1, -1, -1, 2, -1, 3, -1, 4, 14, -1, 15, 17, 18, 27, -1, 22, 23, -1, 24, 10, -1, 9, 25, 11, 8, -1, 7, -1, -1, 5, -1, 6, 12, 13, -1, 19, 16, 26, 20, -1, 21 };
                                      

                                      I copied the rev3 array to the rev2 array and compiled this and it seems to work in my case!

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

                                      @Velo17 Thank you! I had been pulling my hair out over this issue on installing a new RPi2 setup.

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

                                        Adding link to the github issue (thanks for creating!) for future reference
                                        https://github.com/mysensors/MySensors/issues/895

                                        1 Reply Last reply
                                        0
                                        • Velo17V Offline
                                          Velo17V Offline
                                          Velo17
                                          wrote on last edited by
                                          #552

                                          I just noticed that mysgw is constantly consuming 95-100% CPU here. This even happens when I unplug the NRF24 module so that after starting mysgw basically nothing happens. Running development branch. Hmmmm. Any idea what to check?

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


                                          21

                                          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
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular