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 marceloaqno

    @jirm If you try to use the nrf24h radio you will get the same error as the @Tag post:

    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
    

    For @aand error, it's what you mention in your early post, a gcc compiler issue.

    MySensors nrf24 drivers uses the SPI interface to drive the module, it's the same driver for all supported platforms (RPi, esp8266, atmega328p, ...), this way it is easier to maintain.

    I understand that it must have been frustrating to find out that it does not work for the OPi but there isn't much I can do to help you. I bought one too, still waiting to arrive.

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

    @marceloaqno

    Really thanks a lot for your work and very much appreciate you try to help us on our "fight" with the OPI board.
    Sadly in this moment I cannot work because I'm out of time to try install all softw stuff on my OPI and try help much more to push it working with mysgw and so on.
    I don't understand so much why is not working out of the box and the driver issue found and/what hardware communication issue are only on OPI with that similar derived Raspbian OS like Raspberry, and too not understand why cannot work on OPI because that SPI bus issue you say.
    @aand reported nrf24 module work very well with TMRh20 driver, so seems hardware are OK on OPI for the module and I suppose still only discover and hopefully make it work avoiding the driver issue you say to compile properly mysgw softw.
    Anyway, I only hope that anyone can help mainly here to make work mysgw on OPI too, and adapt it to work on Armbian, because OPI is a really good choice for HA controller board and sure in near future much people use it.

    Is there any chance to substitute own nfr24 driver mysgw with the TMR20h, at least for testing purposes on OPI?

    If any mysgw "code" people are reading this maybe can try to help us with some idea to try workaround the compilation issue on OPI.

    Best regards and again many thanks!

    PD: Only for test SPI purposses on armbian this can help (post 248) :
    https://forum.armbian.com/index.php/topic/617-wip-orange-pi-one-support-for-the-upcoming-orange-pi-one/page-9#entry5747

    Only for info, other interesting post about how to make work nrf24l01 module on OPI and armbian:
    https://forum.armbian.com/index.php/topic/3161-orange-pi-one-with-nrf24l01/

    Another one interesting post OPI One with armbian using NRF24 module:
    https://forum.armbian.com/index.php/topic/3161-orange-pi-one-with-nrf24l01/

    1 Reply Last reply
    0
    • M musthafa

      @marceloaqno

      OpenHab 2

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

      @musthafa Openhab2 works using mysgw configured as an ethernet gateway. This is the guide I used: https://github.com/tobof/openhab2-addons/wiki

      M 1 Reply Last reply
      0
      • H Offline
        H Offline
        hausinger
        wrote on last edited by
        #202

        Hello.

        I'm also using a orangepi one and wanted to build the gateway on it. But i didn't want to use the nrf24 but a usb to rs485 converter. But if i want to compile it, i get also the same error with the nrf24 and that it is not supporting platform. Why?

        Also if i want to build a serial gateway with a connected arduino on usb port, i got the same error with the nrf24

        1 Reply Last reply
        0
        • M marceloaqno

          @musthafa Openhab2 works using mysgw configured as an ethernet gateway. This is the guide I used: https://github.com/tobof/openhab2-addons/wiki

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

          @marceloaqno thank you.

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

          M 1 Reply Last reply
          0
          • aandA Offline
            aandA Offline
            aand
            wrote on last edited by
            #204

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

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

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

              M 1 Reply Last reply
              0
              • 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
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          6

                                          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