How Android measures WLAN signal strength

Android-WLANindicator
Ever wondered how Android decides how many bars to show in the WLAN indicator? (Well, the “bars” are gone, but there’s still exactly the same number of levels) While going through Android source code  I’ve found this:

 >> WifiWatchdogStateMachine.java

* RSSI levels as used by notification icon
* Level 4  -55 <= RSSI
* Level 3  -66 <= RSSI < -55
* Level 2  -77 <= RSSI < -67
* Level 1  -88 <= RSSI < -78
* Level 0         RSSI < -88

>> WiFiManager.java

/** Anything worse than or equal to this will show 0 bars. */
private static final int MIN_RSSI = -100;

/** Anything better than or equal to this will show the max bars. */
private static final int MAX_RSSI = -55;

So, now you know! Of course, vendors may change these values, but let’s hope they don’t! 🙂

Why is this important? This the basis of Android’s Poor Link Detection Watchdog – the thing that causes your WLAN clients to switch to another WLAN profile or to WWAN entirely when you least expect it. But I haven’t grok’d all the code yet. Stay tuned…

Advertisements

A perspective on IoT and Wi-Fi coexistence (WLAN Professionals Conference EU 2015)

Yours trully unexpectedly ended up talking at WLAN Professionals Conference Europe 2015 on a subject of IoT and Wi-Fi. I heard good feedback after the session, so you might be interesting in watching 16-min video yourselves. (Disclaimer: presentation on my own behalf and may not reflect the official position of my employer). If you find some context in my video unclear, you might want to view the video of David Coleman, as my talk was largely provoked by his presentation (the current state of IoT allows for more than one perspective on things). Let me know, what’s your perspective on this matter in comments!

BTW, it was my second time there (and a second ad-hoc talk) at WLPC EU, and I absolutely enjoy it. If you reside in Europe and you are into Wi-Fi, you want to be there next time! There were many interesting sessions at the conference, you can view all the recordings here: https://vimeo.com/keithrparsons/videos

What is nSight?

One of the three key highlight of WiNG 5.8 release is nSight – a new WLAN monitoring, visualization and troubleshooting support solution. I am currently demonstrating nSight as part on our WLN2018 next-gen WING5 class, and students seem to like it a lot. This post briefly outlines the key high-level ideas behind nSight. I’m planning on posting something more detailed after WiNG 5.8.1 is released with more nSight enhancements.

What is it really?

A long time ago wise folks making AirDefence WIPS thought “Hey, we’re already gathering hundreds of WLAN stats to monitor security, can we use them for troubleshooting?” This is how AirDefense Network Assurance came to life. Over the years even more features were added and AirDefense WIPS evolved into AirDefense Services Platform (ADSP).

It turned out, however, that real-time performance monitoring and analysis puts much higher strain on platform internals. ADSP WIPS works well for huge networks (10 000s of APs), but with Network Assurance we started running into scaling issues. Instead of rewriting the whole ADSP from scratch (which still works well as WIPS), the decision was made to port the Network Assurance functionality to WiNG5 and integrate it even tighter. This is how nSight came to be.

Now, Engineering says that we have an insanely scalable engine with some interesting features such as automatic DB sync and failover across cluster, modern UI and much better scalability both in terms of the number of managed devices and adding new features. Hope so 🙂

Thus, technically, nSight is an enhanced port of ADSP Network Assurance to WiNG. With greater scalability, tighter integration (and attractive HTML5 UI!), which gives us ability to develop it further. Currently, it doesn’t have 100% of ADSP NA features, but you get ~85% right now, and more will come in subsequent releases.

Realistically, though, it’s troubleshooting tool that is really useful, since it’s much more intuitive and can be used right away, unlike ADSP that required lengthy setup and muddling through the UI.

What can it do?

Here I planned to write another page or two about nSight features, but turns out there’s this 3-minute video that explains it all and shows the UI, so please take some time watching it. Just bear in mind that not everything is implemented as of initial 5.8.0 release. Marketing… I will focus on important/interesting technical details instead.

Here’s I’ll list a few things I find interesting about nSight.

  • Heatmap visualizations for quick triage. Floorplans and heatmaps are already available in WING5 w/o any extra modules (just upload the floor plan images and enable SMART RF). With nSight, however, they become much more useful for quick triage and troubleshooting. First, you can adjust the filtering values (for example, if your application requires SNR or 10dB to work, just set the “min SNR” slider to 10 and see where you might expect problems with your application). Second, many of the elements are instantly clickable for drill-down, so you don’t have to wander in the GUI finding that specific stat for that specific client.
    Click on the picture below for a view of current nSight visualization filters. Some of these checkboxes hide dialogs with further selections. Selecting some options grays out others, takes a minute to sort things out the first time.

nSight visualization filters

  • DPI integration for Application-level visibility and control. DPI and AVC (Deep Packet Inspection, Application Visibility and Control) are another big highlight of WiNG5.8 release (deserving a post on their own). However, “plain” WING5 can only store stats for 24hrs and those stats are not really aggregated (well, that’s a lot of stats). With nSight your options are much broader. Now you can find out things like Top 10 Apps utilizing your network, or clients by app, etc. Time to see how much time those BYOD devices spend doing real work, and who’s hogging your bandwidth (and AVC feature allows you to apply proper traffic engineering to it) 🙂
    Click on a picture below for a larger view of a sample.

nSight DPI

  • Ease of configuration and Cluster support for peace of mind. nSight licenses are shared in the cluster, database is synchronized across the cluster, service will fail over automatically. All this is literally configured with 4 lines of config file.
  • Visibility scoping  for site admins and managed services providers. Many of our partners want to run WiNG-as-a-Service (as a Managed Service Provider, MSP). While this was possible before, it wasn’t part of WiNG. The problem is that any WiNG user can see the entire network. With nSight, however, you can create users that have only access to nSight monitoring UI (not WING5 configuration UI) and only to site(s) you let them see. Thus, hosting multiple tenants on the same system, or giving site admins insight into their own locations is now possible. What’s more, you can re-use dashboards across those sites, so you save yourself quite some time and effort. Ever considered creating dashboards for non-IT users? For example, a dashboard for warehouse manager to show the overall state of WLAN, status of their WLAN devices and application server availability – all they need, but nothing more than that – and generate a daily/weekly automatic report on how great their network performs 🙂nSight 01
  • Simple licensing for simple demos and pilots. nSight runs for 30 days without license – enough to play with it on your own demo VX9000 or pilot at a customer’s site. When the license expires, the data is still collected, just not displayed anymore (UI is shut down), which makes easy to move from pilot to production.

There’s more to nSight, but I think there’s already enough pages in this post. 🙂

What to do next?

nSight seems to excite people who see it a lot. However, I am not a big fan on “x.0” releases, so I’d focus on being able to understand it, talk about it and demo it right now (get that demo setup running!), and be ready to implement it with customers when 5.8.1 comes out (with additional features and many “x.0 release”
restrictions lifted
). When playing with nSight yourself, ensure you can feed more than one AP into it (3-4 at least on the same site) or it will make no sense 🙂

Was that useful? Write in the comments on what you want to know about nSight!

Wi-Fi for IoT – a boon or a bane?

Internet of things is hot now. But what technology should be used to interconnect those devices? Over the years there were multiple contenders, but Wi-Fi was always a bit aside, since it was always perceived as not too energy-efficient. Until recently…

Here’s a picture from a chip maker Rockchip, claiming (claiming!) that their Wi-Fi chip is the most efficient, overperforming even the specially designed ZigBee and BLE chips.

RockchipWiFi

While this seems as a reason to rejoice, promising greater speeds and technology convergence, I’d like to point one thing: 802.11b. Not n, not g, but b. Remember the protection modes, airtime fairness and other nightmares? They might come back in legions. And stay for what seems forever, as Rockchip claims “powering an IoT device for up to 35 years with a single AAA battery”.

What do you think? Is energy-efficient 802.11b chip a boon or a bane for modern WLANs?

P.S. News via SmallNetBuilder – excellent website, whose author is doing great job finding relevant news and testing devices. http://www.smallnetbuilder.com/wireless/wireless-news/32743-rockchip-unveils-iot-wi-fi-soc