Replies: 3 comments 15 replies
-
The reset in begin method is quite intentional - the assumption is that you're only calling begin() after power-on reset, when the SX127x device is in an unknown state. However, I'm not sure why would you want to call begin() on wakeup of the ESP32 in the first place? I would only call begin once, after the power-on reset. EDIT: Also, this doesn't seem like an issue - converting to a discussion instead. |
Beta Was this translation helpful? Give feedback.
-
I am reviving this discussion since i have exactly same issue. I will try to fix it myself and propose a PR. The issue is that ESP32 can set EXT1 /EXT0 wakeup to IRQ (DIO1) and enter deep sleep. This saves huge amounts of power, but when a packet is received, the module state needs to be restored without the initialization (memory is fully reset expect RTC memory). And the SX126x does not know about the ESP32 being in deep sleep. |
Beta Was this translation helpful? Give feedback.
-
As @jgromes said in 2022, this isn't an issue or a bug so there isn't anything really to fix - you can get the reason for wake from the ESP32, if it's wake from sleep because of external interrupt, just don't call radio.begin() and proceed directly to reading the packet from the radio - it really is that simple. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
Is it any procedure to initialise instance of SX1278 without reset LoRa chip?
I'd try to put MCU (esp32) in deep sleep when LoRa modem (sx1278) in receive state.
When packet received MCU is woken up by extX wake up source with dio0 line. But begin() method of instance SX1278 resets LoRa chip and its state lost, so cant read received packet, its size, RSSI etc. Without initialize I can't read resieved data too, because there is not control SS line of SPI.
Temporary I commented out code with reset in SX127x::findChip routine but sure that is not the best decision to change library code...
Is it any right way to do this?
I think I am not first who plays with power saving of LoRa boards.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions