💬 Building a Orange Pi Gateway


  • Code Contributor

    @pii Try to connect the IRQ pin from the radio to another GPIO on your Orange Pi, for example the GPIO2.

    #define MY_RFM95_IRQ_PIN 2
    


  • There is an issue now with spi interfaces. With the current armbian image we are stuck at the prepare the system part, no /dev/spidev* available, the old method does not work. (There is no /boot/script.bin file, for example.) Does anyone know the solution, could this guide be updated, please?





  • Hi!

    Installation instructions will be adjusted for Armbian Stretch?



  • I have Mysensors running with nrf24 , I wanted to upgrade Armbian to the latest Stretch. I configured DT overlays by adding

    verbosity=1
    console=serial
    overlay_prefix=sun8i-h3
    rootdev=UUID=bd0ded76-1188-4b52-a20a-64f326c1f193
    rootfstype=ext4
    overlays=w1-gpio uart1 i2c0 spi-spidev
    param_w1_pin=PA20
    param_w1_pin_int_pullup=1
    param_uart1_rtscts=1
    param_spidev_spi_bus=0

    to /boot/armbianEnv.txt. I had spidev working, but not the mysgw. It doidn't give me errors, but i was stuck at !TSM:INIT:TSP FAIL.
    Maybe the problem is that there is no gpio-sunxi in Stretch... I have no idea.

    By the way, i noticed that the new version of Mysensors calls nrf24 transport differently, it is now called --my-transport=rf24.
    Please update the guide for Armbian Stretch.



  • Made fix for Armbian Stretch https://github.com/mysensors/MySensors/pull/1200.
    my settings: /boot/armbianEnv.txt
    overlays=w1-gpio uart1 spi-spidev spi-add-cs1
    param_spidev_spi_bus=1
    param_spidev_spi_cs=0

    git clone https://github.com/mysensors/MySensors.git --branch development
    cd MySensors
    and further on the instructions



  • Hi,

    for anyone creating a gateway on an Orange Pi PC using armbian mainline (4.x Kernel): The fex modifications are not necessary any more. As noted before by @Roman, the device tree needs to be modified.

    If you use the exact same pins as in this guide for the Orange Pi PC, SPI0 needs to be activated instead of SPI1. (Pi Zero and PC are kind of pin compatible, but Zero only has SPI1 routed to the header, whereas the same pins on the PC have SPI0. On top, the Orange Pi PC also has SPI1 but on other pins):

    verbosity=1
    logo=disabled
    console=both
    disp_mode=1920x1080p60
    overlay_prefix=sun8i-h3
    overlays=w1-gpio uart1 spi-spidev spi-add-cs1
    param_spidev_spi_bus=0
    param_spidev_spi_cs=0
    rootdev=<removed>
    rootfstype=ext4
    usbstoragequirks=<removed>
    

    Attention: Header pin 26 is different between Pi PC and Pi Zero. On the zero it is PA10 but on the PC it is PA21. I connected the interrupt pin of the nrf24 like in the guide (header pin 26) and changed the configure command accordingly.

    So the full command to use SPI0 and the interrupt connected to header pin 26 of the Orange Pi PC is:

    ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=rf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=13 --my-rf24-irq-pin=21 --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mysensors
    

    The rest of the guide is still valid, except that the transport is now called "rf24" instead of "nrf24". @mfalkvidd can you correct this maybe? Also, the -d switch seems to be not existing any more.



  • This post is deleted!

  • Mod

    Thanks @pansen. I have replaced nrf24 with rf24 for all commands on the page and removed the -d option.


 

Suggested Topics

164
Online

8.7k
Users

9.5k
Topics

99.9k
Posts