Comments (5)
Got it. The node.restoreFcntUp()
function was nicely implemented with 'dynamic sizing' of the NVM buffer size which got expanded from 6.3.0 to 6.4.0, but unfortunately I apparently had forgotten to also dynamicalize (inventing new words there) node.saveFcntUp()
.
If it bothers you personally, the fix is to change lines 818/819 to
uint8_t fcntBuffStart = mod->hal->getPersistentAddr(RADIOLIB_EEPROM_LORAWAN_FCNT_UP_ID);
uint8_t fcntBuffEnd = mod->hal->getPersistentAddr(RADIOLIB_EEPROM_LORAWAN_FCNT_UP_ID + 1);
uint8_t buffSize = fcntBuffEnd - fcntBuffStart;
#if RADIOLIB_STATIC_ONLY
uint8_t fcntBuff[RADIOLIB_STATIC_ARRAY_SIZE];
#else
uint8_t* fcntBuff = new uint8_t[buffSize];
#endif
mod->hal->readPersistentStorage(mod->hal->getPersistentAddr(RADIOLIB_EEPROM_LORAWAN_FCNT_UP_ID), fcntBuff, buffSize);
And modify the two occurrences of simply '30' in the lines 859 & 864 to buffSize
.
I will include this fix in a PR later, probably next week.
from radiolib.
@StevenCellist good catch - no, that is not intentional. I guess I never really used god mode to acces private members from PhysicalLayer
. I will fix it so that your PR can remain focused on LoRaWAN stuff :)
from radiolib.
I have a suspicion, I will investigate. Good find!
from radiolib.
@StevenCellist thank you so much for your quick investigation! I'll apply your fix locally, looking forward to your PR :)
from radiolib.
Welcome and thank you for digging this out + providing the easy code for me to run. I suspect this also solves behaviour that I thought I dreamt of where some packets went missing, but it may also help in solving #949 which will come clear soon.
@jgromes while debugging this, I noticed that PhysicalLayer.h
does not expose its private members upon godmode because of the protected:
at its line 491 - is this intentional, or could you move that block to below private
?
from radiolib.
Related Issues (20)
- CubeCell + POCSAG issues. HOT 1
- RP2040-LoRa Development kit HOT 6
- SPIcheckStream in Module.cpp is ineffective (does nothing) HOT 1
- LoRaWAN ESP32 (Heltec WSL V3) reboot with stack error HOT 14
- TTGO LoRa32 (T3S3 v1.2) Error -16 HOT 10
- Sending more than one message in POCSAG HOT 1
- 'virtual float PhysicalLayer::getRSSI()' was hidden ESP-IDF HOT 10
- Feature request: AX.25 parser HOT 4
- Think I introduced a bug with Promiscuous (requireCarrierSense) when used with directMode HOT 2
- Move Raspberry Pi example to another GPIO library HOT 10
- Better error handling in the HAL HOT 3
- CC1101 Direct Mode getRSSI() only ever returns -74.0 HOT 2
- importing Radiolib into VSCODE + Platformio with NRF52840 board does not compile HOT 13
- SX1280 startTransmit after CAD not working HOT 4
- Move examples to a separate repository HOT 14
- Invalid calibrateImage parameters prevent initializing with 915MHz frequency on SX126x-based STM32WLx HOT 2
- #include <Radiolib/SX1262.h> is available to use less space than the hole library? HOT 1
- Minor issue in startReceiveDutyCycleAuto HOT 3
- GFSK support for SX1231/RFM69 and SX127x/RFM9x HOT 2
- Support for MSPM0 Microcontroller HOT 1
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 radiolib.