Comments (2)
Hi @tothero
Thank you for your feedback. Agree with you parse downlink message through lw_mtype_msg_up is messy, the idea is to reuse APIs, because down/up messages are very similar. I'll see if there is clean way to do it, maybe rename the api to a general one like lw_mtype_msg and call it in lw_mtype_msg_up and lw_mtype_msg_down functions.
I didn't do test again. The code is intended to designed like that. Design it in that way the parser can compatible with counter roll back (16 bits only, 32bits counter roll back not supported).
fcntmsb = (uint16_t)(cur->ufcnt>>16);
if(fcnt16<fcntlsb){
fcntmsb++;
}
This piece of code is for counter overflow check. So it should support 32bits counter.
from lorawan-parser.
Thanks for your response. I will see if a can make a PR for you after doing some testing at this point. For LoRaWAN 1.1 there will be only 32 Bit Framecounter no 16 Bit are allowed anymore.
Btw i made very simple lib just for parsing based on parts of your code. check it out here:
https://github.com/Lobaro/util-lorawan-packets
Maybe or not it could make sense to integrate this into your tool to add a layer of separation between parsing and other stuff your tool does.
Greetings
Theo
from lorawan-parser.
Related Issues (13)
- Linux compile HOT 1
- Failed to build on macOS HOT 1
- Buffer overflow detected HOT 2
- DeviceTimeReq/Ans not supported
- The Class B bit is not displayed when present in the Fctrl HOT 1
- Cannot generate join accept message HOT 1
- DATA MESSAGE PARSE error(-8) and MACCMD error(-5) HOT 10
- Segmentation faults on Raspberry Pi 3 HOT 1
- warning: format not a string literal and no format arguments [-Wformat-security]
- Colorful output doesn't support Windows MiniTTY
- About lorawan-parser develop branch HOT 1
- Cannot parse decoded packets from gr-lora 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 lorawan-parser.