Björn Smedman in Wireless 10 minutes

Bayesian Wi‑Fi: Materials & Methods

First of all, a big thanks for the great response to the previous post in this series. For a brief time it occupied the top spot in Reddit’s /r/Statistics and /r/MachineLearning.

Google Analytics Screenshot

Just in case anybody's curious, this is what you can expect in terms of traffic from a top spot in /r/Statistics and /r/MachineLearning.

The last post ended with a speculation on next steps and a request for collaborators. Since most of the interest has come from academics I’m leaning towards a paper as the primary deliverable, with an implementation submitted to the Linux kernel coming in a strong second place.

Materials & Methods

The other day I went out and bought a TP‑Link TL‑WDN4800 Wi‑Fi card for my desktop and a TP‑Link TL‑WA901ND v4 wireless access point. Luckily it was very straightforward to install LEDE (a fork of OpenWrt) on the access point, and the Wi‑Fi card just worked instantly with Ubuntu 16.04.

Wi-Fi Rates Screenshot

Minstrel's rate table contains 52 combinations of radio parameters to consider for the connection between my newly bought Wi‑Fi card and access point: 4 legacy 802.11b rates, 8 single-stream 802.11n rates with short guard interval, 8 dual-stream 802.11n rates with short guard interval, 8 triple-stream 802.11n rates with short guard interval, and then all the 802.11n rates again, this time with a long guard interval instead.

I’ve also set up a GitHub repository for the project. So far it contains a Makefile to make it easy to clone the LEDE git repository, apply some patches and build firmware for a number of consumer Wi‑Fi routers, among them my TP‑Link TL‑WA901ND v4. The patches make Minstrel sample a lot more and log the result of transmissions. A very simple script called takes log prints and turns them into comma-separated values, fit for consumption in a Jupyter notebook.

In order to make it easy to jump in without buying gear I’ve added a couple of datasets to the git repo, so you can just git clone ; cd bayesian-wifi ; jupyter notebook and start hacking away. :)

Next Steps

So what should be the aim of the explorative data analysis? Well, my first hunch is that there’s probably a significant difference between the probability of a transmission with a particular set of radio parameters succeeding, and the conditional probability of that same transmission succeeding given that another transmission has just failed. Since Minstrel does not exploit this pattern in the data it could be “low hanging fruit” for a new rate control algorithm.

If you want to explore the above hypothesis, or if you have one of your own, feel free to git clone and send me a pull request!

Want to Join In?

Want to join in the fun, and get your name on a research paper? Shoot me an email at or fill in the form below!