NRF24 transport status not initialized

  • Hi, I prepared a new node with Arduino Nano (clone) and NRF24.
    Everything seems to work, the node connects to the network and sends the presentation info, but then I receive this in the serial log:


    which using the parser translates into:

    Core initialized, transport status 0, (1=initialized, 0=not initialized, NA=not available)

    I never had this kind of error with my other node, could someone point me to the meaning of this message (how can it be "not initialized" if it successfully sent the all the presentation messages?) or to the possible cause?
    This is the complete log:

    2093 TSF:MSG:SEND,21-21-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=1,st=OK:1
    2103 TSF:MSG:READ,0-0-21,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    2111 TSM:UPL:OK
    2112 TSM:READY:ID=21,PAR=0,DIS=1
    2117 TSF:MSG:SEND,21-21-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    2124 TSF:MSG:READ,0-0-21,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    2131 TSF:MSG:SEND,21-21-0-0,s=255,c=0,t=18,pt=0,l=5,sg=0,ft=0,st=OK:2.3.1
    2140 TSF:MSG:SEND,21-21-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
    2338 TSF:MSG:READ,0-0-21,s=255,c=3,t=6,pt=0,l=1,sg=0:M
    2343 TSF:MSG:ACK REQ
    2347 TSF:MSG:SEND,21-21-0-0,s=255,c=3,t=6,pt=0,l=1,sg=0,ft=0,st=OK:M
    2356 TSF:MSG:SEND,21-21-0-0,s=255,c=3,t=11,pt=0,l=20,sg=0,ft=0,st=OK:P2 - Velux Cameretta
    2366 TSF:MSG:SEND,21-21-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.0
    2374 TSF:MSG:SEND,21-21-0-0,s=1,c=0,t=10,pt=0,l=10,sg=0,ft=0,st=OK:P2 Pioggia
    2384 TSF:MSG:SEND,21-21-0-0,s=2,c=0,t=6,pt=0,l=21,sg=0,ft=0,st=OK:OUT Temperatura tetto
    2395 TSF:MSG:SEND,21-21-0-0,s=3,c=0,t=5,pt=0,l=18,sg=0,ft=0,st=OK:P2 Velux Cameretta
    2405 TSF:MSG:SEND,21-21-0-0,s=4,c=0,t=3,pt=0,l=15,sg=0,ft=0,st=OK:P2 Velux Status
    2412 MCO:REG:REQ
    2415 TSF:MSG:SEND,21-21-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
    2422 TSF:MSG:READ,0-0-21,s=255,c=3,t=27,pt=1,l=1,sg=0:1
    2427 MCO:PIM:NODE REG=1
    2429 MCO:BGN:STP
    2436 MCO:BGN:INIT OK,TSP=0
    2441 TSF:MSG:SEND,21-21-0-0,s=1,c=1,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0

    I tried changing the NRF24 with another one which works on another node, I tried changing the IRQ pin, or disabling the IRQ, but still the same errors.


  • Mod

    @danielef would it be possible for you to post the log before 2093ms?

  • Admin

    @danielef A driver initialization in setup() interferes with the SPI and/or RF24 radio: TSP=0 hints to a failed transport sanity check. I presume you're having radio issues in loop()?

  • @tekka my setup is quite simple:

    void setup() {
      pinMode(RAIN_D_PIN, INPUT_PULLUP);
    //  pinMode(REED_PIN, INPUT_PULLUP);
      pinMode(VELUX_UP_PIN, OUTPUT);
      pinMode(VELUX_DOWN_PIN, OUTPUT);
      digitalWrite(VELUX_UP_PIN, RELAY_OFF);
      digitalWrite(VELUX_DOWN_PIN, RELAY_OFF);
      if (!sensors.getAddress(ds18Addr, 0)) 
        Serial.println("************** Unable to find address for Device 0"); 
      sensors.setResolution(ds18Addr, 11);

    the only driver I use is the one from DallasTemperature library, which I used also in other nodes without any issue.
    This evening I'll try removong it to see if it has any effect.

    Regarding radio issues, this node goes completely offline from that message on: it neither sends nor receive any message.

  • Admin

    @danielef alternatively, you can move the setup() code to preHwInit() - this function is called before the any other HW initializes.

  • @tekka That is an interesting thing. Is there a document somewhere that explains the correct useage of pre-Hwint() and before() - As they both seem to be the same to me.

  • Mod

    @skywatch What is "correct" depends on a lot of things. I don't think it would be possible to create documentation that covers all possible scenarios. In a way, it is like asking "what is the correct way to write a c program".

    With that said, we have that tries to document which order the functions are executed. But due to MySensors' flexibility, the execution order is different depending on which defines are set, how long time some things take, etc. So something "as simple" as documenting the order of execution is unfortunately overwhelming 😞

  • @mfalkvidd But I didn't ask for 'documentation that covers all possible scenarios' - of course I know that would be a huge undetaking.

    Just a guide that says......

    PREHInt() This was developed because (reason here)...
    Use this for xxxx type data so that (reasons here)....
    Here is an example....

    Then the same for before() as to me they are one and the same and I can't even begin to think of why you would need both.

  • Admin

    @skywatch Here is a simplified flowchart that illustrates the two most common MySensors bootup scenarios (but as @mfalkvidd pointed out, there are many more possibilities depending on the transport configuration and/or defines):


  • Mod

    @skywatch thanks for explaining

    I do not know what they were intended for, but if someone knows, it would be great if the information could be added to

  • @tekka - Simply marvellous! - Thank you for that 🙂
    A picture is worth a thousand words. 😉 - I'll need to look at this in detail this evening and see what does and what doesn't make sense to me. But it is a great start to explaining these aspects.

    @mfalkvidd It is great that you still have the passion and patience to help people even when you are as much in the dark as the rest of us. Please never leave! 😉

  • Mod

    @mfalkvidd said in NRF24 transport status not initialized:

    I do not know what they were intended for

    Tekka's chart says it all; preHwInit() has no serial output, so can be used to e.g. initialize serial devices (some hardware might require this). Then before() is called which starts logging to serial.

Log in to reply

Suggested Topics