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.
  • pansenP Offline
    pansenP Offline
    pansen
    wrote on last edited by
    #70

    @marceloaqno: are you planning to create a pull request? also, like @Reza suggested i think it would be smart to gather all information somehwhere, unfortunately mysensors does not seem to have a wiki. can we write an article somehow? i could take care of that.

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

    M 1 Reply Last reply
    0
    • pansenP pansen

      @marceloaqno: are you planning to create a pull request? also, like @Reza suggested i think it would be smart to gather all information somehwhere, unfortunately mysensors does not seem to have a wiki. can we write an article somehow? i could take care of that.

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

      @mihai.aldea sorry about the github link mistake.

      @pansen Yes, I will.

      Is the orientation of the pins correct in the image?
      0_1483990616295_Orange-Pi-Zero-Description.jpg

      T 1 Reply Last reply
      0
      • M marceloaqno

        @mihai.aldea sorry about the github link mistake.

        @pansen Yes, I will.

        Is the orientation of the pins correct in the image?
        0_1483990616295_Orange-Pi-Zero-Description.jpg

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

        @marceloaqno

        Nope pinout is reversed!,

        The link below shows the correct one!
        https://oshlab.com/orange-pi-zero-pinout/

        M 1 Reply Last reply
        0
        • T Tag

          @marceloaqno

          Nope pinout is reversed!,

          The link below shows the correct one!
          https://oshlab.com/orange-pi-zero-pinout/

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

          @Tag Oops, did I get it right this time (I reuploaded the image)?

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

            @marceloaqno

            Build the RF24 lib, without erros on the OPI Zero. and am now able to start the tools and radio seems to be recognised!. (was a faulty breadboard wire.... :( )

            Used the follwing to for the radio:

            RF24 radio(2,0);
            

            Output from gettingstarted:

            root@orangepizero:~/rf24libs/RF24/examples_linux# ./gettingstarted
            RF24/examples/GettingStarted/
            STATUS           = 0x00 RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=0 TX_FULL=0
            RX_ADDR_P0-1     = 0x0000000000 0xff00000000
            RX_ADDR_P2-5     = 0xff 0xff 0xff 0xff
            TX_ADDR          = 0xffffffffff
            RX_PW_P0-6       = 0xff 0xff 0xff 0xff 0xff 0xff
            EN_AA            = 0xff
            EN_RXADDR        = 0xff
            RF_CH            = 0xbc
            RF_SETUP         = 0xff
            CONFIG           = 0xff
            DYNPD/FEATURE    = 0xff 0xff
            Data Rate        = 1MBPS
            Model            = nRF24L01
            CRC Length       = 16 bits
            PA Power         = PA_MAX
            
             ************ Role Setup ***********
            Choose a role: Enter 0 for pong_back, 1 for ping_out (CTRL+C to exit) 
            >
            
            M 1 Reply Last reply
            0
            • T Tag

              @marceloaqno

              Build the RF24 lib, without erros on the OPI Zero. and am now able to start the tools and radio seems to be recognised!. (was a faulty breadboard wire.... :( )

              Used the follwing to for the radio:

              RF24 radio(2,0);
              

              Output from gettingstarted:

              root@orangepizero:~/rf24libs/RF24/examples_linux# ./gettingstarted
              RF24/examples/GettingStarted/
              STATUS           = 0x00 RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=0 TX_FULL=0
              RX_ADDR_P0-1     = 0x0000000000 0xff00000000
              RX_ADDR_P2-5     = 0xff 0xff 0xff 0xff
              TX_ADDR          = 0xffffffffff
              RX_PW_P0-6       = 0xff 0xff 0xff 0xff 0xff 0xff
              EN_AA            = 0xff
              EN_RXADDR        = 0xff
              RF_CH            = 0xbc
              RF_SETUP         = 0xff
              CONFIG           = 0xff
              DYNPD/FEATURE    = 0xff 0xff
              Data Rate        = 1MBPS
              Model            = nRF24L01
              CRC Length       = 16 bits
              PA Power         = PA_MAX
              
               ************ Role Setup ***********
              Choose a role: Enter 0 for pong_back, 1 for ping_out (CTRL+C to exit) 
              >
              
              M Offline
              M Offline
              marceloaqno
              Code Contributor
              wrote on last edited by marceloaqno
              #75

              @Tag Could you fill this table with your current setup?

              nRF24L01 | OrangePi  | OrangePi
                       | phyPin    | GPIO
              _________|_______________________
              VCC      | 3V3-PWR   | 3V3-PWR
              GND      | GND       | GND
              CSN      |           |
              CE       |           |
              MOSI     | 19        | 15
              SCK      | 23        | 14
              MISO     | 21        | 16
              
              T 1 Reply Last reply
              0
              • M marceloaqno

                @Tag Could you fill this table with your current setup?

                nRF24L01 | OrangePi  | OrangePi
                         | phyPin    | GPIO
                _________|_______________________
                VCC      | 3V3-PWR   | 3V3-PWR
                GND      | GND       | GND
                CSN      |           |
                CE       |           |
                MOSI     | 19        | 15
                SCK      | 23        | 14
                MISO     | 21        | 16
                
                T Offline
                T Offline
                Tag
                wrote on last edited by
                #76

                @marceloaqno

                Sure here it is,

                nRF24L01 | OrangePi  | OrangePi
                         | phyPin    | GPIO
                _________|_______________________
                VCC      | 3V3-PWR   | 3V3-PWR
                GND      | GND       | GND
                CSN      | 24        | 13
                CE       | 22        | 2
                MOSI     | 19        | 15
                SCK      | 23        | 14
                MISO     | 21        | 16
                

                Radio seems to be recognised, still need to test data transfer...

                M 1 Reply Last reply
                0
                • T Tag

                  @marceloaqno

                  Sure here it is,

                  nRF24L01 | OrangePi  | OrangePi
                           | phyPin    | GPIO
                  _________|_______________________
                  VCC      | 3V3-PWR   | 3V3-PWR
                  GND      | GND       | GND
                  CSN      | 24        | 13
                  CE       | 22        | 2
                  MOSI     | 19        | 15
                  SCK      | 23        | 14
                  MISO     | 21        | 16
                  

                  Radio seems to be recognised, still need to test data transfer...

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

                  I created the draft for the official article: https://www.mysensors.org/build/orange

                  mfalkviddM T R 3 Replies Last reply
                  3
                  • M marceloaqno

                    I created the draft for the official article: https://www.mysensors.org/build/orange

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

                    @marceloaqno and everyone else involved in this effort: great work! I love when people come together to solve a problem.

                    jirmJ 1 Reply Last reply
                    1
                    • mfalkviddM mfalkvidd

                      @marceloaqno and everyone else involved in this effort: great work! I love when people come together to solve a problem.

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

                      @marceloaqno
                      @mfalkvidd @Tag @pansen @Reza @mihai.aldea @hausinger

                      Wooow woow woow !!!

                      Only few days "off" and the problem to make work Mysensors on OPI are solved.

                      So many many thanks to all people here that have been involved to make that OPI good little boards can work with Mysensors.

                      This is the proof that when good people join can reach the most difficult achievements and all humanity can benefit.

                      Awesome work !

                      Regards

                      1 Reply Last reply
                      1
                      • M marceloaqno

                        I created the draft for the official article: https://www.mysensors.org/build/orange

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

                        @marceloaqno

                        Great work!!! the GPIO part most probably needs some additions for OPI zero on the topic of the spidev1.0 driver and the GPIO pins, send it to you once i got everything documented.

                        Really many thanks for your hard work here!!

                        1 Reply Last reply
                        0
                        • R Offline
                          R Offline
                          Reza
                          wrote on last edited by
                          #81
                          This post is deleted!
                          1 Reply Last reply
                          0
                          • M marceloaqno

                            I created the draft for the official article: https://www.mysensors.org/build/orange

                            R Offline
                            R Offline
                            Reza
                            wrote on last edited by
                            #82

                            @marceloaqno
                            thank you. but i have error:

                            root@OrangePI:~# ls /sys/class/gpio/export
                            ls: cannot access /sys/class/gpio/export: No such file or directory
                            root@OrangePI:~# modprobe gpio-sunxi
                            root@OrangePI:~# ls /sys/class/gpio/export
                            ls: cannot access /sys/class/gpio/export: No such file or directory
                            
                            

                            in class folder i dont have gpio folder (i use a orangepi one with ubuntu os )
                            0_1484050121184_lll;l.jpg

                            i

                            T 1 Reply Last reply
                            0
                            • R Reza

                              @marceloaqno
                              thank you. but i have error:

                              root@OrangePI:~# ls /sys/class/gpio/export
                              ls: cannot access /sys/class/gpio/export: No such file or directory
                              root@OrangePI:~# modprobe gpio-sunxi
                              root@OrangePI:~# ls /sys/class/gpio/export
                              ls: cannot access /sys/class/gpio/export: No such file or directory
                              
                              

                              in class folder i dont have gpio folder (i use a orangepi one with ubuntu os )
                              0_1484050121184_lll;l.jpg

                              i

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

                              @Reza

                              You need to create the files after each boot.

                              After the modprobe, Issue this command:

                              sudo for A in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do echo "$A" > /sys/class/gpio/export ; done
                              

                              This will get you the files.

                              R 2 Replies Last reply
                              0
                              • R Offline
                                R Offline
                                Reza
                                wrote on last edited by
                                #84
                                root@OrangePI:~# git clone https://github.com/marceloaqno/MySensors.git orangepi               Cloning into 'orangepi'...
                                remote: Counting objects: 13858, done.
                                remote: Compressing objects: 100% (50/50), done.
                                remote: Total 13858 (delta 17), reused 0 (delta 0), pack-reused 13808
                                Receiving objects: 100% (13858/13858), 9.68 MiB | 79.00 KiB/s, done.
                                Resolving deltas: 100% (8304/8304), done.
                                Checking connectivity... done.
                                root@OrangePI:~# cd orangepi/
                                root@OrangePI:~/orangepi# git pull origin spidev
                                From https://github.com/marceloaqno/MySensors
                                 * branch            spidev     -> FETCH_HEAD
                                Updating 570b607..63e1a81
                                Fast-forward
                                 Makefile                                          |  16 +++
                                 MyConfig.h                                        |   4 +
                                 MySensors.h                                       |   2 +-
                                 configure                                         |  79 ++++++++++---
                                 core/MyHwLinuxGeneric.cpp                         |  17 +++
                                 core/MyHwLinuxGeneric.h                           |  12 +-
                                 core/MyHwRPi.cpp                                  |   1 +
                                 core/MyHwRPi.h                                    |  28 -----
                                 core/MyMainLinux.cpp                              |  30 ++---
                                 drivers/{RPi => BCM}/SPI.cpp                      |  10 +-
                                 drivers/{RPi => BCM}/SPI.h                        | 116 ++++++++++++-------
                                 drivers/{RPi => BCM}/Wire.cpp                     |   0
                                 drivers/{RPi => BCM}/Wire.h                       |   1 +
                                 drivers/Linux/Arduino.h                           |  22 +++-
                                 drivers/Linux/GPIO.cpp                            | 119 ++++++++++++++++++++
                                 drivers/Linux/GPIO.h                              |  47 ++++++++
                                 drivers/Linux/Stream.h                            |   1 +
                                 drivers/Linux/compatibility.cpp                   |  11 +-
                                 drivers/{RPi/rpi_util.cpp => Linux/interrupt.cpp} | 144 +++++-------------------
                                 drivers/Linux/interrupt.h                         |  45 ++++++++
                                 drivers/RF24/RF24.cpp                             |   4 +-
                                 drivers/RF24/RF24.h                               |   2 +-
                                 drivers/RPi/RPi.cpp                               |  59 ++++++++++
                                 drivers/RPi/RPi.h                                 |  22 ++++
                                 drivers/RPi/piHiPri.c                             |  49 --------
                                 drivers/RPi/rpi_util.h                            |  76 -------------
                                 drivers/RPi/wiring.cpp                            |  72 ++++++++++++
                                 drivers/RPi/wiring.h                              |  24 ++++
                                 drivers/SPIDEV/SPI.cpp                            | 223 +++++++++++++++++++++++++++++++++++++
                                 drivers/SPIDEV/SPI.h                              | 178 +++++++++++++++++++++++++++++
                                 30 files changed, 1054 insertions(+), 360 deletions(-)
                                 rename drivers/{RPi => BCM}/SPI.cpp (100%)
                                 rename drivers/{RPi => BCM}/SPI.h (62%)
                                 rename drivers/{RPi => BCM}/Wire.cpp (100%)
                                 rename drivers/{RPi => BCM}/Wire.h (99%)
                                 create mode 100644 drivers/Linux/GPIO.cpp
                                 create mode 100644 drivers/Linux/GPIO.h
                                 rename drivers/{RPi/rpi_util.cpp => Linux/interrupt.cpp} (63%)
                                 create mode 100644 drivers/Linux/interrupt.h
                                 create mode 100644 drivers/RPi/RPi.cpp
                                 create mode 100644 drivers/RPi/RPi.h
                                 delete mode 100644 drivers/RPi/piHiPri.c
                                 delete mode 100644 drivers/RPi/rpi_util.h
                                 create mode 100644 drivers/RPi/wiring.cpp
                                 create mode 100644 drivers/RPi/wiring.h
                                 create mode 100644 drivers/SPIDEV/SPI.cpp
                                 create mode 100644 drivers/SPIDEV/SPI.h
                                root@OrangePI:~/orangepi# ./configure
                                [SECTION] Detecting target machine.
                                  [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
                                [SECTION] Detecting SPI driver.
                                  [OK] SPI driver detected:SPIDEV.
                                [SECTION] Detecting init system.
                                  [OK] init system detected: systemd.
                                [SECTION] Saving configuration.
                                [SECTION] Cleaning previous builds.
                                [OK] Finished.
                                root@OrangePI:~/orangepi# 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_SPI_SPIDEV -DLINUX_ARCH_ORANGEPI  -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/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_SPI_SPIDEV -DLINUX_ARCH_ORANGEPI  -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/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_SPI_SPIDEV -DLINUX_ARCH_ORANGEPI  -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/GPIO.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_SPIDEV -DLINUX_ARCH_ORANGEPI  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/GPIO.cpp -o build/drivers/Linux/GPIO.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_SPI_SPIDEV -DLINUX_ARCH_ORANGEPI  -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_SPI_SPIDEV -DLINUX_ARCH_ORANGEPI  -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_SPI_SPIDEV -DLINUX_ARCH_ORANGEPI  -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_SPI_SPIDEV -DLINUX_ARCH_ORANGEPI  -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/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_SPI_SPIDEV -DLINUX_ARCH_ORANGEPI  -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/interrupt.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DLINUX_SPI_SPIDEV -DLINUX_ARCH_ORANGEPI  -Ofast -g -Wall -Wextra  -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/interrupt.cpp -o build/drivers/Linux/interrupt.o
                                drivers/Linux/interrupt.cpp: In function ‘void* interruptHandler(void*)’:
                                drivers/Linux/interrupt.cpp:107:26: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
                                   (void)read (fd, &c, 1) ;
                                                          ^
                                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_SPI_SPIDEV -DLINUX_ARCH_ORANGEPI  -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_SPI_SPIDEV -DLINUX_ARCH_ORANGEPI  -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_SPI_SPIDEV -DLINUX_ARCH_ORANGEPI  -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 ./MySensors.h:294:0,
                                                 from examples_linux/mysgw.cpp:74:
                                ./drivers/RF24/RF24.cpp:39:11: error: Not supported on this platform.
                                  hwDigitalWrite(MY_RF24_CS_PIN, level);
                                           ^
                                ./drivers/RF24/RF24.cpp:44:11: error: Not supported on this platform.
                                  hwDigitalWrite(MY_RF24_CE_PIN, level);
                                           ^
                                ./drivers/RF24/RF24.cpp:388:11: error: Not supported on this platform.
                                  hwPinMode(MY_RF24_CE_PIN,OUTPUT);
                                           ^
                                ./drivers/RF24/RF24.cpp:389:11: error: Not supported on this platform.
                                  hwPinMode(MY_RF24_CS_PIN,OUTPUT);
                                           ^
                                ./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 ‘uint8_t RF24_spiMultiByteTransfer(uint8_t, uint8_t*, uint8_t, bool)’:
                                ./drivers/RF24/RF24.cpp:56:11: error: ‘LOW’ was not declared in this scope
                                  RF24_csn(LOW);
                                           ^
                                ./drivers/RF24/RF24.cpp:99:11: error: ‘HIGH’ was not declared in this scope
                                  RF24_csn(HIGH);
                                           ^
                                ./drivers/RF24/RF24.cpp: In function ‘void RF24_startListening()’:
                                ./drivers/RF24/RF24.cpp:235:10: error: ‘HIGH’ was not declared in this scope
                                  RF24_ce(HIGH);
                                          ^
                                ./drivers/RF24/RF24.cpp: In function ‘void RF24_stopListening()’:
                                ./drivers/RF24/RF24.cpp:241:10: error: ‘LOW’ was not declared in this scope
                                  RF24_ce(LOW);
                                          ^
                                ./drivers/RF24/RF24.cpp: In function ‘void RF24_powerDown()’:
                                ./drivers/RF24/RF24.cpp:251:10: error: ‘LOW’ was not declared in this scope
                                  RF24_ce(LOW);
                                          ^
                                ./drivers/RF24/RF24.cpp: In function ‘bool RF24_sendMessage(uint8_t, const void*, uint8_t)’:
                                ./drivers/RF24/RF24.cpp:269:10: error: ‘HIGH’ was not declared in this scope
                                  RF24_ce(HIGH);
                                          ^
                                ./drivers/RF24/RF24.cpp:276:10: error: ‘LOW’ was not declared in this scope
                                  RF24_ce(LOW);
                                          ^
                                ./drivers/RF24/RF24.cpp: In function ‘bool RF24_initialize()’:
                                ./drivers/RF24/RF24.cpp:395:10: error: ‘LOW’ was not declared in this scope
                                  RF24_ce(LOW);
                                          ^
                                ./drivers/RF24/RF24.cpp:396:11: error: ‘HIGH’ was not declared in this scope
                                  RF24_csn(HIGH);
                                           ^
                                Makefile:114: recipe for target 'build/examples_linux/mysgw.o' failed
                                make: *** [build/examples_linux/mysgw.o] Error 1
                                root@OrangePI:~/orangepi#```
                                1 Reply Last reply
                                0
                                • T Tag

                                  @Reza

                                  You need to create the files after each boot.

                                  After the modprobe, Issue this command:

                                  sudo for A in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do echo "$A" > /sys/class/gpio/export ; done
                                  

                                  This will get you the files.

                                  R Offline
                                  R Offline
                                  Reza
                                  wrote on last edited by
                                  #85

                                  @Tag

                                  root@OrangePI:~/orangepi# sudo for A in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do echo "$A" > /sys/class/gpio/export ; done
                                  -bash: syntax error near unexpected token `do'
                                  root@OrangePI:~/orangepi# ```
                                  1 Reply Last reply
                                  0
                                  • T Tag

                                    @Reza

                                    You need to create the files after each boot.

                                    After the modprobe, Issue this command:

                                    sudo for A in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do echo "$A" > /sys/class/gpio/export ; done
                                    

                                    This will get you the files.

                                    R Offline
                                    R Offline
                                    Reza
                                    wrote on last edited by
                                    #86

                                    @Tag said:

                                    sudo for A in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do echo "$A" > /sys/class/gpio/export ; done

                                    orangepi one have 40 pins

                                    M 1 Reply Last reply
                                    0
                                    • R Reza

                                      @Tag said:

                                      sudo for A in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do echo "$A" > /sys/class/gpio/export ; done

                                      orangepi one have 40 pins

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

                                      @Reza Is there /sys/class/gpio/export file on your OPi?

                                      R 2 Replies Last reply
                                      0
                                      • M marceloaqno

                                        @Reza Is there /sys/class/gpio/export file on your OPi?

                                        R Offline
                                        R Offline
                                        Reza
                                        wrote on last edited by
                                        #88

                                        @marceloaqno
                                        no i have not folder "gpio" in my orangepi

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

                                          @marceloaqno It still doesn't work on my OPi Zero :confused:

                                          root@opi-zero-1:~/orangepi# bin/mysgw -d
                                          mysgw: Starting gateway...
                                          mysgw: Protocol version - 2.2.0-beta
                                          mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.2.0-beta
                                          mysgw: TSM:INIT
                                          mysgw: TSF:WUR:MS=0
                                          mysgw: !TSM:INIT:TSP FAIL
                                          mysgw: TSM:FAIL:CNT=1
                                          mysgw: TSM:FAIL:PDT
                                          mysgw: Received SIGINT

                                          I do have the /sys/class/gpio/export and I ran for A in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do echo "$A" > /sys/class/gpio/export ; done

                                          For the record, here's my OS:

                                          BOARD=orangepizero
                                          BOARD_NAME="Orange Pi Zero"
                                          VERSION=5.24
                                          LINUXFAMILY=sun8i
                                          BRANCH=default
                                          ARCH=arm
                                          PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
                                          NAME="Debian GNU/Linux"
                                          VERSION_ID="8"
                                          VERSION="8 (jessie)"
                                          ID=debian
                                          HOME_URL="http://www.debian.org/"
                                          SUPPORT_URL="http://www.debian.org/support"
                                          BUG_REPORT_URL="https://bugs.debian.org/"
                                          
                                          M 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          9

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular