Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. Repeatrer level limit (NRF24L01 transport)

Repeatrer level limit (NRF24L01 transport)

Scheduled Pinned Locked Moved Development
25 Posts 3 Posters 4.6k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • gohanG Offline
    gohanG Offline
    gohan
    Mod
    wrote on last edited by
    #2

    You can chain more repeaters. You could set a fixed parent ID in the repeaters so they don't try to jump one.

    About NRF24 power, you can also use pa_max and pa_high, it just depends on the quality of the radio module.

    B 2 Replies Last reply
    0
    • B Offline
      B Offline
      bilbolodz
      wrote on last edited by
      #3

      @gohan said in Repeatrer level limit (NRF24L01 transport):

      About NRF24 power, you can also use pa_max and pa_high, it just depends on the quality of the radio module.

      Even versions without PA and rubber duck antena?

      1 Reply Last reply
      0
      • gohanG Offline
        gohanG Offline
        gohan
        Mod
        wrote on last edited by
        #4

        Yes, it works but it depends on the chip quality: there are some performing better with lower power, it is a matter of doing tests to figure it out, there is not rule to follow with all those counterfeit nrf24 chips around.

        1 Reply Last reply
        1
        • gohanG gohan

          You can chain more repeaters. You could set a fixed parent ID in the repeaters so they don't try to jump one.

          About NRF24 power, you can also use pa_max and pa_high, it just depends on the quality of the radio module.

          B Offline
          B Offline
          bilbolodz
          wrote on last edited by
          #5

          @gohan said in Repeatrer level limit (NRF24L01 transport):

          You can chain more repeaters.

          I've managed to "chain repeaters" so your statement is 100% true ;-) Still fighting with range but "there is a hope" for my project.

          1 Reply Last reply
          1
          • gohanG gohan

            You can chain more repeaters. You could set a fixed parent ID in the repeaters so they don't try to jump one.

            About NRF24 power, you can also use pa_max and pa_high, it just depends on the quality of the radio module.

            B Offline
            B Offline
            bilbolodz
            wrote on last edited by
            #6

            @gohan said in Repeatrer level limit (NRF24L01 transport):

            You could set a fixed parent ID in the repeaters so they don't try to jump one.

            Is there a way to change fixed parent in "programming way (to set it as custom value in eeprom and call function setting it on startup not as define and recompile). I've about 20 devices the same type and I prefer to have the same firmware for all.

            Second question (I've looked at source and answer probably is: now it's very hard to do it): Is there a way to the same with transmit power of NRF module?

            mfalkviddM 1 Reply Last reply
            0
            • B bilbolodz

              @gohan said in Repeatrer level limit (NRF24L01 transport):

              You could set a fixed parent ID in the repeaters so they don't try to jump one.

              Is there a way to change fixed parent in "programming way (to set it as custom value in eeprom and call function setting it on startup not as define and recompile). I've about 20 devices the same type and I prefer to have the same firmware for all.

              Second question (I've looked at source and answer probably is: now it's very hard to do it): Is there a way to the same with transmit power of NRF module?

              mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by mfalkvidd
              #7

              @bilbolodz first question: it might be possible using the method suggested here: https://forum.mysensors.org/topic/5410/changing-node-id-at-run-time/
              If you try it, please report back with the results. If it works we should document it somewhere where it is easier to find.

              Second question: it might be possible using the same technique as above, but I think you would need to reset the node or trigger re-initialization of the radio. Maybe sleep is enough, I'm not sure if the radio is re-initialized after sleep.
              Adding reference for the second question: https://github.com/mysensors/MySensors/issues/900

              B 1 Reply Last reply
              0
              • mfalkviddM Offline
                mfalkviddM Offline
                mfalkvidd
                Mod
                wrote on last edited by
                #8

                The radio object can be accessed through the global variable _radio (see here). Maybe you can just call the appropriate function?

                B 1 Reply Last reply
                0
                • mfalkviddM mfalkvidd

                  @bilbolodz first question: it might be possible using the method suggested here: https://forum.mysensors.org/topic/5410/changing-node-id-at-run-time/
                  If you try it, please report back with the results. If it works we should document it somewhere where it is easier to find.

                  Second question: it might be possible using the same technique as above, but I think you would need to reset the node or trigger re-initialization of the radio. Maybe sleep is enough, I'm not sure if the radio is re-initialized after sleep.
                  Adding reference for the second question: https://github.com/mysensors/MySensors/issues/900

                  B Offline
                  B Offline
                  bilbolodz
                  wrote on last edited by
                  #9

                  @mfalkvidd said in Repeatrer level limit (NRF24L01 transport):

                  @bilbolodz first question: it might be possible using the method suggested here: https://forum.mysensors.org/topic/5410/changing-node-id-at-run-time/
                  If you try it, please report back with the results. If it works we should document it somewhere where it is easier to find.

                  For sure there is possibility to change ID of node "on the fly" set:

                  #define MY_NODE_ID AUTO

                  and send message C_INTERNAL I_ID_RESPONSE with new ID node. Working even without node reboot

                  I will check your method with parent ID. I will try to check also these method with power level but I don't know how to check in programming way current NRF power.

                  mfalkviddM 1 Reply Last reply
                  0
                  • B bilbolodz

                    @mfalkvidd said in Repeatrer level limit (NRF24L01 transport):

                    @bilbolodz first question: it might be possible using the method suggested here: https://forum.mysensors.org/topic/5410/changing-node-id-at-run-time/
                    If you try it, please report back with the results. If it works we should document it somewhere where it is easier to find.

                    For sure there is possibility to change ID of node "on the fly" set:

                    #define MY_NODE_ID AUTO

                    and send message C_INTERNAL I_ID_RESPONSE with new ID node. Working even without node reboot

                    I will check your method with parent ID. I will try to check also these method with power level but I don't know how to check in programming way current NRF power.

                    mfalkviddM Offline
                    mfalkviddM Offline
                    mfalkvidd
                    Mod
                    wrote on last edited by mfalkvidd
                    #10

                    @bilbolodz the level is RF24_PA_HIGH unless you have an override in your sketch. See https://github.com/mysensors/MySensors/blob/10ef62307b914c88295977d58b9601d994e89117/MyConfig.h#L640

                    B 1 Reply Last reply
                    0
                    • mfalkviddM mfalkvidd

                      The radio object can be accessed through the global variable _radio (see here). Maybe you can just call the appropriate function?

                      B Offline
                      B Offline
                      bilbolodz
                      wrote on last edited by
                      #11

                      @mfalkvidd said in Repeatrer level limit (NRF24L01 transport):

                      The radio object can be accessed through the global variable _radio (see here). Maybe you can just call the appropriate function?

                      I've made a quick grep. It looks that _radio is avaliable for RFM69 transport. For NFR there is a function RF24_setRFSetup but as parameter i takes MY_RF24_RF_SETUP defined as:

                      #define MY_RF24_RF_SETUP (uint8_t)( ((MY_RF24_DATARATE & 0b10 ) << 4) | ((MY_RF24_DATARATE & 0b01 ) << 3) | (MY_RF24_PA_LEVEL << 1) ) + 1 // +1 for Si24R1

                      It's problematic using it for power level without messing other things!

                      1 Reply Last reply
                      0
                      • mfalkviddM Offline
                        mfalkviddM Offline
                        mfalkvidd
                        Mod
                        wrote on last edited by
                        #12

                        See if you can change the value and call

                        _radio.RF24_initialize();
                        

                        But I am not familiar with the inner workings of the radio code. Maybe running RF24_initialize() will have unintended side effects.

                        1 Reply Last reply
                        0
                        • mfalkviddM mfalkvidd

                          @bilbolodz the level is RF24_PA_HIGH unless you have an override in your sketch. See https://github.com/mysensors/MySensors/blob/10ef62307b914c88295977d58b9601d994e89117/MyConfig.h#L640

                          B Offline
                          B Offline
                          bilbolodz
                          wrote on last edited by
                          #13

                          @mfalkvidd said in Repeatrer level limit (NRF24L01 transport):

                          @bilbolodz the level is RF24_PA_HIGH unless you have an override in your sketch.

                          That's obvious, I'm using it. Problem is that its "#define'ed" so value of these "variable" is set during compilation and it's not possible to change it in program!

                          mfalkviddM 1 Reply Last reply
                          0
                          • B bilbolodz

                            @mfalkvidd said in Repeatrer level limit (NRF24L01 transport):

                            @bilbolodz the level is RF24_PA_HIGH unless you have an override in your sketch.

                            That's obvious, I'm using it. Problem is that its "#define'ed" so value of these "variable" is set during compilation and it's not possible to change it in program!

                            mfalkviddM Offline
                            mfalkviddM Offline
                            mfalkvidd
                            Mod
                            wrote on last edited by
                            #14

                            @bilbolodz sorry, I must have misunderstood your question. You asked how to get the current power setting. I said that the current power setting will be the default value, unless you set it to something else. If you set it to something else, it will be set to the value you set it to. So just use the value you set it to? No need to get it from the radio?

                            B 1 Reply Last reply
                            0
                            • mfalkviddM Offline
                              mfalkviddM Offline
                              mfalkvidd
                              Mod
                              wrote on last edited by mfalkvidd
                              #15

                              Enabling MY_DEBUG_VERBOSE_RF24 would print the registers though. Maybe that's what you are asking for?

                              1 Reply Last reply
                              0
                              • mfalkviddM mfalkvidd

                                @bilbolodz sorry, I must have misunderstood your question. You asked how to get the current power setting. I said that the current power setting will be the default value, unless you set it to something else. If you set it to something else, it will be set to the value you set it to. So just use the value you set it to? No need to get it from the radio?

                                B Offline
                                B Offline
                                bilbolodz
                                wrote on last edited by
                                #16

                                @mfalkvidd
                                The problem is:

                                My sensors network is over 30 nodes a few repeaters and so on, majority of nodes are the same hardware devices.
                                I want to "tune" my network changing NRF power level and MY_PARENT_NODE_ID "on th fly" (now it's "hard defined").
                                You've suggested to use method:

                                int8_t myNodeId;
                                
                                #define MY_NODE_ID myNodeId
                                
                                void before () { 
                                    // read I/O pins and set myNodeId
                                    myNodeId = 32;
                                    Serial.println( myNodeId );
                                }
                                

                                but with MY_PARENT_NODE_ID and MY_RF24_PA_LEVEL. Good idea I will check if it working BUT:

                                there MUST be a way to check remotely IF it's working. There is no problem with MY_PARENT_NODE_ID because it affect network topology and it could be easily checked. I don't know how to check "from program" current power level.

                                Ideal solution would that sketch will detect current power level and suffix sketch name with _MIN, _LOW, _HIGH, _MAX.

                                It would allow me to have only two version of "HEX firmware" for OTA: with or without repeater mode. Other things (parent level and ID) I could change "on the fly" sending command" (and maybe rebooting) to sensor.

                                Is it clear now?

                                mfalkviddM 2 Replies Last reply
                                0
                                • B bilbolodz

                                  @mfalkvidd
                                  The problem is:

                                  My sensors network is over 30 nodes a few repeaters and so on, majority of nodes are the same hardware devices.
                                  I want to "tune" my network changing NRF power level and MY_PARENT_NODE_ID "on th fly" (now it's "hard defined").
                                  You've suggested to use method:

                                  int8_t myNodeId;
                                  
                                  #define MY_NODE_ID myNodeId
                                  
                                  void before () { 
                                      // read I/O pins and set myNodeId
                                      myNodeId = 32;
                                      Serial.println( myNodeId );
                                  }
                                  

                                  but with MY_PARENT_NODE_ID and MY_RF24_PA_LEVEL. Good idea I will check if it working BUT:

                                  there MUST be a way to check remotely IF it's working. There is no problem with MY_PARENT_NODE_ID because it affect network topology and it could be easily checked. I don't know how to check "from program" current power level.

                                  Ideal solution would that sketch will detect current power level and suffix sketch name with _MIN, _LOW, _HIGH, _MAX.

                                  It would allow me to have only two version of "HEX firmware" for OTA: with or without repeater mode. Other things (parent level and ID) I could change "on the fly" sending command" (and maybe rebooting) to sensor.

                                  Is it clear now?

                                  mfalkviddM Offline
                                  mfalkviddM Offline
                                  mfalkvidd
                                  Mod
                                  wrote on last edited by
                                  #17

                                  @bilbolodz yup. Thanks for clarifying.
                                  And thanks for noticing that _radio is only available for rfm69. Seems a bit inconsistent to me, but there are probably reasons for it.

                                  It looks like transportGetTxPowerLevel() / RF24_getTxPowerLevel() will return some sort of mapping of the current power level. But these functions are internal/private, so I don't know how to access them.

                                  1 Reply Last reply
                                  0
                                  • mfalkviddM Offline
                                    mfalkviddM Offline
                                    mfalkvidd
                                    Mod
                                    wrote on last edited by mfalkvidd
                                    #18

                                    Verifying the parent node id should be possible by calling transportGetParentNodeId() or simply getParentNodeId();

                                    1 Reply Last reply
                                    0
                                    • B bilbolodz

                                      @mfalkvidd
                                      The problem is:

                                      My sensors network is over 30 nodes a few repeaters and so on, majority of nodes are the same hardware devices.
                                      I want to "tune" my network changing NRF power level and MY_PARENT_NODE_ID "on th fly" (now it's "hard defined").
                                      You've suggested to use method:

                                      int8_t myNodeId;
                                      
                                      #define MY_NODE_ID myNodeId
                                      
                                      void before () { 
                                          // read I/O pins and set myNodeId
                                          myNodeId = 32;
                                          Serial.println( myNodeId );
                                      }
                                      

                                      but with MY_PARENT_NODE_ID and MY_RF24_PA_LEVEL. Good idea I will check if it working BUT:

                                      there MUST be a way to check remotely IF it's working. There is no problem with MY_PARENT_NODE_ID because it affect network topology and it could be easily checked. I don't know how to check "from program" current power level.

                                      Ideal solution would that sketch will detect current power level and suffix sketch name with _MIN, _LOW, _HIGH, _MAX.

                                      It would allow me to have only two version of "HEX firmware" for OTA: with or without repeater mode. Other things (parent level and ID) I could change "on the fly" sending command" (and maybe rebooting) to sensor.

                                      Is it clear now?

                                      mfalkviddM Offline
                                      mfalkviddM Offline
                                      mfalkvidd
                                      Mod
                                      wrote on last edited by
                                      #19

                                      @bilbolodz how about this? https://github.com/mysensors/MySensors/blob/726a20dad9696ed86408106061a9e0be31995b5c/core/MyTransport.h#L524

                                      Sending a I_SIGNAL_REPORT_REQUEST message with the command "T" could be what you need?

                                      B 2 Replies Last reply
                                      0
                                      • mfalkviddM mfalkvidd

                                        @bilbolodz how about this? https://github.com/mysensors/MySensors/blob/726a20dad9696ed86408106061a9e0be31995b5c/core/MyTransport.h#L524

                                        Sending a I_SIGNAL_REPORT_REQUEST message with the command "T" could be what you need?

                                        B Offline
                                        B Offline
                                        bilbolodz
                                        wrote on last edited by bilbolodz
                                        #20

                                        @mfalkvidd said in Repeatrer level limit (NRF24L01 transport):

                                        Sending a I_SIGNAL_REPORT_REQUEST message with the command "T" could be what you need?

                                        Unfortunately MYSController in current version doesn't support I_SIGNAL_REPORT_REQUEST message. I will try it in code, thanks

                                        B 1 Reply Last reply
                                        0
                                        • B bilbolodz

                                          @mfalkvidd said in Repeatrer level limit (NRF24L01 transport):

                                          Sending a I_SIGNAL_REPORT_REQUEST message with the command "T" could be what you need?

                                          Unfortunately MYSController in current version doesn't support I_SIGNAL_REPORT_REQUEST message. I will try it in code, thanks

                                          B Offline
                                          B Offline
                                          bilbolodz
                                          wrote on last edited by
                                          #21
                                          This post is deleted!
                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          19

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular