Closed StevenCellist closed 3 months ago
and does not show anything related to the network frame counter. To find out the actual FCnt and keep track of network downlinks, one has to leave the console open to catch a network downlink, which shows the actual FCnt.
So the issue is that the network downlinks are only counted when the Console is open?
No, sorry for not explaining clear enough. By that, I mean the following: The frame counter at the top displays N/A (because I didn't send any downlink, i.e. AFcntDown = N/A), but the network has sent 143 downlinks, which I can only find by leaving the console open to catch these downlinks. Because in the JSON, it shows f_cnt = 142. There currently is no way to see this real number of downlinks except for leaving the console open (for possibly, hopefully a very long time!) to catch one of these downlinks.
And sadly, the information in the JSON doesn't even discern AFcntDown and NFcntDown; in the next screenshot there is a device where I have sent a downlink through the console, but a network downlink reports the same f_cnt value as the full_f_cnt value.
I hope this explains what I would like to see improved!
Edit: note that these devices run an actual LoRaWAN v1.1 stack that really discerns these two counters!
Ok noted. This looks like a bug.
@ryaplots: What field is used by the Console to display the downlink frame counter?
Ok noted. This looks like a bug.
@ryaplots: What field is used by the Console to display the downlink frame counter?
The downlink counter in the title section is last_a_f_cnt_down
- https://github.com/TheThingsNetwork/lorawan-stack/blob/8449d7c93a111ee338a44db882d1da6f70f2457a/pkg/webui/console/store/reducers/devices.js#L103-L110
@StevenCellist: We looked into this and it's indeed true that we only display the application frame counter for LW1.1 devices. We should perhaps add two frame counters here if the device is LW 1.1. @kschiffer what's your suggestion?
@KrishnaIyer that would be very much appreciated! My ideas would be a) two downlink counters side by side, or b) showing the separate counters upon mouse hover.
Yeah let's store and display both downlink counters:
@StevenCellist would this serve your needs sufficiently?
@kschiffer yes perfect! The only thing I wonder, is if this is clear enough for new users, as to what they should look at, but I myself would be very happy with it.
Yeah, we'll add a detailed description to the tooltip (help icon) as well.
What should be the text of this detailed description? @KrishnaIyer @kschiffer
I think this following makes sense:
Nwk
: frame counter for network downlinks (FPort
= 0)
App
: frame counter for application downlinks (FPort
>=1)
@kschiffer @ryaplots first and foremost thank you very much for implementing the separate counters: makes my life much easier and looks great! I'm sorry for bumping this; however, it seems the implementation is not yet perfect. I'd like to show two cases:
When no (App) downlink is sent, the arrow and n/a
text is missing - see the following screenshot
There is some sort of n/a
going on, which I think would be for the Nwk counter, as this following device has no downlinks at all:
It just doesn't appear to be working well for the App downlinks.
When a new downlink occurs while the Console is open (at least for Network downlink; didn't test Application downlink yet as otherwise the above screenshot does not occur), the frame counters do weird things - see the following screenshot
The AFcntDown value takes the new value of NFcntDown, while the previous value stays the same... this may have something to do with the f_cnt
/ full_f_cnt
field not showing any distinction between App/Nwk downlinks, but I am not aware of the details on these fields.
And in some case, which I don't know how to reproduce yet (screenshot from a couple days ago), the counters get the same value even though the App should still be at n/a
:
This is likely in the same ballpark as the previous point.
If I can help by sharing access to these LW v1.1 devices (or maybe you can already access them, dunno), let me know please! Would be happy to test :)
Summary
Display the application downlink frame counter as well as the network downlink frame counter in the device console, next to the uplink frame counter.
Current Situation
Currently, the single downlink frame counter only keeps track of the application downlink frame counter, and does not show anything related to the network frame counter. To find out the actual FCnt and keep track of network downlinks, one has to leave the console open to catch a network downlink, which shows the actual FCnt. Although, even this event only shows a complete FCnt, not a separation between AFcnt and NFcnt.
Why do we need this? Who uses it, and when?
Adding the network downlink frame counter aids easier analysis of behaviour of individual nodes, e.g. performance under ADR. Some RF environments are quite unstable, causing many ADR downlinks; being able to compare these 'hidden' downlinks quantitively will help a lot. It also helps validating correct behaviour of nodes in general.
Proposed Implementation
Change the current downlink frame counter such that it shows the AFcnt / NFcnt values when hovering over it with the cursor, or duplicate the downlink arrow, with e.g. one with N and one with A next to it, with a complete separation between the two.
Contributing
Code of Conduct