Wireless Stick V3 with Lora: Remote sensor readings

I have two wireless sticks V3 setup as a master unit on a Raspberry Pi4 and two remote units that each has a JSN-SR04 ultrasonic sensor as well as a 18B20 temperature sensor connected. I have been successful in sending the sensor readings from the remote unit to the master unit but I need to apply the reverse of this logic for my solution.

My idea is to have the master unit wake each of the remote units one at a time using their unique chip ID’s as the identifier for the location at which they are located. This is not a problem to obtain so there I have no issues. Where I do however hit a road block is to successfully wake the remote unit. The serial monitor shows that it has successfully sent the signal but the remote unit is not waking from sleep and tanking the required measurements to send back to my master unit.

Is there a specific library I need to include or specific “wake from sleep” code required for these devices to work in this manner? I have tried the different examples from the Heltec_ESP32_LoRa_v3 library but have been unsuccessful thus far.

Any help or direction is much appreciated.

If the device is asleep which means it is not processing any code, how would it be able to hear the wake up call?

Perhaps wake up at set intervals that are synchronised with the master. Or send a reply when the device sends a reading - as you know it is awake then.

That makes total sense. Maybe I should have been a bit clearer in my original post. I was actually wondering if there is a way to do it with the master unit sending a wake up signal purely for the remote unit to actually wake up. It seems that the best way is to just have it done in intervals of say 5 minutes with every other unit waking up 10 or so seconds later to ensure there is a successful connection from each location.

I think my first sentence in my reply was a bit subtle so I’ll try again:

Can you figure out how one device can wake up another device that is not turned on only using radio waves?

The reason this is important is to head off any other solutions that involve magic :wink:

There are ways of doing this by setting the radio that is set to receive but it will timeout pretty quickly and then the MCU will need to wake up, check the state and set it back to receive mode. Can’t remember how long the timeout is but it’s in seconds and the ESP is so totally unsuitable for that sort of sleep / wake-up cycle.

So it’s either a wake up & listen schedule or receive after send. The first requires a fairly reliable / stable RTC if it’s going to be longer durations which considering the ESP startup from deep sleep would be important, although you can re-sync on a message to device. You could combine both as you know for certain that the device is awake if it’s just sent.

If it’s non-critical, so you can afford to lose a few messages, then the coding can be made quite simple. But if it needs to be reliable, by the time you’ve finished, you’ll probably have something close to LoRAWAN - you can ask @BNS for details on that, he likes that sort of thing.

Thankyou for the guidance. I am currently investigating a sleep cycle where the device will wake up at 5 minute intervals and send the sensor readings to my master device which in turn will use the unique chip ID to verify that it received data from the remote devices. Each remote device will however only go back to sleep once the master confirms it has received the data for that cycle based on the unique chip ID’s. I will reply back with further information as soon as I have made any further progress.