Is there any supported way to get wireless status from the Morse Micro modules? I’m looking for wireless RX dB, current MC scheme, failed packets, plus TX and RX speed. Is there some secret API that isn’t documented anywhere?
I’ve got 2 EKH03 dev boards and 2 pairs of Silex AP150/EX150. I’ve gotten them all working just fine. The problem is that my application requires moving the wireless clients around relative to the access point. I am expecting to be pushing the range limits of what the links are able to do so I need to be able to evaluate the quality of the signal on a continuous basis. This signal quality will change how much data we are trying to push through the link at different times.
The only way that I can currently devise to get this information from the MM units is to SSH into the MM device from my device, run a “pt” and scrape the results. Seems incredibly inefficient and fragile. And this will only work on the EKH03s because the Silex EX150s don’t claim an IP on the network when in bridge mode.
Surely there must be a better way. Does anyone have any ideas?
The pt script is just a script wrapping around wavemon while a ping runs in the background. wavemon will scrape most of this info from netlink (nl80211).
It sounds like you want to get the same information, but trigger the necessary services and scrape it from a central device - maybe the existing access point, or maybe another device on the network?
For accessing most of the information you would see in wavemon from netlink, OpenWrt provides iwinfo. There are two iwinfo commands which may be useful to you:
iwinfo wlan0 assoclist - run from the AP to see the full list of associated stations, including information such as the current MCS, TX/RX PHY rates, attenuation, noise and packet failures for each station.
iwinfo wlan0 info - run from any device to show signal level, noise, phy rate etc.
Both of these have a ubus equivalent - eg ubus call iwinfo assoclist '{"device":"wlan0"}' which will output the same data in a json format if that better suits any parsing tools.
If accessing the AP directly isn’t an option - you can also access ubus via uhttpd and execute some of these commands remotely. Take a look at [OpenWrt Wiki] ubus (OpenWrt micro bus architecture) for more information on this. Of course, this will require configuration of the AP.
If you’re feeling particularly brave, you could write an application using libnl directly! But I imagine iwinfo will get you everything you require.
If you’re trying to measure maximum MCS rate from the stations, you will need to ensure some traffic is being sent and received. The pt script was configured to send pings to a pre-configured IP address (command line option with a default). Strictly, it doesn’t matter what this traffic is, but ping is bi-directional so will show an increase in both TX and RX MCS. How you execute this will be up to you, but may want to consider wrapping it up in a script to start on boot or perhaps a hotplug script when the appropriate wlan interface comes up.