It would be nice if sleep support can be added to LMIC-node, but the problem is that it will have to work for all MCU families and all supported boards (where possible).
Unfortunately MCCI LMIC still does not provide any sleep support (hooks/functions) to work with LMIC.
Only when MCCI LMIC adds such support, will it be worthwhile to investigate if it is possible to add sleep support to LMIC-node.
For users who want to add sleep support to their solution, you can start with LMIC-node and then add (deep) sleep support to it yourself (but this is not further described here).
It is currently not possible to add sleep support in a generic manner that works for all MCU (boards) supported by LMIC-node. Different type of MCU will/may require a different implementation. For discussions related to that subject please start a separate topic.
Sorry for going off topic @bluejedi but looking at the latest release v1.3.0 I see the old pro mini board bsf_pro8mhzatmega328.h, just wondering if you plan to add support for Nano Every or other 4808/4809 dev boards? I like the LMIC-node but MCCI LMIC, memory etc.
Thx, G
Not currently planned but support could be added if there is enough request for it. (This will require Arduino platform and PlatformIO support and access to the hardware for dev & testing).
Recent versions (> 3.5.0) of PlatformIO Espressif 32 platform have introduced a naming conflict for the hal_init function (probably caused by a new version of the ESP32 Arduino core).
The naming conflict causes the build of LMIC-node to fail.
A workaround has been added to LMIC-node to fix the issue.
Hi brother. I’m currently using the same type of board as you. But unfortunately i can’t find this board on the list of LoRa development board. Mind to share which dev board you are using? Thanks in advance.
Try looking at the example I made few years back on LMIC with my SAMD21 board. Sleep was included. Many of my end clients uses them in the field with the MCCI version subsequently.
Making it work for what is effectively the Adafruit Feather M0 only would generate lots and lots of “why doesn’t the sleep work on X board”. The ESP32 TTGO range are particularly problematic.
The ESP32 boards has to be treated differently as when it goes to sleep and wake up, it is actually a reset event. In such event, some of the LMIC specific variables need to the stored on the RTC RAM section in order for it to be non-volatile. Your code also actually only run in the setup() section and never went into the loop() in your typical Arduino code. This probably leave you needing to write the code slightly differently.
@alihi asked for which board configuration (boardid) was used in LMIC-node.
Your responses do not answer his question and in fact generates noise into the conversation.
Like @descartes already mentioned we are aware about different sleep requirements for different MCU family types and yes the ESP32 is notoriously limited/crippled in this area because sleep/wakeup actually causes a reset of the MCU where program state is not mainted.
Discussions about deep-sleep differences and their requirments for different types of MCU families are off-topic here because this topic is dedicated to LMIC-node (which currently does not support deep sleep for reasons previously mentioned).
This I know, hence my comment - if you search the forum you’ll see plenty of discussions about how hard it is to sleep an ESP32 board.
Love your MiniUltra - perhaps you could help us all out with a version that has space for an RFM95? Which LMIC-node could support for those getting started - and the sleep add-on would be very simple as you’ve already written the library.
And as you were “forced” to design an ESP32 board, perhaps finish it off with a sleep library and space for the RFM95 - I’m happy to help with the linking in to LMIC - there’s no explicit support for sleep but the API is there.
Firstly, great repo, love the detail in documentation and everything is very impressive. Thanks for all the hard work. However, I have an issue.
I have a TTGO-LoRa32-V2.1-T3_V1.6 board and I uncommented “ttgo_lora32_v21” in the platform.ini file. After build and then uploading I seem to be stuck in a boot loop with the following output on the serial:
I have not had the time to look into the issue yet but it appears to be caused by v4.3.0 of the Espressif 32 platform (ESP32 Arduino Core). Version 4.2.0 just works. See below for a workaround:
I tried this and got the following issue when trying to build
Building in release mode
Compiling .pio\build\ttgo_lora32_v21\src\LMIC-node.cpp.o
Compiling .pio\build\ttgo_lora32_v21\lib128\SPI\SPI.cpp.o
In file included from C:/Users/MrBlueSea/.platformio/packages/framework-arduinoespressif32@3.20002.220503/libraries/SPI/src/SPI.cpp:22:
C:/Users/MrBlueSea/.platformio/packages/framework-arduinoespressif32@3.20002.220503/libraries/SPI/src/SPI.h:25:10: fatal error: pins_arduino.h: No such file or directory
Espressif32 platform v4.3.0 has introduced a bootloop issue for TTGO LoRa32 V2.1.6 boards
The issue causes a (re)boot loop when trying to run LMIC-node on a TTGO LoRa32 V2.1.6 board.
As workaround use Espressif 32 platform v4.2.0 for this board instead.
More details can be found here:
Unfortunately the issue still persists in Espressif32 platform v5.0.0.
LMIC-node is still a great example, thanks for the great work. My LoRaWAN node with the board “Heltec WiFi Lora 32 (V2)” ran after 5 minutes including display.