Bug in MY_PASSIVE_NODE implementation?


  • Hero Member

    Here is what the library says about it:

     * @def MY_PASSIVE_NODE
     * @brief If enabled, the node operates fully autonomously, i.e. messages are sent without ACKing.
     *
     * @note All transport-related checks and safety-mechanisms are disabled.
     * @note Requires that @ref MY_NODE_ID is set, @ref MY_PARENT_NODE_ID and
     *       @ref MY_PARENT_NODE_IS_STATIC are optional.
     * @note Singing, registration, and OTA FW update are disabled.
    

    So, I do this at the beginning of my sketch:

    #define MY_PASSIVE_NODE
    

    and what arrives at the serial gateway is this:

     __  __       ____
    |  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
    | |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
    | |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
    |_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
            |___/                      2.2.0-beta
    
    0;255;3;0;9;25 MCO:BGN:INIT CP=RNNGN---
    0;255;3;0;9;29 TSF:LRT:OK
    0;255;3;0;9;32 TSM:INIT
    0;255;3;0;9;34 TSF:WUR:MS=0
    0;255;3;0;9;37 TSM:INIT:TSP OK
    0;255;3;0;9;40 TSM:INIT:GW MODE
    0;255;3;0;9;43 TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;47 MCO:REG:NOT NEEDED
    0;255;3;0;14;Gateway startup complete.
    0;255;0;0;18;2.2.0-beta
    0;255;3;0;9;56 MCO:BGN:STP
    0;255;3;0;9;58 MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;753626 TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    0;255;3;0;9;753631 !TSF:MSG:LEN,0!=7
    0;255;3;0;9;753810 TSF:MSG:READ,77-77-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    0;255;3;0;9;753820 TSF:MSG:SEND,0-0-77-77,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    0;255;3;0;9;753828 TSF:MSG:READ,77-77-0,s=255,c=0,t=17,pt=0,l=10,sg=0:2.2.0-beta
    77;255;0;0;17;2.2.0-beta
    0;255;3;0;9;753837 TSF:MSG:READ,77-77-0,s=255,c=3,t=6,pt=1,l=1,sg=0:255
    77;255;3;0;6;255
    0;255;3;0;9;755808 TSF:MSG:READ,77-77-0,s=255,c=3,t=11,pt=0,l=14,sg=0:MockMySensors 
    77;255;3;0;11;MockMySensors 
    0;255;3;0;9;755818 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;756817 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;756825 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;756834 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;756874 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;756882 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;1057108 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;1057116 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;1200001 TSM:READY:NWD REQ
    0;255;3;0;9;1200005 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    0;255;3;0;9;1357341 TSF:MSG:READ,77-77-0,s=1,c=1,t=4,pt=5,l=4,sg=0:2669
    77;1;1;0;4;2669
    0;255;3;0;9;1357349 TSF:MSG:READ,77-77-0,s=2,c=1,t=4,pt=5,l=4,sg=0:4795
    77;2;1;0;4;4795
    0;255;3;0;9;1657575 TSF:MSG:READ,77-77-0,s=2,c=1,t=4,pt=5,l=4,sg=0:4795
    77;2;1;0;4;4795
    0;255;3;0;9;1657583 TSF:MSG:READ,77-77-0,s=2,c=1,t=4,pt=5,l=4,sg=0:4795
    77;2;1;0;4;4795
    0;255;3;0;9;1800035 TSF:SRT:OK
    0;255;3;0;9;1957809 TSF:MSG:READ,77-77-0,s=2,c=1,t=4,pt=5,l=4,sg=0:4795
    77;2;1;0;4;4795
    0;255;3;0;9;1957817 TSF:MSG:READ,77-77-0,s=2,c=1,t=4,pt=5,l=4,sg=0:4795
    77;2;1;0;4;4795
    0;255;3;0;9;2258043 TSF:MSG:READ,77-77-0,s=2,c=1,t=4,pt=5,l=4,sg=0:4795
    77;2;1;0;4;4795
    0;255;3;0;9;2258051 TSF:MSG:READ,77-77-0,s=2,c=1,t=4,pt=5,l=4,sg=0:4795
    77;2;1;0;4;4795
    0;255;3;0;9;2400002 TSM:READY:NWD REQ
    0;255;3;0;9;2400006 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    0;255;3;0;9;2558277 TSF:MSG:READ,77-77-0,s=1,c=1,t=4,pt=5,l=4,sg=0:2659
    77;1;1;0;4;2659
    0;255;3;0;9;2558285 TSF:MSG:READ,77-77-0,s=2,c=1,t=4,pt=5,l=4,sg=0:4663
    77;2;1;0;4;4663
    0;255;3;0;9;2858510 TSF:MSG:READ,77-77-0,s=2,c=1,t=4,pt=5,l=4,sg=0:4663
    77;2;1;0;4;4663
    0;255;3;0;9;2858518 TSF:MSG:READ,77-77-0,s=2,c=1,t=4,pt=5,l=4,sg=0:4663
    77;2;1;0;4;4663
    0;255;3;0;9;3158744 TSF:MSG:READ,77-77-0,s=2,c=1,t=4,pt=5,l=4,sg=0:4663
    77;2;1;0;4;4663
    0;255;3;0;9;3158752 TSF:MSG:READ,77-77-0,s=2,c=1,t=4,pt=5,l=4,sg=0:4663
    77;2;1;0;4;4663
    

    Therefore, isn't the following "registration" that (according to the above) shouldn't be happening?

    0;255;3;0;9;753810 TSF:MSG:READ,77-77-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    0;255;3;0;9;753820 TSF:MSG:SEND,0-0-77-77,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    0;255;3;0;9;753828 TSF:MSG:READ,77-77-0,s=255,c=0,t=17,pt=0,l=10,sg=0:2.2.0-beta
    77;255;0;0;17;2.2.0-beta
    0;255;3;0;9;753837 TSF:MSG:READ,77-77-0,s=255,c=3,t=6,pt=1,l=1,sg=0:255
    77;255;3;0;6;255
    0;255;3;0;9;755808 TSF:MSG:READ,77-77-0,s=255,c=3,t=11,pt=0,l=14,sg=0:MockMySensors 
    77;255;3;0;11;MockMySensors 
    0;255;3;0;9;755818 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;756817 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;756825 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;756834 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;756874 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;756882 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;1057108 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;1057116 TSF:MSG:READ,77-77-0,s=255,c=3,t=12,pt=0,l=4,sg=0:v0.5
    77;255;3;0;12;v0.5
    0;255;3;0;9;1200001 TSM:READY:NWD REQ
    0;255;3;0;9;1200005 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    

  • Mod

    @NeverDie I'm on a phone so it's hard to compare the logs, but what are you trying to achieve using that define?


  • Hero Member

    @Yveaux said in Bug in MY_PASSIVE_NODE implementation?:

    @NeverDie I'm on a phone so it's hard to compare the logs, but what are you trying to achieve using that define?

    Consume much less current. I've been able to establish that if an nRF52832 node is reporting its Vcc voltage once every 5 minutes, then if MY_PASSIVE_NODE is defined, the module will consume an order of magnitude less current than if "MY_PASSIVE_NODE" is left undefined.


  • Mod

    @NeverDie said in Bug in MY_PASSIVE_NODE implementation?:

    the module will consume an order of magnitude less current than if "MY_PASSIVE_NODE" is left undefined.

    Could that increase in power consumption be caused by auto retry transmissions by the nRF module?

    As a test you could call the following function (e.g. in setup() )

    RF24_setRetries(retransmits, retransmitDelay);
    

    Where retransmits = 0 disables retries completely.
    retransmitDelay is 5 (1500us) and retransmits = 15 by default in MySensors.

    Your link quality (succes rate of messages sent) is likely to go down when retries are disabled.


  • Hero Member

    @Yveaux said in Bug in MY_PASSIVE_NODE implementation?:

    RF24_setRetries(retransmits, retransmitDelay);

    Doing that produces the error message:

    'RF24_setRetries' was not declared in this scope

    at compile time.

    Perhaps that's because the module is an nRF52, not an nRF24?


  • Mod

    @NeverDie Ah, ok. My bad. The method to set the number of retries is apparently not exported for nRF5.
    We need to work on our driver interface...


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.