Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Announcements
  3. πŸ’¬ Building a Raspberry Pi Gateway

πŸ’¬ Building a Raspberry Pi Gateway

Scheduled Pinned Locked Moved Announcements
1.1k Posts 173 Posters 423.1k 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.
  • A Offline
    A Offline
    arraWX
    wrote on last edited by
    #648

    @ricorico94 Yesterday I managed to make a working rpi gateway. I am on rpi3, use a socket adapter board for the radio and use domoticz. I posted all the details here: https://forum.mysensors.org/topic/7793/nrf24l01-problems-in-2-1-1-and-2-2-0-beta/24

    1 Reply Last reply
    0
    • R Offline
      R Offline
      ricorico94
      wrote on last edited by ricorico94
      #649

      Hi,
      @arraWX : I looked at your post. Unfortunately, the error I face is before the start, as it's during the make, so it appears I follow the first steps you describe (config & make), but I still don't know how to solve the make errors.

      In case it can help understanding what's going on or what to do, I ran the command:

      gcc -v 
      

      which displayed: gcc version 4.6.3 (Debian 4.6.3-14+rpi1)
      Could it be an issue this "+rpi1" whreas I've a PI 2 ?

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

        Do not know if it is of any help, but mine says: gcc version 4.9.2 (Raspbian 4.9.2-10)

        1 Reply Last reply
        0
        • R Offline
          R Offline
          ricorico94
          wrote on last edited by
          #651

          Hi,
          I tried to update gcc, just in case.. though I'm not sure of what I do.:confused:
          I ran:

          pi@raspberrypi ~/MySensors $ sudo apt-get upgrade gcc
          

          and after a little while, it ended without obvious mistake.
          but if I do gcc -v again, I still get
          gcc version 4.6.3 (Debian 4.6.3-14+rpi1)
          (even after reboot)
          Is there another step to be done, or am I using wrong command ?

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

            try running first sudo apt-get update and then sudo apt-get upgrade , it should update all packages

            1 Reply Last reply
            0
            • R Offline
              R Offline
              ricorico94
              wrote on last edited by
              #653

              @gohan : JUst tried it, but same result.. no change on version number.
              is there something like apt-get install to be done also ?

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

                I don't know really... I am using dietpi on a RPI3 and there is a convenient tool that you can check what to install and installs for you and among the others I have chosen the "Build-Essentials" that contains all the common packages for compile, so I don't know what packages are included.

                1 Reply Last reply
                0
                • R ricorico94

                  @gohan : JUst tried it, but same result.. no change on version number.
                  is there something like apt-get install to be done also ?

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

                  @ricorico94 Do you see gcc-4.9 in the list returned by the command below?

                  sudo apt-cache search gcc
                  

                  If it's listed, try installing it by specifying the version:

                  sudo apt-get install gcc-4.9
                  
                  1 Reply Last reply
                  1
                  • R Offline
                    R Offline
                    ricmail85
                    wrote on last edited by
                    #656

                    Hi, wouldn't be proper to include in the guide also the command "--my-rfm69-irq-pin=22" during the configure procedure in order to improve the throughput for the rfm69 radios?

                    1 Reply Last reply
                    0
                    • R Offline
                      R Offline
                      ricorico94
                      wrote on last edited by
                      #657

                      Hi,
                      Thanks to @marceloaqno and @Gohan and @arraWX , I could progress somewhow.. but still not working.

                      When listing the versions as per Marceloagno advice, I could see gcc-4.6 and -4.7 and 4.8 but nothing else (no 4.9).
                      I then decided to take the risk of installing the 4.8.. The commands from Marcelagno did not work (well, I mean gcc - v was still showing 4.6).
                      Then I followed this tutorial on upgrade step by step to upgrade to gcc-4.8 and then the make command apparently succeeded (well, plenty messages, some warnings.. but no error apparently, as ar as I could see. I dd not find the folders desribed in website, but the commands were still ok.. weird, but I'm too rookie..)

                      I then followed again the Mysensors tutorial with
                      sudo ./bin/mysgw -h
                      sudo ./bin/mysgw -d (and no error message. great!)
                      sudo make install
                      but then I ran
                      sudo systemctl enable mysgw.service
                      and I got error message

                      sudo: systemctl: command not found
                      

                      After some search, I saw that it's a Jessie command whereas I discovered that my good old version of Rasp Pi, which was built from the standard Domoticz image in 2015 is still Wheezy

                      pi@raspberrypi ~/MySensors $ cat /etc/os-release
                      PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)"
                      NAME="Raspbian GNU/Linux"
                      VERSION_ID="7"
                      VERSION="7 (wheezy)"
                      ID=raspbian
                      ID_LIKE=debian
                      ANSI_COLOR="1;31"
                      HOME_URL="http://www.raspbian.org/"
                      SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
                      BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
                      

                      Any idea of what I should do now?..
                      another commande equivalent to the systemctl ?
                      an upgrade to Jessie (any risk ? and how to do it safely ?)

                      br,
                      Ricorico94

                      1 Reply Last reply
                      0
                      • petewillP Offline
                        petewillP Offline
                        petewill
                        Admin
                        wrote on last edited by
                        #658

                        I am new to Linux and hopefully have an easy question...
                        I have followed the build instructions and everything seems to be working well so far. One issue I'm having is getting node-red to see the usb port (/dev/ttyUSB020). I did some searching online and found that if I run the following command node-red will see the port and things start working.

                        sudo chmod 666 /dev/ttyUSB020
                        

                        The problem is that each time I reboot the Pi the command needs to be run again. Does anyone have any ideas on how I can resolve this so I don't need to run the command each time the system is booted? Thanks in advance.

                        My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

                        mfalkviddM gohanG 2 Replies Last reply
                        0
                        • petewillP petewill

                          I am new to Linux and hopefully have an easy question...
                          I have followed the build instructions and everything seems to be working well so far. One issue I'm having is getting node-red to see the usb port (/dev/ttyUSB020). I did some searching online and found that if I run the following command node-red will see the port and things start working.

                          sudo chmod 666 /dev/ttyUSB020
                          

                          The problem is that each time I reboot the Pi the command needs to be run again. Does anyone have any ideas on how I can resolve this so I don't need to run the command each time the system is booted? Thanks in advance.

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

                          @petewill you can put the chmod command in /etc/rc.local
                          That will execute it on every boot.
                          https://www.raspberrypi.org/documentation/linux/usage/rc-local.md

                          1 Reply Last reply
                          0
                          • petewillP petewill

                            I am new to Linux and hopefully have an easy question...
                            I have followed the build instructions and everything seems to be working well so far. One issue I'm having is getting node-red to see the usb port (/dev/ttyUSB020). I did some searching online and found that if I run the following command node-red will see the port and things start working.

                            sudo chmod 666 /dev/ttyUSB020
                            

                            The problem is that each time I reboot the Pi the command needs to be run again. Does anyone have any ideas on how I can resolve this so I don't need to run the command each time the system is booted? Thanks in advance.

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

                            @petewill or you can compile the gateway as ethernet or mqtt that are both supported by node-red, making life a little easier

                            petewillP 1 Reply Last reply
                            1
                            • petewillP Offline
                              petewillP Offline
                              petewill
                              Admin
                              wrote on last edited by
                              #661

                              @mfalkvidd Thanks. I thought about doing something like that but I wasn't sure that was the best process or if something should be modified during the install. I'll give it a shot this way though. Thanks again.

                              My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

                              1 Reply Last reply
                              0
                              • gohanG gohan

                                @petewill or you can compile the gateway as ethernet or mqtt that are both supported by node-red, making life a little easier

                                petewillP Offline
                                petewillP Offline
                                petewill
                                Admin
                                wrote on last edited by
                                #662

                                @gohan Sorry, I did not see your reply earlier. I tried an ethernet gateway in node-red a while ago and could never get it to work with Vera. There was some port conflicts or something. I have never played with mqtt. I need to learn it at some point but I am hoping to finish this project so I can move on to some others. :) Do you think I will gain significant advantages by using that over a serial/usb gateway?

                                My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

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

                                  From a node-red perspective, IMHO, mqtt is easier to handle even without specific mysensors nodes, but it all depends what you need to do. I played with it some months ago but I got stuck when I had to start using javascript as I still don't know that language, but it was quite easy to link mysensors values to the dashboard without actually touching any code.

                                  petewillP 1 Reply Last reply
                                  0
                                  • gohanG gohan

                                    From a node-red perspective, IMHO, mqtt is easier to handle even without specific mysensors nodes, but it all depends what you need to do. I played with it some months ago but I got stuck when I had to start using javascript as I still don't know that language, but it was quite easy to link mysensors values to the dashboard without actually touching any code.

                                    petewillP Offline
                                    petewillP Offline
                                    petewill
                                    Admin
                                    wrote on last edited by
                                    #664

                                    @gohan Thanks! I seem to have the serial stuff working well (but haven't yet put it into production) so I think I'll go that way for now. I definitely need to look into mqtt at some point though.

                                    My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

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

                                      Ofc it has its PROs and CONs but I believe it is the way to go for the future.

                                      1 Reply Last reply
                                      0
                                      • F Offline
                                        F Offline
                                        fleinze
                                        wrote on last edited by
                                        #666

                                        I compiled the gateway for spi1 because I have a display using spi0. Two problems I came across:

                                        1. the master branch doesn't work. It compiles, it seems to work but it never receives anything.
                                        2. the development branch works but I needed to define the right cs-pin even if I redirected the pin in config.txt (with dtoverlay=spi1-1cs,cs0_pin=16)
                                          The following configure worked for me:
                                        ./configure --spi-driver=SPIDEV --spi-spidev-device=/dev/spidev1.0 --my-rf24-cs-pin=36 --my-rf24-ce-pin=33 --my-rf24-irq-pin=31
                                        
                                        1 Reply Last reply
                                        1
                                        • I Offline
                                          I Offline
                                          Inso
                                          wrote on last edited by
                                          #667

                                          For the ones having problems with the stable build (Version 2.1.1), always getting "mysgw: !TSM:INIT:TSP FAIL":
                                          Seems there is a bug, you have to install "development" (Version 2.2.0)
                                          Maybe someone adds an note on top of the tutorial, so others wonΒ΄t also spend hours in searching for the problem on their Pi/Hardware.

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


                                          9

                                          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