Serial Gateway + NRF24 with sleep mode enabled there
-
Currently LoRaWAN as Sigfox solution is used. But later on I would like to also test the LoRa for P2P communication as it would definitely suit better for such situations where garden is far from home. Till now I have no experience with P2P LoRa communication and modules.
-
@gohan said in Serial Gateway + NRF24 with sleep mode enabled there:
I saw that, but with LoRa he could have sensors connected directly without a gateway nearby
Yes. I just don't see the difference from using Sigfox.
@mfalkvidd - Only difference with Sigfox LoRaWAN and P2P LoRa is from my point of view the amount of data you can send. With Sigfox LPWAN node you are limited to 140 messages per day with max 12 bytes of payload in one message. You can send only 4 downlink messages.
-
I have set MY_PARENT_NODE_IS_STATIC, MY_PARENT_NODE_ID, and perhaps MY_PASSIVE_NODE as you adviced.
Regarding MY_TRANSPORT_WAIT_READY_MS I do not see how it could help with the sleep mode of the gateway. Can you describe more what did you mean?About isTransportReady (void) - I expected that when I use it it will avoid going to sleep if data are comming from NRF24 to be processed. But it did not behave this way. I used following (but tried many other modifications)
#if defined(MY_REPEATER_FEATURE) while (!isTransportReady()) { _process(); } int8_t result = MY_SLEEP_NOT_POSSIBLE; // default transportPowerDown(); result = hwSleep(sleepingMS); startL(); return result; #else uint32_t sleepingTimeMS = sleepingMS;But it happen that the gateway is going to sleep even the messages are comming. But I guess it only from the debuging of messages (maybe there is delay between the incomming messages and printing the debug output to serial).
Regarding your advice about RF24_SET_ARD and RF24_SET_ARC - if I understand it correctly then I am not able to set a long retry period to be able to wait for the Gateway to wake up. Do you know if there is any other option how to set it there? For now I used the mentioned repeat function which is in the post above.
Can I ask you if there is some settings which is telling to the node that it is sending ping commands to the gateway and how to disable it or use it especially for this scenarious when the node will be waiting the gateway to wake up and send the data then.
-
I have set MY_PARENT_NODE_IS_STATIC, MY_PARENT_NODE_ID, and perhaps MY_PASSIVE_NODE as you adviced.
Regarding MY_TRANSPORT_WAIT_READY_MS I do not see how it could help with the sleep mode of the gateway. Can you describe more what did you mean?About isTransportReady (void) - I expected that when I use it it will avoid going to sleep if data are comming from NRF24 to be processed. But it did not behave this way. I used following (but tried many other modifications)
#if defined(MY_REPEATER_FEATURE) while (!isTransportReady()) { _process(); } int8_t result = MY_SLEEP_NOT_POSSIBLE; // default transportPowerDown(); result = hwSleep(sleepingMS); startL(); return result; #else uint32_t sleepingTimeMS = sleepingMS;But it happen that the gateway is going to sleep even the messages are comming. But I guess it only from the debuging of messages (maybe there is delay between the incomming messages and printing the debug output to serial).
Regarding your advice about RF24_SET_ARD and RF24_SET_ARC - if I understand it correctly then I am not able to set a long retry period to be able to wait for the Gateway to wake up. Do you know if there is any other option how to set it there? For now I used the mentioned repeat function which is in the post above.
Can I ask you if there is some settings which is telling to the node that it is sending ping commands to the gateway and how to disable it or use it especially for this scenarious when the node will be waiting the gateway to wake up and send the data then.
-
Why you don't use timer lib?
-
Why you don't use timer lib?
@wikibear - what do you mean exactely? If you mean to use it for specific time communication (gateway and sensor will know the exact time when to comunicate) then it is not suitable as the timer in the arduino is not that accurate. It would require to have real time chip included in both devices. It would not be a problem for the gateway but to have it in each sensor, it could make everything more expensive. So I prefere the way I am trying to do. Sensor will send data about every 15 minutes and the gateway will be on for 500ms after 8 seconds of sleep. During those 500ms it will check if the sensor is trying to send data, and if so then it will stay awake until the communication is done. Of course, the sleep and wake perion can be change, depend on the requirements (number of sensors and update periods of the sensors).
-
M mfalkvidd referenced this topic