TTN sensor-node with Thinary Nano Every ATmega4808 clone board & RFM95 running LMIC-node LoRaWAN example application. (board_build_variant = nano-4808) Watch the new YouTube video by Andreas Spiess about the ATmega4808 chip. ATmega4808, The New Arduino Chip? - YouTube
Really nice, well done! Great documentation, clear entry points for ‘user’ code, very simple to use.
I’m working on integrating the network time request and how we do our sleep mode, which is not at all integrated with LMICs HAL yet. So it sends the first few uplinks as usual to allow LMIC to send some of its own uplinks I see getting done between first and second ones I ask for, then when it has the network time and figured LMIC has had its say it switches to a hack where the uplinks are scheduled by an alarm rather than the LMIC os stuff, and sleeps between the TX_COMPLETE event and the next alarm. Then it runs a tight loop of run_osloop_once() until the TX_COMPLETE happens. I’m wondering if this leaves some LMIC stuff not done but it’s working so far.
I’d much rather make MCCI LMIC work nicely with the AdaFruit M0 LoRaWAN board so it isn’t always awake, but that may be beyond me. The pin interrupts work, which is something.
I don’t think any of that belongs in your repo. But I will give pull requests for things I think could be worth it. Eg I’ve changed it so setup() doesn’t immediately schedule a call to the processing callback, given it’s going to be ignored while the join happens and tossed away and a new one done when the join completes. I guess this needs to be guarded by a check for OOTA/ABP in setup().
That’s the only downside I see to this - you can’t run it on a Feather M0 on a battery without solar because it’s just too power hungry without sleeping.
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: