Yet another library doesn't work: RF24Network

Discussion in 'UDOO NEO' started by Maurice, Nov 18, 2016.

  1. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    This code compiles for the Arduino Nano, Arduino Mega, but not for the UDOO Neo. The problem seems to be the RF24Network library.

    Code:
    #include "RF24Network.h"
    #include <RF24.h
    
    const static int CE_PIN = 8;
    const static int CS_PIN = 9;
    
    static RF24 radio(CE_PIN, CS_PIN);
    static const RF24Network network(radio);
    static const uint16_t controllerNode = 0;
    static const uint16_t detonatorNode = 1;
    
    
    void setup() {
      Serial.begin(9600);
      radio.begin();
      network.begin(90, controllerNode);  
    }
    
    void loop() {
      network.update();
       if (network.available()) {
             
       }
    }
    
    
    Errors:
    So I removed the const qualifiers, though why the compiler would complain about it is beyond any known reason to me. However, this yields other errors:
    :-(^2
     
  2. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Maurice, Libraries that are designed for the avr processor type architecture will probably not work for the Udoo Neo. I know this is frustrating and not according your expectations but in those libraries hardware references can be made (Timers etc) that a Neo can never handle and also very difficult to convert to Neo references.

    What about this library? https://github.com/TMRh20/RF24
     
  3. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    @waltervl, yes it is frustrating. I come from a WORA environment, so I'm totally not prepared to doubt every and all library there is, and I'm certainly not prepared to have to adapt each library...
     
  4. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Lieven and Maurice like this.
  5. Lieven

    Lieven New Member

    Joined:
    Nov 7, 2015
    Messages:
    5
    Likes Received:
    3
    Using Udoo Neo as the central RF24 Network node and storing data in an RRDtool (Cacti) was my sole purpose for this board. However I'm not a professional programmer and never succeed in finding a working solution for the RF24 libraries. So yes, I'm looking forward too to the day the underlying root cause is been resolved!

    Somehow I was thinking of serial connecting a genuine Arduino board handling the RF24 ... but really? Not only it would defeat the unique capabilities of the Udoo Neo, the use of these libraries has been documented and supported on a (single) Raspberry Pi board.
     
    Maurice likes this.
  6. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    @Lieven,

    Connecting a second Arduino is what I did, but only because I have one around on which I try new components first. I'm still hoping UDOO will respond on the SPI library issue, because the UDOO claims to support SPI, which it as it now is doesn't. They need to keep updating libraries to keep things compatible.
     
  7. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    The problem is that the SPI library supports only the old arduino SPI 1.0 functions. See also http://www.udoo.org/forum/index.php?threads/4308/

    So there are 2 options:
    1: Rewrite SPI library so the new functions on Neo are supported. This is also influenced by the MQX rtos. Does it support it?
    2: Rewrite the Rf24 library so it does not use the new SPI functions.
     
  8. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    @waltervl, I think that option 1 should be provided by UDOO. It is also for I2C stuff that things don't work. It is to be expected that every SPI/I2C library will start to use new functions. If MQX doesn't support it.... That would be really sad.
     
  9. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    I agree, we already requested a better SPI library, see the other topic.

    What is the problem with I2C? It seems to work, only the assignment to A9/M4 is a bit unclear in the documentation.
     

Share This Page