Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Tag
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by Tag

    • RE: πŸ’¬ Building a Orange Pi Gateway

      @Reza

      Did you also change the SPI channel?

      --spi-spidev-device=/dev/spidev0.0
      

      if you use the OPIzero pinout, SPI1 will be SPI0 on the OPI one......

      Your other option will be using a serial gateway: https://www.mysensors.org/build/serial_gateway
      This works for sure on the OPI One

      posted in Announcements
      Tag
      Tag
    • RE: πŸ’¬ Building a Orange Pi Gateway

      @Reza

      try this:

      ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=3
      

      See this page for your header pinout: http://linux-sunxi.org/Orange_Pi_One#Orientation_of_the_GPIO_header

      the --my-rf24-cs-pin= is key to have it right on your system

      posted in Announcements
      Tag
      Tag
    • RE: πŸ’¬ Building a Orange Pi Gateway

      @Reza

      Can imagine that it is complicated, assuming you used the OPI zero pinout, try the configure example from my previous post. might work.

      Another option you have is get an arduino with the radio attached and just plug it into usb, your messages will appear on i.e /dev/ttyUSB0

      posted in Announcements
      Tag
      Tag
    • RE: πŸ’¬ Building a Orange Pi Gateway

      @Reza

      I do not have the OPI One HW available..... so that will be a problem.
      you need to start reading the OPI documentation, and see if the pinout you are using is correct, I know for example that OPI Zero used the SPI1 channel since SPI0 is used for the NAND flash. now it might be that the OPI One does not have the NAND flash so you can use the SPI0 channel.

      Try to start here

      or here

      If you read carefully you will see that pin 19-21-23 are on the opi ONE SPI0, and on the OPI Zero SPI1.....

      This is the OPI Zero page: http://linux-sunxi.org/Orange_Pi_Zero#Orientation_of_the_GPIO_header

      ANd the OPI One page:
      http://linux-sunxi.org/Orange_Pi_One#Orientation_of_the_GPIO_header

      @marceloaqno helped build this for the OPI Zero.... and SPI was an important part to get this working...

      Try this:

      ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=3
      

      worth a try if you use SPI0, and GPIO3 for the CE pin (on the ONE the ce SPI0 pin is 3 according to the wiki page)

      posted in Announcements
      Tag
      Tag
    • RE: πŸ’¬ Building a Orange Pi Gateway

      @Reza

      Seems you are not able to communicate with your radio..... you need to figure out which GPIO pins you need to use, and which SPI channel.....

      The steps from the OrangePI page are based on the OrangePI zero model

      posted in Announcements
      Tag
      Tag
    • RE: πŸ’¬ Building a Orange Pi Gateway

      @Reza
      I got this working like a charm on armbian( Debian Jessie) https://www.armbian.com/orange-pi-zero/

      But you need to follow ALL steps........

      Which OrangePI board do you use?

      posted in Announcements
      Tag
      Tag
    • RE: πŸ’¬ Building a Orange Pi Gateway

      @Reza
      You must use the OrangePI instructions, these are different conmpared to the RaspberryPI instructions
      Thx SdeWeb!, same toughts!! πŸ™‚

      posted in Announcements
      Tag
      Tag
    • RE: πŸ’¬ Building a Orange Pi Gateway

      @Reza

      Are you sure your git environment is okay?
      Maybe do a fresh git pull for mysensors?
      See the howto on the orangePI page just follow from the start.... I have serious questions that your env is correct since configure was not executable....

      posted in Announcements
      Tag
      Tag
    • RE: πŸ’¬ Building a Orange Pi Gateway

      @Reza
      Seems your ./configure script is not executable... try:

      chmod 755 ./configure
      
      posted in Announcements
      Tag
      Tag
    • RE: Is serial.print blocked by mySensors?

      @samburner3

      Strange, will have a look later today see if i can recreate your issue.
      Did you post your complete sketch?

      posted in Troubleshooting
      Tag
      Tag
    • RE: Is serial.print blocked by mySensors?

      Hi!,

      Where did the following piece of code go?

      void setup()
      {
      Serial.Begin(115200);
      }
      

      That might help, since it will tell the sketch you want to talk to the outside world using serial communication.
      Have you tried that?

      Another option is adding this in your sketch:
      (before you include the mysensors lib!)

      #define MY_DEBUG 
      

      See: https://www.mysensors.org/build/debug

      posted in Troubleshooting
      Tag
      Tag
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @Anduril
      you will get all the build options for the mysgw with the command

      ./configure -help
      

      Here you can configure all options like serial and ethernet

      posted in Announcements
      Tag
      Tag
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @Shantanu-Mhapankar

      This is also new for me since i do not send data into any cloud... but i can imagine that you can use MQTT. (see https://www.mysensors.org/build/mqtt_gateway for more details) is important that the receiving side supports MQTT. in this case google is your friend πŸ˜‰

      if you do a ./configure --help you will find you can build the mysensors gateway with MQTT support

      ./configure --help 
      ...
          --my-gateway=[ethernet|serial|mqtt]
                                      Gateway type, set to none to disable gateway feature. [ethernet]
          --my-node-id=<ID>           Disable gateway feature and run as a node with given id.
          --my-controller-url-address=<URL>
                                      Controller or MQTT broker url.
          --my-controller-ip-address=<IP>
                                      Controller or MQTT broker ip.
          --my-port=<PORT>            The port to keep open on gateway mode.
                                      If gateway is set to mqtt, it sets the broker port.
      ...
      
      posted in Announcements
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @marceloaqno

      Thank you for your hard work and continued support on this!!

      posted in Development
      Tag
      Tag
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @Shantanu-Mhapankar

      Data is not stored... to store the data and do something usefull with it (or not) you need a controller. I use mycontroller, and from this software you can "push" data to an external server.
      I use my controller, but i am sure that other controller software also has this feature.

      posted in Announcements
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @mihai.aldea
      Great!!, found out the SPI0 is used for the NAND flash, once you add SPI1 to the script.bin, also the need board paragraph with bus 1 needs to be added otherwise it will not work.... anyway great you got mysensors up and running!!
      About the RPI, i like both boards, and in my opinion the enormous success of the RPI is responsible, for the large collection of OPI boards that is available these days πŸ˜‰

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @marceloaqno

      looks great!! thx!!πŸ‘

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @pansen
      Yes correct, for OPI Zero only ARMbian 3.x is available as a download image.
      I used the debian jessie one

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      Hi All,

      I put together the steps to get MySensors running on the OrangePi Zero:
      Take note of the SPI part, 1 typo and you will not see /dev/spidev1.0

      • Download and Install the ARMbian(debian) OS image
        https://www.armbian.com/orange-pi-zero/

      • Install sunxi-tools:
        These tools are required to make changes in the boot area of the system

      sudo apt-get update
      sudo apt-get install sunxi-tools
      
      • How to add /dev/spidev1.0 (which is required since /dev/spidev0.0 is used for the onboard NAND flash)
      cd /boot
      bin2fex /boot/script.bin /root/myscript.txt
      

      Now edit /root/myscript.bin and add/change the following so it looks exactly like the part below:

      [spi0]
      spi_used = 1
      spi_cs_bitmap = 1
      spi_mosi = port:PC00<3><default><default><default>
      spi_miso = port:PC01<3><default><default><default>
      spi_sclk = port:PC02<3><default><default><default>
      spi_cs0 = port:PC03<3><1><default><default>
      	
      [spi1]
      spi_used = 1
      spi_cs_bitmap = 1
      spi_cs0 = port:PA13<2><1><default><default>
      spi_sclk = port:PA14<2><default><default><default>
      spi_mosi = port:PA15<2><default><default><default>
      spi_miso = port:PA16<2><default><default><default>
      	
      [spi_devices]
      spi_dev_num = 2
      	
      [spi_board0]
      modalias = "spidev"
      max_speed_hz = 33000000
      bus_num = 0
      chip_select = 0
      mode = 0
      full_duplex = 1
      manual_cs = 0
      	
      [spi_board1]
      modalias = "spidev"
      max_speed_hz = 33000000
      bus_num = 1
      chip_select = 0
      mode = 0
      full_duplex = 1
      manual_cs = 0
      
      • Then recompile the script file:
      fex2bin /root/myscript.txt /boot/script.bin
      

      Reboot the system

      reboot
      

      2 device files should exist now:

      root@orangepizero:~# ls -l /dev/spi*
      crw------- 1 root root 153, 0 Jan 11 16:31 /dev/spidev0.0
      crw------- 1 root root 153, 1 Jan 11 16:31 /dev/spidev1.0
      

      Load the gpio module

      modprobe gpio-sunxi
      

      To load the module gpio-sunxi automagically load at boot time, add gpio-sunxi to /etc/modules

      echo gpio-sunxi >> /etc/modules
      
      • Now it is time to install the GW.
      cd /root
      git clone https://github.com/marceloaqno/MySensors.git orangepi 
      cd orangepi/ 
      git pull origin spidev
      ./configure --spi-spidev-device=/dev/spidev1.0
      make
      

      Working like a charm!

      If you tested "/bin/mysgw -d" and all works as expected, make the installation permanent:

      make install
      

      Additional
      If you want to read data into a controller using a device file (i.e Mycontroller) use the build string below

       ./configure --spi-spidev-device=/dev/spidev1.0  --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway
      

      Hope this helps!! have fun!!

      posted in Development
      Tag
      Tag
    • RE: πŸ’¬ Building a Orange Pi Gateway

      Hi!,

      Found a typo: ./condigure --spi-spidev-device=/dev/spidev1.0 ,should be configure

      Great work!! πŸ‘

      posted in Announcements
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @marceloaqno said:

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

      Got it spot on!! looks great!

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @Reza
      More info on armbian.com

      I use the debian jessie, works like a charm!

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @marceloaqno

      Still issues here:

      root@orangepizero:~/orangepi/bin# ll /dev/spi*
      crw------- 1 root root 153, 0 Jan  9 22:51 /dev/spidev0.0
      crw------- 1 root root 153, 1 Jan  9 22:51 /dev/spidev1.0
      

      Then:

      ./configure --spi-spidev-device=/dev/spidev1.0
      

      added to examples_linux/mysgw.cpp

      #define MY_RF24_CE_PIN 2
      #define MY_RF24_CS_PIN 13
      

      end enabled radio debugging:

      output:

      root@orangepizero:~/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: RF24:write register, reg=0, value=14
      mysgw: RF24:write register, reg=3, value=3
      mysgw: RF24:write register, reg=4, value=95
      mysgw: RF24:write register, reg=5, value=76
      mysgw: RF24:write register, reg=6, value=39
      mysgw: RF24:write register, reg=16, value=115
      mysgw: RF24:write register, reg=29, value=6
      mysgw: RF24:read register, reg=6, value=39
      mysgw: RF24:read register, reg=5, value=76
      mysgw: RF24:write register, reg=2, value=2
      mysgw: RF24:write register, reg=1, value=0
      mysgw: RF24:write register, reg=28, value=3
      mysgw: RF24:flushRX
      mysgw: RF24:flushTX
      mysgw: RF24:write register, reg=7, value=112
      mysgw: TSM:INIT:TSP OK
      mysgw: TSM:INIT:GW MODE
      mysgw: RF24:write register, reg=2, value=3
      mysgw: RF24:write register, reg=1, value=1
      mysgw: RF24:STRT LIS
      mysgw: RF24:write register, reg=0, value=15
      mysgw: RF24:write register, reg=10, value=0
      mysgw: TSM:READY:ID=0,PAR=0,DIS=0
      mysgw: MCO:REG:NOT NEEDED
      mysgw: RF24:read register, reg=23, value=17
      Illegal instruction
      root@orangepizero:~/orangepi/bin# 
      

      Almost there?

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @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.

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @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!!

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @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...

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @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) 
      >
      
      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @marceloaqno

      Nope pinout is reversed!,

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

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @mihai.aldea

      Just a question the command "gpio readall" does that does show the actual status of the system, or is it just a fixed table that is printed on screen....

      Look at mine:

      root@orangepizero:~# gpio readall
       +-----+-----+----------+------+---+-Orange Pi+---+---+------+---------+-----+--+
       | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
       +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
       |     |     |     3.3v |      |   |  1 || 2  |   |      | 5v       |     |     |
       |  12 |   8 |    SDA.0 | ALT5 | 0 |  3 || 4  |   |      | 5V       |     |     |
       |  11 |   9 |    SCL.0 | ALT5 | 0 |  5 || 6  |   |      | 0v       |     |     |
       |   6 |   7 |   GPIO.7 | ALT3 | 0 |  7 || 8  | 1 | OUT  | TxD3     | 15  | 13  |
       |     |     |       0v |      |   |  9 || 10 | 0 | ALT5 | RxD3     | 16  | 14  |
       |   1 |   0 |     RxD2 | ALT5 | 0 | 11 || 12 | 0 | ALT3 | GPIO.1   | 1   | 110 |
       |   0 |   2 |     TxD2 | ALT5 | 0 | 13 || 14 |   |      | 0v       |     |     |
       |   3 |   3 |     CTS2 | ALT3 | 0 | 15 || 16 | 0 | ALT3 | GPIO.4   | 4   | 68  |
       |     |     |     3.3v |      |   | 17 || 18 | 0 | ALT3 | GPIO.5   | 5   | 71  |
       |  64 |  12 |     MOSI | ALT4 | 0 | 19 || 20 |   |      | 0v       |     |     |
       |  65 |  13 |     MISO | ALT4 | 0 | 21 || 22 | 0 | OUT  | RTS2     | 6   | 2   |
       |  66 |  14 |     SCLK | ALT4 | 0 | 23 || 24 | 0 | ALT4 | CE0      | 10  | 67  |
       |     |     |       0v |      |   | 25 || 26 | 0 | ALT3 | GPIO.11  | 11  | 21  |
       |  19 |  30 |    SDA.1 | ALT4 | 0 | 27 || 28 | 0 | ALT4 | SCL.1    | 31  | 18  |
       |   7 |  21 |  GPIO.21 | ALT3 | 0 | 29 || 30 |   |      | 0v       |     |     |
       |   8 |  22 |  GPIO.22 | ALT3 | 0 | 31 || 32 | 0 | ALT3 | RTS1     | 26  | 200 |
       |   9 |  23 |  GPIO.23 |  OUT | 0 | 33 || 34 |   |      | 0v       |     |     |
       |  10 |  24 |  GPIO.24 |  OUT | 1 | 35 || 36 | 0 | ALT3 | CTS1     | 27  | 201 |
       |  20 |  25 |  GPIO.25 |  OUT | 1 | 37 || 38 | 0 | ALT5 | TxD1     | 28  | 198 |
       |     |     |       0v |      |   | 39 || 40 | 0 | ALT5 | RxD1     | 29  | 199 |
       +-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
       | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
       +-----+-----+----------+------+---+-Orange Pi+---+------+----------+-----+-----+
      

      It is the same... and shows 40 pins while the OPI Zero only has 26.......
      There are some small differences between our tables in the naming column... so i guess it really reads the status / names of the pins.. Anyhow still strange that 40 pins are shown instead of 26 for the zero..

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @mihai.aldea

      Yep already found it πŸ™‚ problem was the old version of the tools, it was not able to decompile the script.bin file...

      [update]

      • modified the script file,
      • changed spi_used = 1
      • compiled back and rebooted

      just 1 device file in called spidev0.0 no new device files are created..... 😞

      dmesg output:

      [    0.814287] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
      [    0.814316] sunxi_spi_chan_cfg()1376 - [spi-1] has no spi_regulator.
      [    0.815569] spi spi0: master is unqueued, this is deprecated
      [    0.816776] spi spi1: master is unqueued, this is deprecated
      

      Thx, will keep you posted!

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @mihai.aldea

      Hmmm.... checked the docs again and guess what. the 26 pin header on the OPI Zero has SPI1.... instead of SPI0

      Expansion Port

      The Orange Pi Zero has a 26-pin, 0.1" unpopulated connector with several low-speed interfaces.
      2x13 Header
      1	3.3V	           2	5V
      3	TWI0_SDA / PA12	   4	5V
      5	TWI0_SCK / PA11	   6	GND
      7	PWM1 / PA06	       8	UART1_TX / PG06
      9	GND	               10	UART1_RX / PG07
      11	UART2_RX / PA01	   12	SIM_CLK/PA_EINT7 / PA07
      13	UART2_TX / PA00	   14	GND
      15	UART2_CTS / PA03   16	TWI1-SDA / PA19
      17	3.3V	           18	TWI1-SCK / PA18
      19	SPI1_MOSI / PA15   20	GND
      21	SPI1_MISO / PA16   22	UART2_RTS / PA02
      23	SPI1_CLK / PA14    24	SPI1_CS / PA13
      25	GND	               26	SIM_DET/PA_EINT10 / PA10
      

      From http://linux-sunxi.org/Xunlong_Orange_Pi_Zero
      If i look at /dev I only see spi0, which is most probably used for the onboard flash...

      root@orangepizero:/# ll /dev | grep -i spi
      crw------- 1 root root    153,   0 Jan  8 11:12 spidev0.0
      

      So now i need to figure out a way to get SPI1 up and running

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @marceloaqno
      The library compiled, but unfortunately i cannot get the examples for linux working.
      need to edit i.e. gettingstarted.cpp with the correct pin setting, have tried a lot, but either it says that the radio is not connected, and if used with incorrect settings it will not compile at all....

      Maybe someone following this thread who has experince with this lib?
      if there is any progress from my side will keep you posted...

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @mihai.aldea

      You are right, took the letter P, which is 16.... but is should have been A.... (for the 4.x kernel)
      Updated the table!,

      Thx!!

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @marceloaqno
      Did some testing,

      Setup the GPIO pins:

      modprobe gpio-sunxi
      
      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
      

      (The device files that are created by the commands above do not survive a reboot, so remember to execute the above commands after each reboot!)

      Hooked up an led between ground and i.e. pin 22, this pin is linked to GPIO2

      Then:

      echo out > /sys/class/gpio/gpio2/direction
      echo 1 > /sys/class/gpio/gpio2/value
      echo 0 > /sys/class/gpio/gpio2/value
      
      

      And eureka!! Led went on and off πŸ˜„

      Did this for all GPIO ports used by mysgw, below is the verified pin / GPIO table

      Pin#  -  GPIO / NRF24 
      22 - GPIO2   / CE
      23 - GPIO14  / SCK
      21 - GPIO16  / MISO
      24 - GPIO13  / CSN
      19 - GPIO15  / MOSI
      

      Tested all pins and led went on and off on all

      How i connected the radio: https://www.mysensors.org/build/raspberry (see the Pi1 part)
      How to setup GPIO: http://linux-sunxi.org/GPIO (3.x kernel part, and added pin 13/14/15/16)
      Pinout for the OPI Zero: https://i1.wp.com/oshlab.com/wp-content/uploads/2016/11/Orange-Pi-Zero-Pinout-banner2.jpg?fit=1200%2C628&ssl=1 (carefully look at the pin numbering!)

      Maybe it is usefull, I rebuild mysgw with NRF24 radio debugging enabled, this is the output I get:

      root@orangepizero:~/marceloaqno-spidev/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: RF24:write register, reg=0, value=14
      mysgw: RF24:write register, reg=3, value=3
      mysgw: RF24:write register, reg=4, value=95
      mysgw: RF24:write register, reg=5, value=76
      mysgw: RF24:write register, reg=6, value=39
      mysgw: RF24:write register, reg=16, value=115
      mysgw: RF24:write register, reg=29, value=6
      mysgw: RF24:read register, reg=6, value=0
      mysgw: RF24:read register, reg=5, value=0
      mysgw: !RF24:INIT:SANCHK FAIL
      mysgw: !TSM:INIT:TSP FAIL
      mysgw: TSM:FAIL:CNT=1
      mysgw: TSM:FAIL:PDT
      mysgw: RF24:write register, reg=0, value=12
      mysgw: RF24:PD
      ^Cmysgw: Received SIGINT
      

      keeps looping, until ctrl-c is given.

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @marceloaqno

      Hi!!, many thanks for the info!! really helpful!
      Made some progress. first I created this table based on this page: http://linux-sunxi.org/GPIO

      Pin - Num - Name - Calculated value A=1 ((1-1)*32 + Pin)
      CE / 22 / PA02 / 2
      SCK / 23 / PA14 / 14
      MISO / 21 / PA16 / 16
      CSN / 24 / PA13 / 13
      MOSI / 19 / PA15 / 15

      Now it is important that you know which kernel is used on your systems the 4.x architecture is different compared to the 3.x arch...

      If the 4.x kernel is used you need to use the calculated value for the GPIO pin numbering, i could not test that since I am using the 3.x kernel, so this is what i did:

      1. load the GPIO kernel module:
      modprobe gpio-sunxi
      
      1. Create the GPIO device files since these were not available on my system by default.
      for A in 1 2 3 4 5 6 7 8 9 10 11 12; do echo "$A" > /sys/class/gpio/export ; done
      

      This created the following entries in /sys/class/gpio

      root@orangepizero:~/marceloaqno-spidev/bin# ls -l /sys/class/gpio
      total 0
      --w------- 1 root root 4096 Jan  8 07:39 export
      lrwxrwxrwx 1 root root    0 Jan  8 07:16 gpio1 -> ../../devices/platform/sunxi-pinctrl/gpio/gpio1
      lrwxrwxrwx 1 root root    0 Jan  8 07:16 gpio11 -> ../../devices/platform/sunxi-pinctrl/gpio/gpio11
      lrwxrwxrwx 1 root root    0 Jan  8 07:16 gpio12 -> ../../devices/platform/sunxi-pinctrl/gpio/gpio12
      lrwxrwxrwx 1 root root    0 Jan  8 07:32 gpio13 -> ../../devices/platform/sunxi-pinctrl/gpio/gpio13
      lrwxrwxrwx 1 root root    0 Jan  8 07:16 gpio2 -> ../../devices/platform/sunxi-pinctrl/gpio/gpio2
      lrwxrwxrwx 1 root root    0 Jan  8 07:16 gpio3 -> ../../devices/platform/sunxi-pinctrl/gpio/gpio3
      lrwxrwxrwx 1 root root    0 Jan  8 07:16 gpio4 -> ../../devices/platform/sunxi-pinctrl/gpio/gpio4
      lrwxrwxrwx 1 root root    0 Jan  8 07:16 gpio5 -> ../../devices/platform/sunxi-pinctrl/gpio/gpio5
      lrwxrwxrwx 1 root root    0 Jan  8 07:16 gpio6 -> ../../devices/platform/sunxi-pinctrl/gpio/gpio6
      lrwxrwxrwx 1 root root    0 Jan  8 07:16 gpio7 -> ../../devices/platform/sunxi-pinctrl/gpio/gpio7
      lrwxrwxrwx 1 root root    0 Jan  8 07:16 gpio8 -> ../../devices/platform/sunxi-pinctrl/gpio/gpio8
      lrwxrwxrwx 1 root root    0 Jan  8 07:16 gpio9 -> ../../devices/platform/sunxi-pinctrl/gpio/gpio9
      lrwxrwxrwx 1 root root    0 Jan  1  1970 gpiochip0 -> ../../devices/platform/sunxi-pinctrl/gpio/gpiochip0
      --w------- 1 root root 4096 Jan  1  1970 unexport
      

      Modified mysgw.cpp to use:

      #define MY_RF24_CE_PIN 2
      #define MY_RF24_CS_PIN 13
      

      And did a clean build:

      make clean
      ./configure
      make
      

      Now some thing has changed! πŸ™‚

      root@orangepizero:~/marceloaqno-spidev/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
      

      Will do some more testing with an LED today see if the GPIO pin numbering that was created is okay,

      will keep you posted!:

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @marceloaqno

      Just hooked up a radio to the GPIO header. (used this link for the model 1 RPI https://www.mysensors.org/build/raspberry and attached the interrupt pin also to pin 15)

      This is the result i get
      root@orangepizero:~/marceloaqno-spidev/bin# mysgw
      mysgw: Starting gateway...
      mysgw: Protocol version - 2.2.0-beta
      mysgw: Could not open /sys/class/gpio/gpio10/direction
      Illegal instruction
      root@orangepizero:~/marceloaqno-spidev/bin#

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @marceloaqno

      Hi!, really appreciate your hard work on this!!, below are the results,
      (I was not able to execute the 1st command 😞 but... tried something else..

      root@orangepizero:~# git clone https://github.com/marceloaqno/MySensors.git marceloaqno-spidev
      Cloning into 'marceloaqno-spidev'...
      remote: Counting objects: 13834, done.
      remote: Compressing objects: 100% (26/26), done.
      remote: Total 13834 (delta 2), reused 0 (delta 0), pack-reused 13808
      Receiving objects: 100% (13834/13834), 9.67 MiB | 3.16 MiB/s, done.
      Resolving deltas: 100% (8289/8289), 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
      [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@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_SPI_SPIDEV -DLINUX_GPIO_CAPABLE -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_SPI_SPIDEV -DLINUX_GPIO_CAPABLE -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_GPIO_CAPABLE -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_GPIO_CAPABLE -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_GPIO_CAPABLE -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_GPIO_CAPABLE -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_GPIO_CAPABLE -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_SPI_SPIDEV -DLINUX_GPIO_CAPABLE -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_SPI_SPIDEV -DLINUX_GPIO_CAPABLE -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_GPIO_CAPABLE -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/Linux/interrupt.cpp -o build/drivers/Linux/interrupt.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_SPI_SPIDEV -DLINUX_GPIO_CAPABLE -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_GPIO_CAPABLE -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_GPIO_CAPABLE -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o
      /tmp/ccVhf8xP.s: Assembler messages:
      /tmp/ccVhf8xP.s:14808: Warning: IT blocks containing 32-bit Thumb instructions are deprecated in ARMv8
      g++ -MT build/drivers/SPIDEV/SPI.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_GPIO_CAPABLE -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -I./drivers/SPIDEV -c drivers/SPIDEV/SPI.cpp -o build/drivers/SPIDEV/SPI.o
      g++ -pthread -o bin/mysgw build/drivers/Linux/log.o build/drivers/Linux/noniso.o build/drivers/Linux/GPIO.o build/drivers/Linux/Print.o build/drivers/Linux/EthernetClient.o build/drivers/Linux/SerialPort.o build/drivers/Linux/Stream.o build/drivers/Linux/IPAddress.o build/drivers/Linux/compatibility.o build/drivers/Linux/interrupt.o build/drivers/Linux/SoftEeprom.o build/drivers/Linux/EthernetServer.o build/examples_linux/mysgw.o build/drivers/SPIDEV/SPI.o

      root@orangepizero:~/marceloaqno-spidev# ll bin
      total 640
      -rwxr-xr-x 1 root root 654544 Jan 7 22:48 mysgw

      Seems we have a binary!!
      πŸ˜„

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @Reza

      Unfortunately the mysgw software does not run native on the OPI systems at this moment.The only option today is to add an arduino to the USB port running i.e the serial gateway sketch (if you do not want to use the USB port, an other option would be using an UART trough the GPIO header, you data will show up on i.e. /dev/ttyS1 if UART 1 is used)

      step 2 will be to install controller software.
      (i tested MyController on the OPI and that works like a charm, and looks pretty cool!)

      See this link on how to build a serial gateway on the arduino. Using this setup you can follow the RaspberryPI tutorials.

      Hopefully mysgw will run soon on the OrangePI systems! think this is work in progress......

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @mihai.aldea said:

      us experiment. While the TMRh20 is working, the problem indeed lies with the ** mysgw** compilation. I'm getting the same error.

      Thanks for the confirmation!!, now lets hope that mysgw, will be fixed/ported to the OPI boards soon!
      would be great to expand the number of systems it will run on..

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @mihai.aldea

      Hi!, my idea is to have the NRF24 radio directly attached to the GPIO header on the OPI, (got this already working on my RPI system). So the idea is to run mysgw on the OPI system.
      (already got an extensive sensor network running with multiple arduinos and Mycontroller on thae RPI) On the RPI i had the arduino GW attached to USB and the NRF24 directly attached at the GPIO header at the same time, MyController saw 2 gateways πŸ™‚ )

      The other option like you already mentioned is to attach the arduino using USB read from /dev/ttyUSB0. I see this as a last resort only if mysgw will never run on the OPI zero.

      I read on the OPI website that the 26 pin header from the OPI is directly compatible with the RPI, however other sources of information tell me differently. So if you want to help out with the pin numbering this is greatly appreciated!

      but again mysgw on the OPI with the radio on the GPIO header would be great!!

      At this moment we try to build/compile mysgw on the OPI board, however that fails at the SPI part.

      Thanks!

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      Hi All,
      Collected some info on the OPI zero CPU:

      root@orangepizero:/proc# more cpuinfo
      Processor : ARMv7 Processor rev 5 (v7l)
      processor : 0
      BogoMIPS : 2400.00

      processor : 1
      BogoMIPS : 2400.00

      processor : 2
      BogoMIPS : 2400.00

      processor : 3
      BogoMIPS : 2400.00

      Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt
      CPU implementer : 0x41
      CPU architecture: 7
      CPU variant : 0x0
      CPU part : 0xc07
      CPU revision : 5

      Hardware : sun8i
      Revision : 0000
      Serial : 2467783d034e20000098
      root@orangepizero:/proc#

      Dmesg Output:
      [ 0.000000] Initializing cgroup subsys cpu
      [ 0.000000] Linux version 3.4.113-sun8i (root@xenial) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.1) ) #50 SMP PREEMPT Mon Nov
      14 08:41:55 CET 2016
      [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
      [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
      [ 0.000000] Machine: sun8i

      It should be a H2+, but I have seen H3 (think that was with an FTDI interface on the debug port....

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @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!!

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @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#

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      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!

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @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!!

      posted in Development
      Tag
      Tag
    • RE: Mysensors Gateway on OrangePi (Zero) (opi)

      @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

      posted in Development
      Tag
      Tag
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @marceloaqno, @jirm, @aand

      Hi!,

      I started a new topic for Mysensors Gateway on OrangePI (OPI), Here

      Hope this is okay,

      Kind regards,

      Tag

      posted in Announcements
      Tag
      Tag
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @marceloaqno

      Thank you for your help here!! would be great to have mysgw on the OPI!
      I am using armbian on a OPI zero, so let me know if you need any further info.

      (Also using an RPI, which runs mysgw with direct connected radio like a charm!)
      Kind regards,

      Tag

      posted in Announcements
      Tag
      Tag
    • RE: MyController on OrangePi

      @mihai.aldea:

      Agree!, mycontroller runs perfectly on an OrangePI!
      In my case i use an Orange Pi Zero, with 512MB memory, it is a quadcore CPU, which seven seems to be over dimentioned for the job πŸ™‚

      If you use Armbian, installing Java is pretty simple,

      Steps i used:
      sudo echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
      sudo echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
      sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
      sudo apt-get update
      sudo apt-get install oracle-java8-installer

      Once all is installed:

      sudo apt-get install oracle-java8-set-default

      See this page for all information http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

      Hope it helps!

      Kind regards,

      Tag

      (Visit http://www.mycontroller.org/ for this great piece of software!)

      posted in MyController.org
      Tag
      Tag
    • Mysensors Gateway on OrangePi (Zero) (opi)

      Hi All!,

      I am currently trying to build the mysensors gateway on the OrangePI Zero, However it seems that tahe NRF24L01 radio is not supported. and the SPI.h is missing on the OPI.
      Everything works like a charm on the RaspberryPI.

      Has anyone already managed to use the mysgw on the orange PI?

      The OS i use is ARMBIAN. and MySensors 2.1.0

      Erorrs:
      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>

      Really like MySensors, great piece of software!!

      Thanks in advance for any response!

      Kind regards,

      Tag

      posted in Development
      Tag
      Tag
    • RE: πŸ’¬ Building a Raspberry Pi Gateway

      @aand

      working on the same setup, unfortunately was not able to compile the mysensors gateway...
      this is the error i get:

      root@orangepizero:~/MySensors# make
      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 -DMY_IS_SERIAL_PTY -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#

      seems spi is missing...

      however it seems to be available in the system:

      root@orangepizero:~/MySensors# ll /dev/spidev0.0
      crw------- 1 root root 153, 0 Dec 30 16:26 /dev/spidev0.0

      root@orangepizero:~/MySensors# dmesg | grep -i spi
      [ 0.814155] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
      [ 0.814185] sunxi_spi_chan_cfg()1376 - [spi-1] has no spi_regulator.
      [ 0.815261] spi spi0: master is unqueued, this is deprecated

      setup:
      Orangepi zero
      Armbian

      hope that we get native OPI support soon, any way all help is appreciated!!

      kind regards,

      Tag

      posted in Announcements
      Tag
      Tag
    • RE: beta testers required for MyController 0.0.3-alpha1 release

      @jkandasa said:

      sed on our community member

      Just tested the common services script, works like a charm, best thing is, forecast is Sunny!! πŸ™‚

      posted in MyController.org
      Tag
      Tag
    • RE: beta testers required for MyController 0.0.3-alpha1 release

      gui is looking great!,
      have been playing with the software and found the following:

      in resources/nodes, all my nodes (mysensors 15,x) are shown as "down" while they are sending data...is this a setup issue?

      and for the weather forcast only N/A is shown and not the value from the sensor.....

      rest looks great! really like the dashboard feature!

      posted in MyController.org
      Tag
      Tag
    • RE: beta testers required for MyController 0.0.3-alpha1 release

      Can i test release 0.0.3 please? πŸ˜ƒ

      WOW!! this is really cool stuff!!!
      Got a serial gateway with 2 wireless sensors running,
      Sensor 1:
      -Humidity
      -Temperature (DHT22)
      -Lightlevel (DHT22)

      Sensor 2:
      -Temperature (BMP085)
      -Airpressure (BMP085)
      -Outside temperature (with NTC)

      Keep up the good work!!!!

      posted in MyController.org
      Tag
      Tag