Comments (9)
You must also save the Fcnt (up and down) as these must always increase in value after a join (with the exception of during repeated message transmissions).
from loramac-node.
I'm afraid that there would be much more to save, I assume:
- Uplink counter
- all the parameters got from the network like, Added and removed channels, ...
- the Datarate and power (in case of ADR enabled)
- the information about dutyCycle on different bands
- the info of last time that a confirmation has been asked (in case that ADR is enabled and by default sending without Confirmation)
- be aware about running timers, especially in case of duty cycle enabled and your telegram is delayed (it may be quite long from power saving point of view, I mean level of minutes)
Maybe you can try to ask Semtech to facilitate this work to identify those params ;-)
I'm not experienced on this area but if you use an OS and you are running this on a task context, you could save it on NVRAM....
from loramac-node.
No, I only have 32K of flash, i can't use an OS....I'm using structure saved in flash before sleep. I will tell semtech about that.
from loramac-node.
One comment, about Flash usage. It will age and depending how often you power cycle your board, it can reach the limit quite fast. depending the component, it will have between 10.000 and 100.000 write cycles. https://en.wikipedia.org/wiki/Flash_memory#Write_endurance. If you power cycle once a day, no problem, but if this is more often, it might be problematic. You probably can write at various location in the flash to prevent aging.
The Flash write and erase will consume some power. Does this is lower than the deep sleep mode of the micro controller you plan to use?
Can you chose a MCU with a very low deep sleep consumption?
from loramac-node.
Yes, one transmission per day during 5 years. 1825 transmission it's largely below 10000....
My consumption is below 1uA without ram retention and about 5uA with. For just a write per day, it's better to save in flash.
from loramac-node.
This was a suggestion to ask, but I'm not sure that it is on their priority list.
If you really can't change CPU with one that can make RAM retention at the required power consumption (as example you could have a STM32L0 or L4 that has RAM retention with less than 1uA), then you have some work to do :-(
I would take in consideration those possibilities:
A) Just save the info related to the activation (devAddr, nwkSKey, appSKey), this in case of OTAA (in case of ABP you already have saved) and restart the stack every time using ABP.
But before to do so, verify with Semtech/LoRa Alliance and the network provider if it is accepted that you proceed on this way, from my interpretation it is not forbidden, but you never know what the server side is doing (e.g. when receiving always Frame counter Up = 1) .
B) similar to A) but include more parameters (after discussion with the other parties
C) more safe (from approach, but not from potential introduction of bugs) but may require quite big effort on definition, stack modification and stack merge at every release.
On this case I would proceed on :
- Collect all those parameters
- Ask Semtech if they have time to review it
- add new functions on the stack to save and recover those variables (in case that they have static variables directly on functions, adapt them to take it out)
- Test, Test, Test
from loramac-node.
It's possible to get MIB_UPLINK_COUNTER and MIB_DOWNLINK_COUNTER but it's impossible to set them with LoRaMacMibSetRequestConfirm....
from loramac-node.
Hi,
Just read quickly. What mcu are you using? Does it have eeprom?
I think (if I am not wrong) that all the STM32L have internal eeprom. Much easier to use as you can write byte in any location (no need to erase half a page etc).
from loramac-node.
This issue is covered by the #364 issue.
from loramac-node.
Related Issues (20)
- TX Timeout hardcoded HOT 1
- DL not received in Class C AS923-1 + Freq 923.600
- Pre-certification should always failed due to duty-cycle limitation HOT 2
- Stack writes to NVM while radio is transmitting
- TimerInit called multiple times on the same TimerEvent_t struct HOT 1
- Race condition in RtcGetCalendarValue on NucleoL476 board
- LORAMAC_TX_CONFIG tested, but never set.
- GpioMcuRemoveInterrupt sets GPIO pull-up/pull-down registers to random uninitialized memory
- Secure-Element Preprocessor definition ifndef wrapping HOT 1
- AES function rename due to multiple definitions linking error
- LmHandlerInit causing some current leakage till the first tx HOT 3
- The correct value of MinRxSymbols? HOT 1
- does any body port this project for stm32f103?
- Does the Firmware Management (Port 203) is supported by LoRaMac-Node ? HOT 2
- Errata 2.3 current implementation may impact TX configuration
- MacBook M1 chip complies fail! arm-none-eabi-gcc: error: unrecognized command-line option '-arch'; did you mean '-march='?
- Support for MSPM0 Microcontroller
- stm32系列的Unique Devices IDs register错误
- Radio.Sleep() may leave antenna switch powered HOT 1
- Check the fragcounter in donwlink FragDecoderProcess
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 loramac-node.