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. Development
  3. Mysensors Gateway on OrangePi (Zero) (opi)

Mysensors Gateway on OrangePi (Zero) (opi)

Scheduled Pinned Locked Moved Development
117 Posts 11 Posters 43.1k Views 11 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.
  • jirmJ jirm

    @Tag
    I agree to open a new thread specifically to try to run Mysensor on Orange PI.

    With some help here from Mysensors coders I belive is possible to make it work soon.

    As a summary I think that you can already make several tests that yesterday were suggested by @marceloaqno and @aanden @hausinger and in the general all OPI users for post of support to the installation of mysgw to see the result of the same and evaluate if these produce some progress in the solution.

    I have some rage at not being able to do them test myself and help much bettter, but I am away from home during these days and I have no possibility.

    In any case try to summarize what would be convenient to try on first place if can detect nrf24 module with RF24 driver, as suggested yesterday by @marceloaqno:

    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

    As reference that maybe can help too below post about install NRF24 module on OPI and Armbian, that they finally make work the board:
    https://forum.armbian.com/index.php/topic/3161-orange-pi-one-with-nrf24l01/

    Regards

    T Offline
    T Offline
    Tag
    wrote on last edited by
    #4

    @jirm said:

    Git clone https://github.com/TMRh20/RF24.git

    Hi!,

    I can confirm that i can build the RF24 from TMRh20 without any errors..

    root@orangepizero:~# git clone https://github.com/TMRh20/RF24.git
    Cloning into 'RF24'...
    remote: Counting objects: 3041, done.
    remote: Compressing objects: 100% (8/8), done.
    remote: Total 3041 (delta 2), reused 0 (delta 0), pack-reused 3033
    Receiving objects: 100% (3041/3041), 1.32 MiB | 835.00 KiB/s, done.
    Resolving deltas: 100% (1795/1795), done.
    Checking connectivity... done.
    root@orangepizero:~# cd RF24/
    root@orangepizero:~/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=H3, 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.
    root@orangepizero:~/RF24# make
    arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c RF24.cpp
    /tmp/ccMd5F0g.s: Assembler messages:
    /tmp/ccMd5F0g.s:3924: Warning: IT blocks containing 32-bit Thumb instructions are deprecated in ARMv8
    arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/spi.cpp
    arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/gpio.cpp
    arm-linux-gnueabihf-gcc -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/compatibility.c
    arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -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=armv8-a -mtune=cortex-a53 -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
    root@orangepizero:~/RF24#

    Unfortunately i do not have that much experience with coding... but i can try to help as much as possible by testing.....

    Anyway many thanks for all your help!!

    kind regards,

    Tag

    jirmJ 1 Reply Last reply
    0
    • pansenP pansen

      Hi,

      I just ordered a Opi Plus 2e for usage as a controller + nRF24 PCB. Since you have a zero and my device is not here yet I can only give you some theoretical thoughts:

      First error: this should be easily fixable, but it involves modifiying code.
      Second error: needs a bit more work, because SPI.h is specifically written for RPi, which has different hardware than OPi. I will develop something for my Plus 2e and this could work for you too :)

      Without coding experience it will be very difficult to achieve anything here...

      T Offline
      T Offline
      Tag
      wrote on last edited by
      #5

      @pansen said:

      is should be easily fixable, but it involves modifiying code.
      Second error: needs a bit more work, because SPI.h is specifically written for RPi, which has different hardware than OPi.

      Thanks!!

      1 Reply Last reply
      0
      • pansenP pansen

        Hi,

        I just ordered a Opi Plus 2e for usage as a controller + nRF24 PCB. Since you have a zero and my device is not here yet I can only give you some theoretical thoughts:

        First error: this should be easily fixable, but it involves modifiying code.
        Second error: needs a bit more work, because SPI.h is specifically written for RPi, which has different hardware than OPi. I will develop something for my Plus 2e and this could work for you too :)

        Without coding experience it will be very difficult to achieve anything here...

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

        Hi @pansen
        Totally agree that is needed modify mysensors code (at least some files of mysgw installation process) to make work it on OPI board. But I'm little more optimistic with that because some coder here ( @marceloaqno ??? ) sure would help mostly if only is needed include the changes on code but we can offer he all the workaround about issues we found and tested all the code that can avoid the problems.
        About SPI.h , of course we need provide tested the proper all OPI librarys that differ from Raspi.
        Regard this I´m figure that the SPI library is included in the driver for NRF24 (Tmr20h) that @aand some days ago feedback is working fine on OPI.
        If so then only will be need changed this library to de mysgw installation process when a OPI board is detected.

        See you

        pansenP 1 Reply Last reply
        0
        • T Tag

          @jirm said:

          Git clone https://github.com/TMRh20/RF24.git

          Hi!,

          I can confirm that i can build the RF24 from TMRh20 without any errors..

          root@orangepizero:~# git clone https://github.com/TMRh20/RF24.git
          Cloning into 'RF24'...
          remote: Counting objects: 3041, done.
          remote: Compressing objects: 100% (8/8), done.
          remote: Total 3041 (delta 2), reused 0 (delta 0), pack-reused 3033
          Receiving objects: 100% (3041/3041), 1.32 MiB | 835.00 KiB/s, done.
          Resolving deltas: 100% (1795/1795), done.
          Checking connectivity... done.
          root@orangepizero:~# cd RF24/
          root@orangepizero:~/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=H3, 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.
          root@orangepizero:~/RF24# make
          arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c RF24.cpp
          /tmp/ccMd5F0g.s: Assembler messages:
          /tmp/ccMd5F0g.s:3924: Warning: IT blocks containing 32-bit Thumb instructions are deprecated in ARMv8
          arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/spi.cpp
          arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/gpio.cpp
          arm-linux-gnueabihf-gcc -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/compatibility.c
          arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -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=armv8-a -mtune=cortex-a53 -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
          root@orangepizero:~/RF24#

          Unfortunately i do not have that much experience with coding... but i can try to help as much as possible by testing.....

          Anyway many thanks for all your help!!

          kind regards,

          Tag

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

          @Tag
          I see... Then we have a driver installed properly on OPI from where Mysensors gateway are derived that they use. So agree this issue seems easily fixable on mysensors code.
          Can you now that have a NRF24 driver installed try follow the step by step mysgw installation process ( https://www.mysensors.org/build/raspberry ) and post here what happens ?

          I figure that SPI library (for OPI) is needed too for the master driver TMR20h, so seems is only needed adapt the mysgw code to use this when the OPI board are detected.
          I belive this next too lines extracted from your test say SPI is well detected and ready:

          .....
          [SECTION] Detecting DRIVER
          [OK] DRIVER detected:SPIDEV.
          ....

          I think banana boards are in the exact same situation than OPI (yesterday someone run the same tests in Banana board and have the same result) and maybe is easy can include both at same time on Mysensors.

          Now is matter that any mysensors coder can ear our call and help us to deal with mysensors code

          See you

          1 Reply Last reply
          0
          • jirmJ jirm

            Hi @pansen
            Totally agree that is needed modify mysensors code (at least some files of mysgw installation process) to make work it on OPI board. But I'm little more optimistic with that because some coder here ( @marceloaqno ??? ) sure would help mostly if only is needed include the changes on code but we can offer he all the workaround about issues we found and tested all the code that can avoid the problems.
            About SPI.h , of course we need provide tested the proper all OPI librarys that differ from Raspi.
            Regard this I´m figure that the SPI library is included in the driver for NRF24 (Tmr20h) that @aand some days ago feedback is working fine on OPI.
            If so then only will be need changed this library to de mysgw installation process when a OPI board is detected.

            See you

            pansenP Offline
            pansenP Offline
            pansen
            wrote on last edited by
            #8

            @jirm said:

            sure would help mostly if only is needed include the changes on code but we can offer he all the workaround about issues we found and tested all the code that can avoid the problems.
            About SPI.h , of course we need provide tested the proper all OPI librarys that differ from Raspi.
            Regard this I´m figure that the SPI library is included in the driver for NRF24 (Tmr20h) that @aand some days ago feedback is working fine on OPI.
            If so then only will be need changed this library to de mysgw installation process when a OPI board is detected.

            Agreed! The way I see it too is that we just need to swap RPi SPI library with the OPi implementation (SPIDEV by the looks) or write a wrapper that looks the same to mysensors. I'm raging too because I won't get my board before a few weeks...Tmr20h's git code should be good to see if the NRF24 board actually works at all. Programmingwise I'd create a new compiler flag, identifying the host computer as an OPi and then from there...I am new to community projects, could a fork easily be merged back into the master branch? What's the procedure for mysensors?

            Orange Pi Plus 2e connected to nrf24 PA via SPI running git-development MySensors gateway, OpenHAB2, mosquitto and MySQL persistence.

            jirmJ 1 Reply Last reply
            0
            • pansenP Offline
              pansenP Offline
              pansen
              wrote on last edited by
              #9

              probably related: https://github.com/mysensors/MySensors/issues/719

              Orange Pi Plus 2e connected to nrf24 PA via SPI running git-development MySensors gateway, OpenHAB2, mosquitto and MySQL persistence.

              jirmJ 1 Reply Last reply
              0
              • pansenP pansen

                @jirm said:

                sure would help mostly if only is needed include the changes on code but we can offer he all the workaround about issues we found and tested all the code that can avoid the problems.
                About SPI.h , of course we need provide tested the proper all OPI librarys that differ from Raspi.
                Regard this I´m figure that the SPI library is included in the driver for NRF24 (Tmr20h) that @aand some days ago feedback is working fine on OPI.
                If so then only will be need changed this library to de mysgw installation process when a OPI board is detected.

                Agreed! The way I see it too is that we just need to swap RPi SPI library with the OPi implementation (SPIDEV by the looks) or write a wrapper that looks the same to mysensors. I'm raging too because I won't get my board before a few weeks...Tmr20h's git code should be good to see if the NRF24 board actually works at all. Programmingwise I'd create a new compiler flag, identifying the host computer as an OPi and then from there...I am new to community projects, could a fork easily be merged back into the master branch? What's the procedure for mysensors?

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

                Hi @pansen, yes no seems so much tricky and will need so much effort to make the proper changes to Mysensors code for install on OPI (and Banana) , but that is only matter that main code developers here that are maintaining this code like do that but in this moment I don't know what is in the developer's "brain" about include support for other boards than RPI....so like I said before we only can ask they and purpose include their support for OPI board and see what will happen.

                I'm too not a software coder, so can reply properly about coding and her methods and best practices but anyone can always "purpose" the changes to the responsible developers directly on through the github repository of the concrete software (similar to report issues, purpose improvements, etc...) and then if approved by developers they make the changes to the code.

                Of course always anyone can fork the github (if is licence allowed) and make another branch/project to fits its own purposes.

                Regards.

                1 Reply Last reply
                0
                • pansenP pansen

                  probably related: https://github.com/mysensors/MySensors/issues/719

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

                  @pansen Yes...This is a pull purpose to support Banana.
                  If you see yesterday messages on support post for Mysensors RPI Gateway, you can see some test for that guy @eyesoft and I like see this ended in that purpose on github. That's I would mean about all that before.

                  We can do the same about OPI boards because we are in exactly same situation and have the same test than Banana completed.

                  Generally speaking all this is I refer in my last post here.

                  Regards

                  1 Reply Last reply
                  0
                  • pansenP Offline
                    pansenP Offline
                    pansen
                    wrote on last edited by
                    #12

                    @jirm ah yes, sorry, I oversaw that. Digging more into what you wrote, git and the forum it looks liek there is some progress. See also @marceloaqno fork: https://github.com/marceloaqno/MySensors/commit/8ae05ac79b5b603754350fe0ac8b96b0ad2ab9b7?diff=split

                    Orange Pi Plus 2e connected to nrf24 PA via SPI running git-development MySensors gateway, OpenHAB2, mosquitto and MySQL persistence.

                    jirmJ 1 Reply Last reply
                    0
                    • pansenP pansen

                      @jirm ah yes, sorry, I oversaw that. Digging more into what you wrote, git and the forum it looks liek there is some progress. See also @marceloaqno fork: https://github.com/marceloaqno/MySensors/commit/8ae05ac79b5b603754350fe0ac8b96b0ad2ab9b7?diff=split

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

                      @pansen
                      Yes...the test that @eyessoft did were indicated by @marceloaqno that is a developer on mysensors...so I suppose he are over it to solve.
                      I hope @marceloaqno (that knows about OPI issue and yesterday he too try help us with OPI) don't forget us and help to make work OPI too.
                      But we need some guy with OPI board ( @Tag ?? ) that in short time can follow the developer indications and run the test he purpose for debug and test when he are modifying the code .

                      So that's where we are for now...

                      Regards

                      jirmJ 1 Reply Last reply
                      0
                      • jirmJ jirm

                        @pansen
                        Yes...the test that @eyessoft did were indicated by @marceloaqno that is a developer on mysensors...so I suppose he are over it to solve.
                        I hope @marceloaqno (that knows about OPI issue and yesterday he too try help us with OPI) don't forget us and help to make work OPI too.
                        But we need some guy with OPI board ( @Tag ?? ) that in short time can follow the developer indications and run the test he purpose for debug and test when he are modifying the code .

                        So that's where we are for now...

                        Regards

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

                        @Tag, @pansen
                        I insist that I think that it would be very good if whatever ( @Tag ?? ) that has an OPI in place tried to run the mysgw install again and see what errors appear just after compile NRF24 driver, now that we know the TRM20h driver is working.
                        With this test we could try to transfer the result to @marceloqano (or any developer available here) to try to also modify the mysensors code for OPI.

                        Regards

                        1 Reply Last reply
                        0
                        • T Offline
                          T Offline
                          Tag
                          wrote on last edited by Tag
                          #15

                          Hi Guys,
                          Sure, just let me know what to test.... The OPI is up and running :)

                          Sofar this is what i did:

                          Install the NRF24 driver:
                          oot@orangepizero:~# git clone https://github.com/TMRh20/RF24.git
                          Cloning into 'RF24'...
                          remote: Counting objects: 3041, done.
                          remote: Compressing objects: 100% (8/8), done.
                          remote: Total 3041 (delta 2), reused 0 (delta 0), pack-reused 3033
                          Receiving objects: 100% (3041/3041), 1.32 MiB | 835.00 KiB/s, done.
                          Resolving deltas: 100% (1795/1795), done.
                          Checking connectivity... done.
                          root@orangepizero:~# cd RF24/
                          root@orangepizero:~/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=H3, 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.
                          root@orangepizero:~/RF24# make
                          arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c RF24.cpp
                          /tmp/ccMd5F0g.s: Assembler messages:
                          /tmp/ccMd5F0g.s:3924: Warning: IT blocks containing 32-bit Thumb instructions are deprecated in ARMv8
                          arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/spi.cpp
                          arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/gpio.cpp
                          arm-linux-gnueabihf-gcc -fPIC -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -Ofast -Wall -pthread -c utility/SPIDEV/compatibility.c
                          arm-linux-gnueabihf-g++ -fPIC -march=armv8-a -mtune=cortex-a53 -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=armv8-a -mtune=cortex-a53 -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

                          root@orangepizero:~/RF24# make install
                          [Installing Libs to /usr/local/lib]
                          [Installing Headers to /usr/local/include/RF24]

                          MySensors:

                          root@orangepizero:~# git clone https://github.com/mysensors/MySensors.git
                          Cloning into 'MySensors'...
                          remote: Counting objects: 13768, done.
                          remote: Compressing objects: 100% (12/12), done.
                          remote: Total 13768 (delta 1), reused 0 (delta 0), pack-reused 13754
                          Receiving objects: 100% (13768/13768), 9.61 MiB | 3.08 MiB/s, done.
                          Resolving deltas: 100% (8248/8248), done.
                          Checking connectivity... done.

                          root@orangepizero:~# cd MySensors/
                          root@orangepizero:~/MySensors# ./configure
                          [SECTION] Detecting target machine.
                          [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
                          [OK] init system detected: systemd
                          [SECTION] Saving configuration.
                          [SECTION] Cleaning previous builds.
                          [OK] Finished.

                          root@orangepizero:~/MySensors# make
                          gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_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
                          g++ -MT build/drivers/Linux/noniso.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/noniso.cpp -o build/drivers/Linux/noniso.o
                          g++ -MT build/drivers/Linux/Print.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/Print.cpp -o build/drivers/Linux/Print.o
                          g++ -MT build/drivers/Linux/EthernetClient.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/EthernetClient.cpp -o build/drivers/Linux/EthernetClient.o
                          g++ -MT build/drivers/Linux/SerialPort.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/SerialPort.cpp -o build/drivers/Linux/SerialPort.o
                          g++ -MT build/drivers/Linux/Stream.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/Stream.cpp -o build/drivers/Linux/Stream.o
                          g++ -MT build/drivers/Linux/IPAddress.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/IPAddress.cpp -o build/drivers/Linux/IPAddress.o
                          g++ -MT build/drivers/Linux/compatibility.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/compatibility.cpp -o build/drivers/Linux/compatibility.o
                          g++ -MT build/drivers/Linux/SoftEeprom.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/SoftEeprom.cpp -o build/drivers/Linux/SoftEeprom.o
                          g++ -MT build/drivers/Linux/EthernetServer.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/EthernetServer.cpp -o build/drivers/Linux/EthernetServer.o
                          g++ -MT build/examples_linux/mysgw.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c examples_linux/mysgw.cpp -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
                          root@orangepizero:~/MySensors#

                          Followed the manual you pointed out to install for RPI

                          Seems i use the beta software:
                          root@orangepizero:~/MySensors# more README.md
                          MySensors Library v2.2.0-beta

                          Armbian:
                          root@orangepizero:~# uname -a
                          Linux orangepizero 3.4.113-sun8i #50 SMP PREEMPT Mon Nov 14 08:41:55 CET 2016 armv7l GNU/Linux

                          ARMBIAN Debian GNU/Linux 8 (jessie) 3.4.113-sun8i

                          Hope it helps!

                          1 Reply Last reply
                          0
                          • T Offline
                            T Offline
                            Tag
                            wrote on last edited by Tag
                            #16

                            @pansen,

                            Not sure if this is useful but, checked this one:https://github.com/mysensors/MySensors/issues/719

                            root@orangepizero:~/test# git clone https://github.com/marceloaqno/MySensors.git marceloaqno-spidev
                            Cloning into 'marceloaqno-spidev'...
                            remote: Counting objects: 13825, done.
                            remote: Compressing objects: 100% (26/26), done.
                            remote: Total 13825 (delta 4), reused 0 (delta 0), pack-reused 13799
                            Receiving objects: 100% (13825/13825), 9.65 MiB | 3.27 MiB/s, done.
                            Resolving deltas: 100% (8284/8284), done.
                            Checking connectivity... done.

                            root@orangepizero:~/test# cd marceloaqno-spidev/

                            root@orangepizero:~/test/marceloaqno-spidev# git checkout spidev
                            Branch spidev set up to track remote branch spidev from origin.
                            Switched to a new branch 'spidev'
                            root@orangepizero:~/test/marceloaqno-spidev# ;s
                            -bash: syntax error near unexpected token `;'
                            root@orangepizero:~/test/marceloaqno-spidev# ls
                            configure Doxyfile initscripts Makefile README.md
                            CONTRIBUTING.md drivers keywords.txt MyConfig.h tests
                            core examples library.json MySensors.h
                            Documentation examples_linux library.properties projects

                            root@orangepizero:~/test/marceloaqno-spidev# ./configure
                            [SECTION] Detecting target machine.
                            [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
                            [SECTION] Detecting GPIO driver.
                            [OK] GPIO driver detected:SPIDEV.
                            [SECTION] Detecting init system.
                            [OK] init system detected: systemd.
                            [SECTION] Saving configuration.
                            [SECTION] Cleaning previous builds.
                            [OK] Finished.

                            root@orangepizero:~/test/marceloaqno-spidev# make
                            gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/log.c -o build/drivers/Linux/log.o
                            g++ -MT build/drivers/Linux/noniso.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/noniso.cpp -o build/drivers/Linux/noniso.o
                            g++ -MT build/drivers/Linux/Print.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Print.cpp -o build/drivers/Linux/Print.o
                            g++ -MT build/drivers/Linux/EthernetClient.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/EthernetClient.cpp -o build/drivers/Linux/EthernetClient.o
                            g++ -MT build/drivers/Linux/SerialPort.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SerialPort.cpp -o build/drivers/Linux/SerialPort.o
                            g++ -MT build/drivers/Linux/Stream.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Stream.cpp -o build/drivers/Linux/Stream.o
                            In file included from drivers/Linux/Stream.cpp:24:0:
                            ./drivers/Linux/Arduino.h:17:18: fatal error: GPIO.h: No such file or directory
                            #include "GPIO.h"
                            ^
                            compilation terminated.
                            Makefile:114: recipe for target 'build/drivers/Linux/Stream.o' failed
                            make: *** [build/drivers/Linux/Stream.o] Error 1
                            root@orangepizero:~/test/marceloaqno-spidev#

                            jirmJ 1 Reply Last reply
                            0
                            • T Tag

                              @pansen,

                              Not sure if this is useful but, checked this one:https://github.com/mysensors/MySensors/issues/719

                              root@orangepizero:~/test# git clone https://github.com/marceloaqno/MySensors.git marceloaqno-spidev
                              Cloning into 'marceloaqno-spidev'...
                              remote: Counting objects: 13825, done.
                              remote: Compressing objects: 100% (26/26), done.
                              remote: Total 13825 (delta 4), reused 0 (delta 0), pack-reused 13799
                              Receiving objects: 100% (13825/13825), 9.65 MiB | 3.27 MiB/s, done.
                              Resolving deltas: 100% (8284/8284), done.
                              Checking connectivity... done.

                              root@orangepizero:~/test# cd marceloaqno-spidev/

                              root@orangepizero:~/test/marceloaqno-spidev# git checkout spidev
                              Branch spidev set up to track remote branch spidev from origin.
                              Switched to a new branch 'spidev'
                              root@orangepizero:~/test/marceloaqno-spidev# ;s
                              -bash: syntax error near unexpected token `;'
                              root@orangepizero:~/test/marceloaqno-spidev# ls
                              configure Doxyfile initscripts Makefile README.md
                              CONTRIBUTING.md drivers keywords.txt MyConfig.h tests
                              core examples library.json MySensors.h
                              Documentation examples_linux library.properties projects

                              root@orangepizero:~/test/marceloaqno-spidev# ./configure
                              [SECTION] Detecting target machine.
                              [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
                              [SECTION] Detecting GPIO driver.
                              [OK] GPIO driver detected:SPIDEV.
                              [SECTION] Detecting init system.
                              [OK] init system detected: systemd.
                              [SECTION] Saving configuration.
                              [SECTION] Cleaning previous builds.
                              [OK] Finished.

                              root@orangepizero:~/test/marceloaqno-spidev# make
                              gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/log.c -o build/drivers/Linux/log.o
                              g++ -MT build/drivers/Linux/noniso.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/noniso.cpp -o build/drivers/Linux/noniso.o
                              g++ -MT build/drivers/Linux/Print.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Print.cpp -o build/drivers/Linux/Print.o
                              g++ -MT build/drivers/Linux/EthernetClient.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/EthernetClient.cpp -o build/drivers/Linux/EthernetClient.o
                              g++ -MT build/drivers/Linux/SerialPort.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SerialPort.cpp -o build/drivers/Linux/SerialPort.o
                              g++ -MT build/drivers/Linux/Stream.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Stream.cpp -o build/drivers/Linux/Stream.o
                              In file included from drivers/Linux/Stream.cpp:24:0:
                              ./drivers/Linux/Arduino.h:17:18: fatal error: GPIO.h: No such file or directory
                              #include "GPIO.h"
                              ^
                              compilation terminated.
                              Makefile:114: recipe for target 'build/drivers/Linux/Stream.o' failed
                              make: *** [build/drivers/Linux/Stream.o] Error 1
                              root@orangepizero:~/test/marceloaqno-spidev#

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

                              Hi @Tag

                              We ( I and @pansen ) talked about that fork over mysensors github that @marceloaqno are doing to support Bananapi.

                              Banana have same soc than OPI, so the issues are the same on both boards for compile mysensors at least at that point. Maybe own OPI GPIO library (If I remeber Wiringpi or similar name or so) will be needed added to the mysensors software, but hope this can be easily do it like one last point.

                              Can you give a try on your OPI board and post results doing same commands than @eyesoft are doing for Banana on the forked github?
                              Then we can see if the same solution than @marceloaqno are building for Banana can be directly applied to our OPI.

                              I mean do this steps:

                              git clone https://github.com/marceloaqno/MySensors.git marceloaqno-spidev
                              git checkout spidev

                              ...
                              then...

                              ./configure --my-gateway=ethernet --my-transport=nrf24 --my-rf24-irq-pin=15 --my-rf24-channel=119

                              ....
                              and last

                              make

                              T 1 Reply Last reply
                              0
                              • jirmJ jirm

                                Hi @Tag

                                We ( I and @pansen ) talked about that fork over mysensors github that @marceloaqno are doing to support Bananapi.

                                Banana have same soc than OPI, so the issues are the same on both boards for compile mysensors at least at that point. Maybe own OPI GPIO library (If I remeber Wiringpi or similar name or so) will be needed added to the mysensors software, but hope this can be easily do it like one last point.

                                Can you give a try on your OPI board and post results doing same commands than @eyesoft are doing for Banana on the forked github?
                                Then we can see if the same solution than @marceloaqno are building for Banana can be directly applied to our OPI.

                                I mean do this steps:

                                git clone https://github.com/marceloaqno/MySensors.git marceloaqno-spidev
                                git checkout spidev

                                ...
                                then...

                                ./configure --my-gateway=ethernet --my-transport=nrf24 --my-rf24-irq-pin=15 --my-rf24-channel=119

                                ....
                                and last

                                make

                                T Offline
                                T Offline
                                Tag
                                wrote on last edited by Tag
                                #18

                                @jirm

                                Sure!, here you go:

                                root@orangepizero:~# rm -r MySensors/
                                root@orangepizero:~# git clone https://github.com/marceloaqno/MySensors.git marceloaqno-spidev
                                Cloning into 'marceloaqno-spidev'...
                                remote: Counting objects: 13825, done.
                                remote: Compressing objects: 100% (26/26), done.
                                remote: Total 13825 (delta 4), reused 0 (delta 0), pack-reused 13799
                                Receiving objects: 100% (13825/13825), 9.65 MiB | 3.01 MiB/s, done.
                                Resolving deltas: 100% (8284/8284), done.
                                Checking connectivity... done.

                                root@orangepizero:~# cd marceloaqno-spidev/
                                root@orangepizero:~/marceloaqno-spidev# git checkout spidev
                                Branch spidev set up to track remote branch spidev from origin.
                                Switched to a new branch 'spidev'

                                root@orangepizero:~/marceloaqno-spidev# ./configure --my-gateway=ethernet --my-transport=nrf24 --my-rf24-irq-pin=15 --my-rf24-channel=119
                                [SECTION] Detecting target machine.
                                [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
                                [SECTION] Detecting GPIO driver.
                                [OK] GPIO driver detected:SPIDEV.
                                [SECTION] Detecting init system.
                                [OK] init system detected: systemd.
                                [SECTION] Saving configuration.
                                [SECTION] Cleaning previous builds.
                                [OK] Finished.

                                root@orangepizero:~/marceloaqno-spidev# make
                                gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/log.c -o build/drivers/Linux/log.o
                                g++ -MT build/drivers/Linux/noniso.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/noniso.cpp -o build/drivers/Linux/noniso.o
                                g++ -MT build/drivers/Linux/Print.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Print.cpp -o build/drivers/Linux/Print.o
                                g++ -MT build/drivers/Linux/EthernetClient.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/EthernetClient.cpp -o build/drivers/Linux/EthernetClient.o
                                g++ -MT build/drivers/Linux/SerialPort.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SerialPort.cpp -o build/drivers/Linux/SerialPort.o
                                g++ -MT build/drivers/Linux/Stream.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Stream.cpp -o build/drivers/Linux/Stream.o
                                g++ -MT build/drivers/Linux/IPAddress.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/IPAddress.cpp -o build/drivers/Linux/IPAddress.o
                                g++ -MT build/drivers/Linux/compatibility.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/compatibility.cpp -o build/drivers/Linux/compatibility.o
                                g++ -MT build/drivers/Linux/SoftEeprom.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SoftEeprom.cpp -o build/drivers/Linux/SoftEeprom.o
                                g++ -MT build/drivers/Linux/EthernetServer.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/EthernetServer.cpp -o build/drivers/Linux/EthernetServer.o
                                g++ -MT build/examples_linux/mysgw.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c examples_linux/mysgw.cpp -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:76:2: error: #error RF24 IRQ usage requires transactional SPI support
                                #error RF24 IRQ usage requires transactional SPI support
                                ^
                                In file included from ./MySensors.h:294:0,
                                from examples_linux/mysgw.cpp:74:
                                ./drivers/RF24/RF24.cpp:39:11: error: Not supported on linux-generic
                                hwDigitalWrite(MY_RF24_CS_PIN, level);
                                ^
                                ./drivers/RF24/RF24.cpp:44:11: error: Not supported on linux-generic
                                hwDigitalWrite(MY_RF24_CE_PIN, level);
                                ^
                                ./drivers/RF24/RF24.cpp:388:11: error: Not supported on linux-generic
                                hwPinMode(MY_RF24_CE_PIN,OUTPUT);
                                ^
                                ./drivers/RF24/RF24.cpp:389:11: error: Not supported on linux-generic
                                hwPinMode(MY_RF24_CS_PIN,OUTPUT);
                                ^
                                ./drivers/RF24/RF24.cpp:391:11: error: Not supported on linux-generic
                                hwPinMode(MY_RF24_IRQ_PIN,INPUT);
                                ^
                                ./drivers/RF24/RF24.cpp:37:32: warning: unused parameter ‘level’ [-Wunused-parameter]
                                LOCAL void RF24_csn(const bool level)
                                ^
                                ./drivers/RF24/RF24.cpp:42:31: warning: unused parameter ‘level’ [-Wunused-parameter]
                                LOCAL void RF24_ce(const bool level)
                                ^
                                ./drivers/RF24/RF24.cpp: In function ‘bool RF24_initialize()’:
                                ./drivers/RF24/RF24.cpp:403:75: error: ‘FALLING’ was not declared in this scope
                                attachInterrupt(digitalPinToInterrupt(MY_RF24_IRQ_PIN), RF24_irqHandler, FALLING);
                                ^
                                ./drivers/RF24/RF24.cpp:403:82: error: ‘attachInterrupt’ was not declared in this scope
                                attachInterrupt(digitalPinToInterrupt(MY_RF24_IRQ_PIN), RF24_irqHandler, FALLING);
                                ^
                                In file included from ./MySensors.h:346:0,
                                from examples_linux/mysgw.cpp:74:
                                ./core/MyMainLinux.cpp: In function ‘void handle_sigint(int)’:
                                ./core/MyMainLinux.cpp:44:33: error: ‘detachInterrupt’ was not declared in this scope
                                detachInterrupt(MY_RF24_IRQ_PIN);
                                ^
                                Makefile:114: recipe for target 'build/examples_linux/mysgw.o' failed
                                make: *** [build/examples_linux/mysgw.o] Error 1
                                root@orangepizero:~/marceloaqno-spidev#

                                Thanks for all the time you guys put into this!! really appreciate it!!

                                jirmJ 1 Reply Last reply
                                0
                                • T Tag

                                  @jirm

                                  Sure!, here you go:

                                  root@orangepizero:~# rm -r MySensors/
                                  root@orangepizero:~# git clone https://github.com/marceloaqno/MySensors.git marceloaqno-spidev
                                  Cloning into 'marceloaqno-spidev'...
                                  remote: Counting objects: 13825, done.
                                  remote: Compressing objects: 100% (26/26), done.
                                  remote: Total 13825 (delta 4), reused 0 (delta 0), pack-reused 13799
                                  Receiving objects: 100% (13825/13825), 9.65 MiB | 3.01 MiB/s, done.
                                  Resolving deltas: 100% (8284/8284), done.
                                  Checking connectivity... done.

                                  root@orangepizero:~# cd marceloaqno-spidev/
                                  root@orangepizero:~/marceloaqno-spidev# git checkout spidev
                                  Branch spidev set up to track remote branch spidev from origin.
                                  Switched to a new branch 'spidev'

                                  root@orangepizero:~/marceloaqno-spidev# ./configure --my-gateway=ethernet --my-transport=nrf24 --my-rf24-irq-pin=15 --my-rf24-channel=119
                                  [SECTION] Detecting target machine.
                                  [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
                                  [SECTION] Detecting GPIO driver.
                                  [OK] GPIO driver detected:SPIDEV.
                                  [SECTION] Detecting init system.
                                  [OK] init system detected: systemd.
                                  [SECTION] Saving configuration.
                                  [SECTION] Cleaning previous builds.
                                  [OK] Finished.

                                  root@orangepizero:~/marceloaqno-spidev# make
                                  gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/log.c -o build/drivers/Linux/log.o
                                  g++ -MT build/drivers/Linux/noniso.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/noniso.cpp -o build/drivers/Linux/noniso.o
                                  g++ -MT build/drivers/Linux/Print.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Print.cpp -o build/drivers/Linux/Print.o
                                  g++ -MT build/drivers/Linux/EthernetClient.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/EthernetClient.cpp -o build/drivers/Linux/EthernetClient.o
                                  g++ -MT build/drivers/Linux/SerialPort.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SerialPort.cpp -o build/drivers/Linux/SerialPort.o
                                  g++ -MT build/drivers/Linux/Stream.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/Stream.cpp -o build/drivers/Linux/Stream.o
                                  g++ -MT build/drivers/Linux/IPAddress.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/IPAddress.cpp -o build/drivers/Linux/IPAddress.o
                                  g++ -MT build/drivers/Linux/compatibility.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/compatibility.cpp -o build/drivers/Linux/compatibility.o
                                  g++ -MT build/drivers/Linux/SoftEeprom.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/SoftEeprom.cpp -o build/drivers/Linux/SoftEeprom.o
                                  g++ -MT build/drivers/Linux/EthernetServer.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/EthernetServer.cpp -o build/drivers/Linux/EthernetServer.o
                                  g++ -MT build/examples_linux/mysgw.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_DRIVER_SPIDEV -DMY_RF24_CHANNEL=119 -DMY_RX_MESSAGE_BUFFER_FEATURE -DMY_RF24_IRQ_PIN=15 -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c examples_linux/mysgw.cpp -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:76:2: error: #error RF24 IRQ usage requires transactional SPI support
                                  #error RF24 IRQ usage requires transactional SPI support
                                  ^
                                  In file included from ./MySensors.h:294:0,
                                  from examples_linux/mysgw.cpp:74:
                                  ./drivers/RF24/RF24.cpp:39:11: error: Not supported on linux-generic
                                  hwDigitalWrite(MY_RF24_CS_PIN, level);
                                  ^
                                  ./drivers/RF24/RF24.cpp:44:11: error: Not supported on linux-generic
                                  hwDigitalWrite(MY_RF24_CE_PIN, level);
                                  ^
                                  ./drivers/RF24/RF24.cpp:388:11: error: Not supported on linux-generic
                                  hwPinMode(MY_RF24_CE_PIN,OUTPUT);
                                  ^
                                  ./drivers/RF24/RF24.cpp:389:11: error: Not supported on linux-generic
                                  hwPinMode(MY_RF24_CS_PIN,OUTPUT);
                                  ^
                                  ./drivers/RF24/RF24.cpp:391:11: error: Not supported on linux-generic
                                  hwPinMode(MY_RF24_IRQ_PIN,INPUT);
                                  ^
                                  ./drivers/RF24/RF24.cpp:37:32: warning: unused parameter ‘level’ [-Wunused-parameter]
                                  LOCAL void RF24_csn(const bool level)
                                  ^
                                  ./drivers/RF24/RF24.cpp:42:31: warning: unused parameter ‘level’ [-Wunused-parameter]
                                  LOCAL void RF24_ce(const bool level)
                                  ^
                                  ./drivers/RF24/RF24.cpp: In function ‘bool RF24_initialize()’:
                                  ./drivers/RF24/RF24.cpp:403:75: error: ‘FALLING’ was not declared in this scope
                                  attachInterrupt(digitalPinToInterrupt(MY_RF24_IRQ_PIN), RF24_irqHandler, FALLING);
                                  ^
                                  ./drivers/RF24/RF24.cpp:403:82: error: ‘attachInterrupt’ was not declared in this scope
                                  attachInterrupt(digitalPinToInterrupt(MY_RF24_IRQ_PIN), RF24_irqHandler, FALLING);
                                  ^
                                  In file included from ./MySensors.h:346:0,
                                  from examples_linux/mysgw.cpp:74:
                                  ./core/MyMainLinux.cpp: In function ‘void handle_sigint(int)’:
                                  ./core/MyMainLinux.cpp:44:33: error: ‘detachInterrupt’ was not declared in this scope
                                  detachInterrupt(MY_RF24_IRQ_PIN);
                                  ^
                                  Makefile:114: recipe for target 'build/examples_linux/mysgw.o' failed
                                  make: *** [build/examples_linux/mysgw.o] Error 1
                                  root@orangepizero:~/marceloaqno-spidev#

                                  Thanks for all the time you guys put into this!! really appreciate it!!

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

                                  @Tag

                                  Thanks to you to make the effort to try our "suppositions" ...

                                  Mmmm...I see some interesting things on your results.

                                  First all your results on OPI really differ from @eyesoft posted on the github. That can mean that Banana are much different (on drivers aspect) than OPI and then same solution cannot be applied to both...bad thing for us.

                                  Then I see on make that the soc (and cpu) are bad seleected (I said this issue yesterday to @marceloaqno on general support post for mysensors gateway) because seems in the configure file have a bad selection about that specs when soc are a H3, and select a bad A53 type of cpu when is Armv7.

                                  Then I don't know if all subsequent errors raised are significant or simply derived from that initially bad cpu selection.

                                  Last I see that have issues on GPIO pins, but this is something we hoped would happen.

                                  Anyway, I'm not coder so maybe are totally grong on all my observations and we need some coder (preferible @marceloaqno ) help us to deal with all that.

                                  Regards and thanks to you !

                                  jirmJ 1 Reply Last reply
                                  0
                                  • jirmJ jirm

                                    @Tag

                                    Thanks to you to make the effort to try our "suppositions" ...

                                    Mmmm...I see some interesting things on your results.

                                    First all your results on OPI really differ from @eyesoft posted on the github. That can mean that Banana are much different (on drivers aspect) than OPI and then same solution cannot be applied to both...bad thing for us.

                                    Then I see on make that the soc (and cpu) are bad seleected (I said this issue yesterday to @marceloaqno on general support post for mysensors gateway) because seems in the configure file have a bad selection about that specs when soc are a H3, and select a bad A53 type of cpu when is Armv7.

                                    Then I don't know if all subsequent errors raised are significant or simply derived from that initially bad cpu selection.

                                    Last I see that have issues on GPIO pins, but this is something we hoped would happen.

                                    Anyway, I'm not coder so maybe are totally grong on all my observations and we need some coder (preferible @marceloaqno ) help us to deal with all that.

                                    Regards and thanks to you !

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

                                    @Tag

                                    I just see than on your previous compilation for NRF24 build from Tmr24h that you confirm is working OK, the compilation have same "bad" cpu type A53 that I figure that is a bad selection for H3 and seems that is not any problem...so now I'dont understand nothing..
                                    Well mean only understand that we need a mysensor coder for help an guidance and if available make to it all the changes needed for OPI on mysenros.

                                    So we need help for all.

                                    Regards

                                    jirmJ 1 Reply Last reply
                                    0
                                    • jirmJ jirm

                                      @Tag

                                      I just see than on your previous compilation for NRF24 build from Tmr24h that you confirm is working OK, the compilation have same "bad" cpu type A53 that I figure that is a bad selection for H3 and seems that is not any problem...so now I'dont understand nothing..
                                      Well mean only understand that we need a mysensor coder for help an guidance and if available make to it all the changes needed for OPI on mysenros.

                                      So we need help for all.

                                      Regards

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

                                      @jirm
                                      As a side comment, posting interesting good info about Orange PI GPIO ports assignment and usage, that can help too:

                                      http://www.cnx-software.com/2015/09/26/status-of-orange-pi-boards-gpio-support/

                                      1 Reply Last reply
                                      0
                                      • pansenP Offline
                                        pansenP Offline
                                        pansen
                                        wrote on last edited by
                                        #22

                                        Great info indeed, thanks! I will join the effort again when the OPi+nRF24 arrived. Just compiling without any hardware feels like baking a cake and not eating it...

                                        Orange Pi Plus 2e connected to nrf24 PA via SPI running git-development MySensors gateway, OpenHAB2, mosquitto and MySQL persistence.

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          mihai.aldea
                                          wrote on last edited by
                                          #23

                                          @Tag The RF24 won't work on the OPi out of the box. Since the GPIO numbering is different it will work but only after some tweaks. I'm not sure if you're familiar with:
                                          http://linux-sunxi.org/GPIO
                                          Once you get the pin numbering figured out you can use the TMRh20 library. I confirm that it works on my OPi PC. Didn't unboxed my OPi Zero yet :yum:
                                          However it's not very clear what sort of gateway you're trying to build. My project will have an OPi Zero running MyController, hooked up to an ATmega328 running the GatewaySerial sketch. The radio will be be connected to the ATmega328 chip. This way I wouldn't have to worry about GPIO pin numbering.

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


                                          13

                                          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