Repeatrer level limit (NRF24L01 transport)
-
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.
-
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.
@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?
-
@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?
@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 -
@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@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.
-
@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.
@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
-
The radio object can be accessed through the global variable _radio (see here). Maybe you can just call the appropriate function?
@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!
-
@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
@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!
-
@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!
@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?
-
@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?
@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?
-
@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?
@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.
-
@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?
@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?
-
@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?
@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
-
@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