-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node dump functionality for metrics (LQI, RSSI, RX and TX stats) #6
Comments
Hi, |
Nobody did any work on it yet. Its still an open issue. |
Ok, If there is an easy way to access these metrics? |
As long as we have now abstracted way to get them from the kernel subsystem these values are completely driver specific. You would need to get the transceiver datasheet, look up the registers or other ways to get it and extend the driver to provide you the value in some way (sysfs, debugfs, etc). There is definitely coding on the driver level involved. Not sure if you count that as easy. |
Additional these information are useful in combination from which node (indicated by address) was received from. Without this information you can just dump the values from latest received frame. Depends on your use-case if this is okay for you. |
What I really want for metrics is to be able to pull them out of the neighbour cache. So there are really five things to do:
|
Thank you for your useful answers @Stefan-Schmidt @alexaring , I'll have a try. |
@mcr with neighbour cache you mean L2 cache (own implementation over nl802154) or L3 cache (neighbor discovery over rtnl)? What we like to have is a L2 cache, maybe in combination with RTNL IPv6 neighbor discovery cache you can do some mapping between L3 address and L2 address. btw: if we have support also to dump the short address over "ip -6 neigh". Also a short address is unique in combination with pan_id only. So the address need to be some concat with short+pan, I think. |
Hi, Currently I have some problems for the first issue. |
Look like wireless dealing with such TESTMODES, then make the same for nl802154, see: Finally, send-patches. Thanks |
Sorry for the request, I'm not familiar with nl80211, nl802154 and some other things about kernel. I don't think I could do the TESTMODES for nl802154 in short time. I need a temporary workaround for my case. In Appendix A of at86rf233 datasheet, it just requires to make some configurations for registers. Is there any other easy way to realize my case? I just need the two openlabs radio could communicate continuously. Thank you very much for any help! |
@zmingshi, this github issue is about node dump functionality not about any specific at86rf test modes. Please either open a new issue on github to discuss this further or write a mail to the linux-wpan mailing list. |
Hi, Currently I have add some codes on at86rf driver, and make it provide rssi and LQI using debugfs. But, I still have some difficulties, hope you could give some suggestions
Thank you all! |
while true lp->tx_retry is not the max_frame_retries. This is the retry value to going into TX_ARET mode WITHOUT doing a force change. We have some retries there, if currently a receiving is in progress then it will not be aborted. A force state change will do that. The max_frame_retries are setable via wpan-tools "max_frame_retries", be sure that ack request bit will be set otherwise this setting have no sense. |
Thank you for the reply.
Also, the ack request bit can not be set, when I tried the command |
The kernel can report when the file is readable, until that read(2) will block. So you can run a cat on a file and if there is a new value you can save it... at least you will also lost some values because you don't queue them inside the kernelspace. I don't want to tell you workarounds anymore for a non-mainline solution. I already told you the mainline solution would be what wireless do with a netlink interface to dump the neighbours. This handling "how much retries was necessary to got an ACK" is part of transceiver side. You can't get this values, what you can get is the TRAC_STATUS, if it reaches ABOVE max_frame_retires or CSMA-CA retries. According the -EOPNOTSUPP - update your kernel. |
Sorry to answer your reply so late ! @alexaring |
Yes, as you can see it here: no tx power functionality. You can backport it or update the kernel.
|
My kernel is v4.1.15. That means my kernel should be updated. I still have no idea about how to update the kernel (v4.1.15 ->v4.1.21)? As I'm a beginner for Linux kernel, would you mind to tell me how to update it in more detail? Thank you very much! Is there any way to change the tx_power value? I tried to find where to initialize the tx_power in kernel, but I couldn't find it. |
(v4.1.15 ->v4.1.21)? -> should contain only fixes, no new features... it's a stable release. Change tx value -> yes hack it into hw_init of at86rf230 driver. Update kernel -> I can't help you, google it. |
Hi, how can I join the linux-wpan mailing list? I have tried to email to [email protected], but the email was refused. |
Hi all. I too want to have some metrics. I currently use netlink to get neighbour state, but that doesn't give me much to work with when trying to do RPL routing. (usermode, route-over for now) I did add some debug output (in mrf24j40.c) that shows LQI and RSSI for received packets. (hmm.. should go into NL802154_NODE_INFO_ATTR_* or something?) I could use sysfs for now and dump some of the latest seen neighbours; I already tried creating a sysfs file to enable/disable debug toggle. But if I can't get a decent output that uses the additional neighbour info, that wouldn't make me happy. |
It's been a long time since the last comment on October 24, 2017, so I thought it might be helpful to mention that the LQI has been available to userspace applications since 2018: torvalds/linux@811e299 |
Hi, thanks for your comment. Yes you can use that cmsg field to track some LQI values, that requires an all-time user space daemon and you getting all frames and parse them to kind of create a database for each node you want to track the LQI values. Also track the short/extended address mapping. The idea is to move something like such nodes stats in the kernel that you can dump periodically with hopefully newer recent LQI values and you can do some heuristic in userspace to make some sense out of this weird value with maybe combine it with more other values that this nodes stats have e.g. ack errored frames, etc. :-) |
Get some node metrics information out of the transceiver hardware to be used for userspace for decision in RPL for example. Similar to station dump in wireless.
The text was updated successfully, but these errors were encountered: