Tuesday, October 8, 2013

The CC3000, 802.11n and MIMO

MIMO creates a significant issue for the CC3000.

Most modern wifi access points (APs) support at least the following three 802.11 protocols:

  • 802.11b which supports 11Mbs.
  • 802.11g which supports 54Mbs.
  • 802.11n which supports up to 600Mbs.
Such APs by default generally operate in what's called mixed mode, i.e. they support all protocol variants concurrently, one client may be connected to the network using 802.11g while another is connected using  802.11n.

The CC3000 only supports 802.11b and 802.11g - so it can connect to old APs that only support one or both of these protocols or to a modern AP that's running in mixed mode.

Note: it's a commonly held belief that a mixed mode network runs at the speed of the slowest device connected to it. I.e. if there's an 802.11b (11Mbs) client on a network then all other clients will also be restricted to this speed, even two 802.11n clients (capable e.g. of 156Mbs) talking just to each other. If this was ever true it is not true any more for modern APs.

With the older 802.11 protocols a device had no choice but to support the relevant speed, i.e. 11Mbs or 54Mbs.

802.11n is interesting in that a device capable of no better speed than that supported by e.g. 802.11g can still be 802.11n compliant.

Being 802.11n capable means that a device understands the protocol and can work, if required, on a network that only supports 802.11n. However each device negotiates the speed it can handle and the AP will adjust the speed of its transmissions to a particular client according to that clients capabilities.

The main factor affecting the maximum 802.11n speed a device can support is MIMO. Basically with 802.11n the more MIMO capable antennas a device has the higher the speed it can support.

Typically the smaller and more energy frugal a device needs to be the fewer antennas it will have.

A typical home AP will have enough antennas to support the fastest current desktop wifi setups, but will adjust its transmission speed for each client according to the capabilities of the client.

This leads to an interesting problem for the CC3000. To pick up the SSID etc. transmitted by a Smart Config application it needs to run in monitor mode, i.e. be able to watch all traffic on a network.

Currently it can monitor traffic from 802.11b and 802.11g clients, and interestingly, even though it doesn't support 802.11n once it is connected to a network, it can monitor Smart Config traffic from certain 802.11n clients.

Which 802.11n clients it can monitor seems to depend on MIMO. If the client is something like a smartphone there doesn't seem to be an issue but if the client is a modern laptop capable of the higher 802.11n speeds then things don't work.

So it's not enough for the CC3000 to just add 802.11n support explicitly. Unlike previous 802.11 protocols, where supporting the protocol was enough in itself, monitoring all 802.11n traffic on a network also requires that the given device has enough MIMO capable antennas needed to handle the highest traffic speeds seen on that network.

For a tiny embedded device like the CC3000 this isn't really feasible. So while the Smart Config idea plays well for older 802.11 protocols there are issues with improving the CC3000 such that a Smart Config setup application could be run from any 802.11n client irrespective of the speed supported by that client.

Note: I said "seems to depend on MIMO" above - I'm not a MIMO expert but experimentation with different 802.11n devices seems to confirm what I believe. I'd be interested in input from a real 802.11n/MIMO expert.

Among other things my experimentation has included forcing my Macbook Air which can talk, using its built-in wifi, to my AP at 144Mbs to instead use a cheap USB wifi dongle. If I use built-in wifi my CC3000 device cannot pick up the data transmitted by my Smart Config application but when I use the cheap USB wifi dongle it can.

Note: there are lots of cheap small 802.11n USB adapters for Windows and Linux but while there are a few older 802.11g adapters for Mac there aren't many 802.11n adapters. Presumably this is because all modern Apple hardware comes with builtin wifi. So I ended up looking at what USB adapters people are using with Hackintoshes (home brew, i.e. non-Apple, Intel based hardware capable of running Mac OS X). I found a number of recommendations on MacBreaker.com and deliberately chose the smallest and cheapest one in order to get something 802.11n compatible while minimizing my chances that it would support the higher end 802.11n capabilities that cause the problems discussed in this post. I chose the D-Link DWA-131 - they don't sell it as Mac compatible but it comes with a Realtek RTL8191SU chipset and the MacBreaker page provided a link to the Realtek driver page for this chipset. There Realtek provide a Montain Lion driver that works fine - once installed you need to turn off your normal wifi first and then use their somewhat underwhelming Wireless Network Utility instead. Everything works fine and as reported my CC3000 device picks up the data transmitted by Smart Config when I use this adapter in place of my builtin wifi.

0 comments:

Post a Comment

 

Copyright @ 2013 Depletion Region.

Designed by Templateify & Sponsored By Twigplay