Comments (4)
Even though it's in high demand, this library does not yet support deep sleep as the underlying LMIC library does not support it.
In order to avoid rejoining, many parameters (session key, data rate, last used channels etc.) have to be saved and restored and the clock has to be restored as well. The best approach I've seen so far is https://github.com/diplfranzhoepfinger/ttn-esp32. It saves the entire LMIC structure into RTC memory and restores the clock. LMIC is quite a large structure but the ESP32 has sufficient RTC memory.
So you options are:
- Rejoin every time (waste of energy and link budget)
- Use of modified version of the library
- Implement your own modification
I hope that the underlying LMIC library will implement deep sleep. Then this library can easily be enhanced.
from ttn-esp32.
The best approach I've seen so far is https://github.com/diplfranzhoepfinger/ttn-esp32. It saves the entire LMIC structure into RTC memory and restores the clock.
I'm interested in this modified implementation but I couldn't understand how to use it. Does it already saves LMIC structure or do I need to call other methods?
For example, what would I need to change at /examples/shutdown/main.cpp
to adapt to this new implementation?
Thanks in advance.
from ttn-esp32.
@DaviWT I've seen that you have opened an issue in https://github.com/diplfranzhoepfinger/ttn-esp32. That's a better place to ask question about his implementation.
from ttn-esp32.
Despite the missing support in the underlying LMIC library, I've added support for going into deep sleep and for powering off the ESP32 while retaining the state of the current TTN session.
It should considerably simplify these use cases. It takes care of all the details like when can the device go to sleep (if MAC commands need confirmation), what needs to be saved, handling the clock (very important) etc.
Any feedback is appreciated.
from ttn-esp32.
Related Issues (20)
- ADR TXPower doesn't change HOT 5
- Linker error due to missing extern "C" in void app_main() {} in file main.cpp when using platformio HOT 3
- Not possible to navigate menuconfig menu when using platformio HOT 2
- esp-idf 5.0 issue HOT 2
- LoRaWAN and Regional parameters versions
- No TTN option in component config anymore HOT 2
- Can I communicate peer to peer? HOT 2
- TTGO Lora OLED v1 // ttn_hal: LMIC failed and stopped radio.c:1067
- unwanted Downlink request HOT 2
- How to add a region CN470 band code? HOT 3
- Linkcheck HOT 7
- AU915 exceeds Time-on-air for ADR and packet confirmation HOT 3
- SX1262 compatibility HOT 1
- Helium support HOT 1
- ttn_hal: LMIC failed and stopped HOT 4
- deep_sleep not saving data HOT 13
- ttn_hal LMIC failed and stopped error on ESP32S3 with RFM95W HOT 2
- ttn_set_subband function no longer functions HOT 3
- Can this run on LoRa 32 board ? HOT 1
- User message callback when multiple downlinks are queued.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ttn-esp32.