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 422.6k 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.
  • M musthafa

    @marceloaqno thank you.

    I have already installed OpenHAB 2 on my RPi. Can I install mysgw on to the same RPi ?

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

    @musthafa Yes, set the IP Address to 127.0.0.1 in your openhab for the ethernet gateway.

    M 1 Reply Last reply
    0
    • aandA aand

      @hausinger -- are you running armbian on your orange pi one?

      H Offline
      H Offline
      hausinger
      wrote on last edited by
      #207

      @aand said:

      @hausinger -- are you running armbian on your orange pi one?

      Yes, I'm running on armbian on my orange pi one

      1 Reply Last reply
      0
      • aandA aand

        @jirm Thanks for the suggestion. I've downloaded the raspian image. To duplicate the path I used with armbian, I downloaded TMRh20's RF24 code so I can test the radio with code I've already had up and running on the hardware.. However, this version of raspbian is really bad. So far nothing compiles. Regular raspbian, and armbian on the orange pi one do not have this kind of problem out of the box; they compile a wide range of packages. I'll spend some more time on it to be diligent, but this distro looks like it needs to be put on the abandon pile.

        I tried compiling mysensors gateway too but no luck with that yet either. This is what I get:

        ./configure
        [SECTION] Detecting target machine.
        [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
        [OK] init system detected: sysvinit
        [SECTION] Saving configuration.
        [SECTION] Cleaning previous builds.
        [OK] Finished.

        make
        gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RA
        DIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/log
        .c -o build/drivers/Linux/log.o
        cc1: error: bad value (armv8-a) for -march switch
        cc1: error: bad value (cortex-a53) for -mtune switch
        Makefile:102: recipe for target 'build/drivers/Linux/log.o' failed
        make: *** [build/drivers/Linux/log.o] Error 1

        jirmJ Offline
        jirmJ Offline
        jirm
        wrote on last edited by
        #208

        @aand

        Hi again!

        I spend some time seeing and reading some of the files from the mysensors github build and I see some things that can help to understand why the error raised to @aand trying to compile on OPI.

        First say that I´m not a coding expert, so please be nice with my if I´m wrong and say something stupid ;-)

        I see in the .configure file that the machine detection have H3 Soc and this are fine detected , but then I see that selecting type and CPU flags seems not properly selected to match OPI specs , because on OPI soc H3 have a cpu armv7 (not armv8) and is a A20 and not A53.
        So maybe that cpu "selection" is not correct for H3 soc , and is so easy try if anyone that have OPI and have time can change only that values in the config file and try to compile.
        All the values on the A20 line seems correct for the OPI H3 soc, so only needed copy them from the A20 line to the H3 line, and give a try.

        File Configure

        .......

        function gcc_cpu_flags {
        local soc=$1
        case $soc in
        BCM2835)
        flags="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard"
        ;;
        BCM2836)
        flags="-march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard"
        ;;
        AM33XX)
        flags="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard"
        ;;
        A10)
        flags="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard"
        ;;
        A13)
        flags="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard"
        ;;
        A20)
        flags="-march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard"
        ;;
        H3)
        flags="-march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard"

        ;;
        *)

        1 Reply Last reply
        1
        • M marceloaqno

          @musthafa Yes, set the IP Address to 127.0.0.1 in your openhab for the ethernet gateway.

          M Offline
          M Offline
          musthafa
          wrote on last edited by
          #209

          @marceloaqno Thank you!

          1 Reply Last reply
          0
          • eyesoftE Offline
            eyesoftE Offline
            eyesoft
            wrote on last edited by
            #210

            also on banana pi pro when i trie to compile i'm getting this :

            [SECTION] Detecting target machine.
            [OK] machine detected: SoC=A20, Type=unknown, CPU=armv7l.
            [OK] init system detected: sysvinit
            [SECTION] Saving configuration.
            [SECTION] Cleaning previous builds.
            [OK] Finished.

            type i think must be BananaPro

            on make :

            -o build/examples_linux/mysgw.o
            In file included from examples_linux/mysgw.cpp:74:0:
            ./MySensors.h:258: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:294,
            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:98: recipe for target 'build/examples_linux/mysgw.o' failed
            make: *** [build/examples_linux/mysgw.o] Error 1

            so Banana Pi Pro soc A20 it's also on wait list or never worked ?

            jirmJ 1 Reply Last reply
            0
            • eyesoftE eyesoft

              also on banana pi pro when i trie to compile i'm getting this :

              [SECTION] Detecting target machine.
              [OK] machine detected: SoC=A20, Type=unknown, CPU=armv7l.
              [OK] init system detected: sysvinit
              [SECTION] Saving configuration.
              [SECTION] Cleaning previous builds.
              [OK] Finished.

              type i think must be BananaPro

              on make :

              -o build/examples_linux/mysgw.o
              In file included from examples_linux/mysgw.cpp:74:0:
              ./MySensors.h:258: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:294,
              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:98: recipe for target 'build/examples_linux/mysgw.o' failed
              make: *** [build/examples_linux/mysgw.o] Error 1

              so Banana Pi Pro soc A20 it's also on wait list or never worked ?

              jirmJ Offline
              jirmJ Offline
              jirm
              wrote on last edited by jirm
              #211

              @eyesoft

              Yes...I see. That error is that said @marceloaqno about own mysensors NRF24 drivers and SPI bus adapt for Raspberry, because for now mysensors is only supported at Raspi and arduinos.
              On Banana CPU detection seems work better (I agree type seems not good...maybe you can change this on configure file and give a try to compile to see what happends) and I figure can work too on OPI too only changing that I said before, but then is raised NRF24 driver and SPI error.

              I see that mysensors RF24 driver are derivated from that https://github.com/mz-fuzzy/RF24 build that at same time last this is forked directly from http://tmrh20.github.io/RF24Installer/RPi/install.sh that we know are working fine on OPI and armbian, so I figure that maybe it´s not so much hard to modify mysensors RF24 to adapt to work on OPI.

              Hope any mysensors "coder" ear our call and cand give us some hand to make the changes on the mysensors build and we can compile the mysgw to OPI soon.

              Cheers

              jirmJ 1 Reply Last reply
              0
              • jirmJ jirm

                @eyesoft

                Yes...I see. That error is that said @marceloaqno about own mysensors NRF24 drivers and SPI bus adapt for Raspberry, because for now mysensors is only supported at Raspi and arduinos.
                On Banana CPU detection seems work better (I agree type seems not good...maybe you can change this on configure file and give a try to compile to see what happends) and I figure can work too on OPI too only changing that I said before, but then is raised NRF24 driver and SPI error.

                I see that mysensors RF24 driver are derivated from that https://github.com/mz-fuzzy/RF24 build that at same time last this is forked directly from http://tmrh20.github.io/RF24Installer/RPi/install.sh that we know are working fine on OPI and armbian, so I figure that maybe it´s not so much hard to modify mysensors RF24 to adapt to work on OPI.

                Hope any mysensors "coder" ear our call and cand give us some hand to make the changes on the mysensors build and we can compile the mysgw to OPI soon.

                Cheers

                jirmJ Offline
                jirmJ Offline
                jirm
                wrote on last edited by jirm
                #212

                @jirm

                As a side coment, the configure file is on the root Mysensors directory that is buid when you complete the first step "git clone https://github.com/mysensors/MySensors.git" on the mysgw install process.

                Anyone can edit the file with a plain text editor and change the values for see what happens when try compile.

                Regards

                M 1 Reply Last reply
                0
                • jirmJ jirm

                  @jirm

                  As a side coment, the configure file is on the root Mysensors directory that is buid when you complete the first step "git clone https://github.com/mysensors/MySensors.git" on the mysgw install process.

                  Anyone can edit the file with a plain text editor and change the values for see what happens when try compile.

                  Regards

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

                  @jirm The configure script from MySensor repo is based on the https://github.com/TMRh20/RF24/blob/master/configure. Could you try with theTMRh20 master branch and post the result?

                  git clone https://github.com/TMRh20/RF24.git
                  cd RF24
                  ./configure
                  make
                  
                  jirmJ 1 Reply Last reply
                  0
                  • eyesoftE Offline
                    eyesoftE Offline
                    eyesoft
                    wrote on last edited by
                    #214

                    @marceloaqno

                    git clone https://github.com/TMRh20/RF24.git
                    cd RF24
                    ./configure
                    [SECTION] Detecting arm compilation environment.
                    [OK] arm-linux-gnueabihf-gcc detected.
                    [OK] arm-linux-gnueabihf-g++ detected.
                    [SECTION] Detecting target machine.
                    [OK] machine detected: SoC=A20, Type=unknown, CPU=armv7l.
                    [SECTION] Detecting DRIVER
                    [OK] DRIVER detected:SPIDEV.
                    [SECTION] Detecting OS.
                    [INFO] OS detected:LINUX.
                    [SECTION] Preparing configuration.
                    [SECTION] Saving configuration.
                    [SECTION] Cleaning previous builds.
                    [OK] Finished.

                    make
                    arm-linux-gnueabihf-g++ -fPIC -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c RF24.cpp
                    arm-linux-gnueabihf-g++ -fPIC -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/spi.cpp
                    arm-linux-gnueabihf-g++ -fPIC -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/gpio.cpp
                    arm-linux-gnueabihf-gcc -fPIC -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/compatibility.c
                    arm-linux-gnueabihf-g++ -fPIC -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/interrupt.c
                    [Linking]
                    arm-linux-gnueabihf-gcc -pthread -shared -Wl,-soname,librf24.so.1 -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -o librf24.so.1.2.0 RF24.o spi.o gpio.o compatibility.o interrupt.o

                    1 Reply Last reply
                    1
                    • OliO Oli

                      How can I update MySensors Gateway from 2.1.0 beta to 2.1.0 stable/final release?

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

                      @Oli After these steps:

                      git clone https://github.com/mysensors/MySensors.git
                      cd MySensors
                      

                      to switch to the master branch, run:

                      git checkout master
                      

                      and reinstall the gateway following the same steps from the instructions.

                      1 Reply Last reply
                      1
                      • eyesoftE Offline
                        eyesoftE Offline
                        eyesoft
                        wrote on last edited by
                        #216

                        @marceloaqno
                        i've tried on banana pi pro :

                        cat /etc/debian_version
                        8.6
                        cat /etc/bananian_platform
                        BananaPro

                        M 1 Reply Last reply
                        0
                        • eyesoftE eyesoft

                          @marceloaqno
                          i've tried on banana pi pro :

                          cat /etc/debian_version
                          8.6
                          cat /etc/bananian_platform
                          BananaPro

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

                          @eyesoft thanks for the feedback, we need to add support for SPIDEV driver in order to use the BananaPi.

                          jirmJ 1 Reply Last reply
                          1
                          • M marceloaqno

                            @jirm The configure script from MySensor repo is based on the https://github.com/TMRh20/RF24/blob/master/configure. Could you try with theTMRh20 master branch and post the result?

                            git clone https://github.com/TMRh20/RF24.git
                            cd RF24
                            ./configure
                            make
                            
                            jirmJ Offline
                            jirmJ Offline
                            jirm
                            wrote on last edited by jirm
                            #218

                            @marceloaqno Sadly I´m so much bussy and traveling for few days and cannot acces to my OPI´s :-( , but I´m sure someone here (@aand , @hausinger, etc.. ) can give a try on her OPI the things we said before. At least I hope this ...

                            1 Reply Last reply
                            0
                            • M marceloaqno

                              @eyesoft thanks for the feedback, we need to add support for SPIDEV driver in order to use the BananaPi.

                              jirmJ Offline
                              jirmJ Offline
                              jirm
                              wrote on last edited by jirm
                              #219

                              @marceloaqno I see some huge steps up on BananaPi...seems only need add SPIDEV support for make it working... :-)

                              1 Reply Last reply
                              0
                              • OliO Offline
                                OliO Offline
                                Oli
                                wrote on last edited by
                                #220

                                @marceloaqno I am rather copy/paste not a programming kind a guy, so sorry for my lame questions.

                                pi@raspberrypi ~ $ git clone https://github.com/mysensors/MySensors.git
                                fatal: destination path 'MySensors' already exists and is not an empty directory

                                pi@raspberrypi ~/MySensors $ git checkout master
                                Branch master set up to track remote branch master from origin.
                                Switched to a new branch 'master'

                                but after that:

                                pi@raspberrypi ~/MySensors $ make
                                make: *** No targets specified and no makefile found. Stop.
                                pi@raspberrypi ~/MySensors $ sudo make install
                                make: *** No rule to make target 'install'. Stop.

                                1 Reply Last reply
                                0
                                • eyesoftE Offline
                                  eyesoftE Offline
                                  eyesoft
                                  wrote on last edited by
                                  #221

                                  @Oli ... try :
                                  ./configure
                                  make
                                  sudo make install

                                  1 Reply Last reply
                                  0
                                  • OliO Offline
                                    OliO Offline
                                    Oli
                                    wrote on last edited by
                                    #222

                                    @eyesoft same errors

                                    jirmJ 1 Reply Last reply
                                    0
                                    • eyesoftE Offline
                                      eyesoftE Offline
                                      eyesoft
                                      wrote on last edited by
                                      #223

                                      @Oli see commands above how to Install and Build, with git checkout master you are on master if you :
                                      cat README.md
                                      MySensors Library v2.1.0

                                      default on git clone you are on development :
                                      cat README.md
                                      MySensors Library v2.2.0-beta

                                      1 Reply Last reply
                                      0
                                      • OliO Oli

                                        @eyesoft same errors

                                        jirmJ Offline
                                        jirmJ Offline
                                        jirm
                                        wrote on last edited by jirm
                                        #224

                                        @Oli First you need delete all Mysensors directory on your machine.
                                        Then use step by step the guide on Mysensors Gateway installation process:
                                        https://www.mysensors.org/build/raspberry
                                        Dont forget put command sudo on sentences if needed.

                                        Regards

                                        1 Reply Last reply
                                        0
                                        • OliO Offline
                                          OliO Offline
                                          Oli
                                          wrote on last edited by
                                          #225

                                          I wanna update not to re install of MySensors. I thought about something like ./updaterelease or ./updatebeta... I spend hours of make it work before, so I leave it as it is. No time or nerves for fighting next couple of days.

                                          mfalkviddM jirmJ 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          11

                                          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