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.
  • gohanG Offline
    gohanG Offline
    gohan
    Mod
    wrote on last edited by
    #620

    Have you tried both ethernet or mqtt?

    1 Reply Last reply
    0
    • gohanG gohan

      @Richard-van-der-Plas what version are you using?

      Richard van der PlasR Offline
      Richard van der PlasR Offline
      Richard van der Plas
      wrote on last edited by
      #621

      @gohan the latest stable version i guess. Where can i check?

      gohanG 1 Reply Last reply
      0
      • Richard van der PlasR Richard van der Plas

        @gohan the latest stable version i guess. Where can i check?

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

        @Richard-van-der-Plas try the 2.2 beta, it usually works better

        Richard van der PlasR 1 Reply Last reply
        0
        • gohanG gohan

          @Richard-van-der-Plas try the 2.2 beta, it usually works better

          Richard van der PlasR Offline
          Richard van der PlasR Offline
          Richard van der Plas
          wrote on last edited by
          #623

          @gohan just checked it's 2.1.1, is it easy to upgrade?

          gohanG 1 Reply Last reply
          0
          • Richard van der PlasR Richard van der Plas

            @gohan just checked it's 2.1.1, is it easy to upgrade?

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

            @Richard-van-der-Plas just clone the 2.2 dev instead of the stable, the rest is the same

            Richard van der PlasR 1 Reply Last reply
            0
            • gohanG gohan

              @Richard-van-der-Plas just clone the 2.2 dev instead of the stable, the rest is the same

              Richard van der PlasR Offline
              Richard van der PlasR Offline
              Richard van der Plas
              wrote on last edited by
              #625

              @gohan fatal: destination path 'MySensors' already exists and is not an empty directory. It goes wrong with the first command, could you please give me some pointers ?

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

                you need to either delete or rename the Mysensors folder :)

                Richard van der PlasR 1 Reply Last reply
                2
                • llegoffL Offline
                  llegoffL Offline
                  llegoff
                  wrote on last edited by
                  #627

                  Hello,
                  I designed a PCB for rfm or nrf -> raspberry pi
                  https://www.openhardware.io/view/470/MySensors-Gateway-for-Raspberry-PI

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

                    I am trying to get the gateway to run the RFM69W radio but when I issue the "make" command I get this

                    In file included from ./MySensors.h:318:0,
                                     from examples_linux/mysgw.cpp:83:
                    ./drivers/RFM69/new/RFM69_new.cpp:658:12: warning: ‘void RFM69_ATCmode(bool, int16_t)’ defined but not used [-Wunused-function]
                     LOCAL void RFM69_ATCmode(const bool onOff, const int16_t targetRSSI)
                                ^
                    

                    It is latest beta.

                    mfalkviddM 1 Reply Last reply
                    0
                    • gohanG gohan

                      I am trying to get the gateway to run the RFM69W radio but when I issue the "make" command I get this

                      In file included from ./MySensors.h:318:0,
                                       from examples_linux/mysgw.cpp:83:
                      ./drivers/RFM69/new/RFM69_new.cpp:658:12: warning: ‘void RFM69_ATCmode(bool, int16_t)’ defined but not used [-Wunused-function]
                       LOCAL void RFM69_ATCmode(const bool onOff, const int16_t targetRSSI)
                                  ^
                      

                      It is latest beta.

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

                      @gohan what configure command did you use? Knowing that would make it easier to reproduce the problem...
                      Does this warning cause any problem?

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

                        Just simple rfm69w 433 with default options. It compiles but I get no communication with nodes and 100% processor, but maybe I did a bad wiring

                        mfalkviddM 1 Reply Last reply
                        0
                        • gohanG gohan

                          Just simple rfm69w 433 with default options. It compiles but I get no communication with nodes and 100% processor, but maybe I did a bad wiring

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

                          @gohan debug output could be useful ;-)

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

                            I would have posted it but it just shows as no nodes are trying to connect and nodes are unable to find a parent of course. I'm using the rfm2nrf pcb in order to have the pins to connect to the raspberry.

                            PS here is the log of the startup

                             __  __       ____
                            |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
                            | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
                            | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
                            |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
                                    |___/                      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: 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
                            mysgw: New connection from 127.0.0.1
                            mysgw: Client 0 connected
                            mysgw: Client 0: 0;0;3;0;2;
                            mysgw: Client 0: 0;0;3;0;2;Get Version
                            mysgw: Client 0: 0;0;3;0;18;PING
                            mysgw: Client 0: 0;0;3;0;18;PING
                            
                            1 Reply Last reply
                            0
                            • gohanG Offline
                              gohanG Offline
                              gohan
                              Mod
                              wrote on last edited by
                              #633

                              On my test RPI3 it is working.... I have to double check the other one.

                              1 Reply Last reply
                              0
                              • gohanG gohan

                                you need to either delete or rename the Mysensors folder :)

                                Richard van der PlasR Offline
                                Richard van der PlasR Offline
                                Richard van der Plas
                                wrote on last edited by
                                #634

                                @gohan Hi there updated to the latest dev, but i still have to restart the service after a few days, this is the message in the log:

                                Sep 17 20:31:51 raspberrypi hass[17999]: #033[32m2017-09-17 20:31:51 INFO (Thread-13) [mysensors.gateway_tcp] Closing socket at ('192.168.1.115', 5003).#033[0m
                                Sep 17 20:31:51 raspberrypi hass[17999]: #033[32m2017-09-17 20:31:51 INFO (Thread-13) [mysensors.gateway_tcp] Socket closed at ('192.168.1.115', 5003).#033[0m
                                Sep 17 20:31:51 raspberrypi hass[17999]: #033[32m2017-09-17 20:31:51 INFO (Thread-13) [mysensors.gateway_tcp] No response. Disconnected.#033[0m
                                Sep 17 20:31:51 raspberrypi hass[17999]: #033[32m2017-09-17 20:31:51 INFO (Thread-13) [mysensors.gateway_tcp] Trying to connect to ('192.168.1.115', 5003)#033[0m
                                

                                checking with top, i see high CPU utilization:

                                20921 root      20   0   20036    872    784 R  CPU ->99,5  0,1 682:53.59 mysgw
                                
                                
                                1 Reply Last reply
                                0
                                • C ccy

                                  @Grubstake: Thanks. I have tried to follow "NRF24L01+ Radio" pin out connection. I have double / triple check my wiring is correct. But I still get the same fail message in mysgw debug mode:

                                  [root@alarmpi 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: Received SIGINT
                                  

                                  Here is my /boot/config.txt:

                                  gpu_mem=64
                                  initramfs initramfs-linux.img followkernel
                                  dtparam=spi=on
                                  

                                  and the spi dev:

                                  # ls /dev/spidev0.*
                                  /dev/spidev0.0  /dev/spidev0.1
                                  

                                  I am using ArchLinuxARM:

                                  # uname -a
                                  Linux alarmpi 4.9.13-3-ARCH #1 SMP Fri Mar 3 18:45:16 MST 2017 armv7l GNU/Linux
                                  

                                  I only wiring 7 pins (1-7) on NRF24l01+.

                                  Raspberry Pi 2 hardware information:

                                  # cat /proc/cpuinfo
                                  processor       : 0
                                  model name      : ARMv7 Processor rev 5 (v7l)
                                  BogoMIPS        : 38.40
                                  Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
                                  CPU implementer : 0x41
                                  CPU architecture: 7
                                  CPU variant     : 0x0
                                  CPU part        : 0xc07
                                  CPU revision    : 5
                                  
                                  processor       : 1
                                  model name      : ARMv7 Processor rev 5 (v7l)
                                  BogoMIPS        : 38.40
                                  Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
                                  CPU implementer : 0x41
                                  CPU architecture: 7
                                  CPU variant     : 0x0
                                  CPU part        : 0xc07
                                  CPU revision    : 5
                                  
                                  processor       : 2
                                  model name      : ARMv7 Processor rev 5 (v7l)
                                  BogoMIPS        : 38.40
                                  Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
                                  CPU implementer : 0x41
                                  CPU architecture: 7
                                  CPU variant     : 0x0
                                  CPU part        : 0xc07
                                  CPU revision    : 5
                                  
                                  processor       : 3
                                  model name      : ARMv7 Processor rev 5 (v7l)
                                  BogoMIPS        : 38.40
                                  Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
                                  CPU implementer : 0x41
                                  CPU architecture: 7
                                  CPU variant     : 0x0
                                  CPU part        : 0xc07
                                  CPU revision    : 5
                                  
                                  Hardware        : BCM2835
                                  Revision        : a21041
                                  Serial          : 00000000475d18a4
                                  
                                  # cat /sys/firmware/devicetree/base/model
                                  Raspberry Pi 2 Model B Rev 1.1
                                  

                                  Output from MySensors configure:

                                  # ./configure
                                  [SECTION] Detecting target machine.
                                  ./configure: line 111: warning: command substitution: ignored null byte in input
                                    [OK] machine detected: SoC=unknown, Type=unknown, CPU=armv7l.
                                  [SECTION] Checking GPIO Sysfs.
                                    [OK] /sys/class/gpio/export found
                                  [SECTION] Detecting SPI driver.
                                    [OK] SPI driver detected:SPIDEV.
                                  [SECTION] Detecting init system.
                                    [OK] init system detected: systemd.
                                  [SECTION] Saving configuration.
                                  [SECTION] Cleaning previous builds.
                                  [OK] Finished.
                                  

                                  I finally find out my raspberry pi board isn't detected properly in configure. I change the function detect_machine:

                                  function detect_machine {
                                  ...
                                      case $hardware in
                                  ...
                                      BCM2835)
                                          soc="BCM2835"
                                          if [[ $machine == "Raspberry"* ]]; then
                                              local rev=($(detect_rpi_revision))
                                              if [[ $rev == "a02082" || $rev == "a22082" ]]; then
                                                  tp="RPi3"
                                              else
                                                  tp="Rpi2"
                                              fi
                                          fi
                                          ;;
                                  ...
                                  

                                  make mysgw again, and I get this finally:

                                  # ./mysgw -d
                                  mysgw: Starting gateway...
                                  mysgw: Protocol version - 2.1.1
                                  mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
                                  mysgw: TSF:LRT:OK
                                  mysgw: TSM:INIT
                                  mysgw: TSF:WUR:MS=0
                                  mysgw: TSM:INIT:TSP OK
                                  mysgw: TSM:INIT:GW MODE
                                  mysgw: TSM:READY:ID=0,PAR=0,DIS=0
                                  mysgw: MCO:REG:NOT NEEDED
                                  mysgw: Listening for connections on 0.0.0.0:5003
                                  mysgw: MCO:BGN:STP
                                  mysgw: MCO:BGN:INIT OK,TSP=1
                                  
                                  J Offline
                                  J Offline
                                  jacikaas
                                  wrote on last edited by
                                  #635

                                  @ccy

                                  Hello, I'm also have issue with this question. My Raspberry Pi 2 type is a01041, but by the original "configure" file it is not recognized:

                                  [SECTION] Detecting target machine.
                                    [OK] machine detected: SoC=unknown, Type=unknown, CPU=armv7l.
                                  

                                  Maybe someone could explain why it is not recognized?

                                  "Configure" file lines:

                                  function detect_machine {
                                  ...
                                      case $hardware in
                                  ...
                                      BCM2835)
                                          soc="BCM2835"
                                          if [[ $machine == "Raspberry"* ]]; then
                                              local rev=($(detect_rpi_revision))
                                              if [[ $rev == "a02082" || $rev == "a22082" ]]; then
                                                  tp="RPi3"
                                              else
                                                  tp="Rpi2"
                                              fi
                                          fi
                                          ;;
                                  ...
                                  
                                  My Raspberry Pi 2 info:
                                  processor       : 0
                                  model name      : ARMv7 Processor rev 5 (v7l)
                                  BogoMIPS        : 38.40
                                  Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
                                  CPU implementer : 0x41
                                  CPU architecture: 7
                                  CPU variant     : 0x0
                                  CPU part        : 0xc07
                                  CPU revision    : 5
                                  
                                  processor       : 1
                                  model name      : ARMv7 Processor rev 5 (v7l)
                                  BogoMIPS        : 38.40
                                  Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
                                  CPU implementer : 0x41
                                  CPU architecture: 7
                                  CPU variant     : 0x0
                                  CPU part        : 0xc07
                                  CPU revision    : 5
                                  
                                  processor       : 2
                                  model name      : ARMv7 Processor rev 5 (v7l)
                                  BogoMIPS        : 38.40
                                  Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
                                  CPU implementer : 0x41
                                  CPU architecture: 7
                                  CPU variant     : 0x0
                                  CPU part        : 0xc07
                                  CPU revision    : 5
                                  
                                  processor       : 3
                                  model name      : ARMv7 Processor rev 5 (v7l)
                                  BogoMIPS        : 38.40
                                  Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
                                  CPU implementer : 0x41
                                  CPU architecture: 7
                                  CPU variant     : 0x0
                                  CPU part        : 0xc07
                                  CPU revision    : 5
                                  
                                  Hardware        : BCM2835
                                  Revision        : a01041
                                  Serial          : 0000000049a14619
                                  1 Reply Last reply
                                  0
                                  • TriXwooDT Offline
                                    TriXwooDT Offline
                                    TriXwooD
                                    wrote on last edited by
                                    #636

                                    Double radio or alternative pin for spi1:

                                    https://forum.mysensors.org/topic/7702/double-spi-radio-raspberry-pi/2

                                    1 Reply Last reply
                                    0
                                    • A Offline
                                      A Offline
                                      arraWX
                                      wrote on last edited by
                                      #637

                                      I followed the instructions carefully. However I get an error. Can someone help?

                                      git clone https://github.com/mysensors/MySensors.git --branch master
                                      cd MySensors
                                      ./configure --my-transport=nrf24 --my-gateway=ethernet
                                      

                                      This results in a warning:

                                      [SECTION] Detecting SPI driver.
                                        [WARNING] No supported SPI driver detected.
                                      

                                      When I run make I get the follwing error:

                                      In file included from examples_linux/mysgw.cpp:74:0:
                                      ./MySensors.h:254:2: error: #error No support for nRF24 radio on this platform
                                       #error No support for nRF24 radio on this platform
                                        ^
                                      In file included from ./drivers/RF24/RF24.cpp:23:0,
                                                       from ./MySensors.h:290,
                                                       from examples_linux/mysgw.cpp:74:
                                      ./drivers/RF24/RF24.h:52:17: fatal error: SPI.h: No such file or directory
                                       #include <SPI.h>
                                                       ^
                                      compilation terminated.
                                      Makefile:114: recipe for target 'build/examples_linux/mysgw.o' failed
                                      make: *** [build/examples_linux/mysgw.o] Error 1
                                      

                                      Hope someone can help. Thanks.

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

                                        Maybe you didn't enable SPI on the pi.

                                        From command prompt type 'sudo raspi-config', then select option 5 from the menu. This takes you to where you can enable the SPI bus on the pi. Then try again.

                                        S>

                                        1 Reply Last reply
                                        2
                                        • A Offline
                                          A Offline
                                          arraWX
                                          wrote on last edited by
                                          #639

                                          @skywatch Thank you! That solved my problem.

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


                                          19

                                          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