"Ladies and gentleman, put down your MiFis, and step away from your laptops, or there's going to be trouble."

Apple's CEO didn't actually utter these words during his demonstration of the iPhone 4's higher-density screen at the Worldwide Developer's Conference (WWDC) on Monday. But the seeming failure of the iPhone 4 to access an Apple Wi-Fi network caused a stir.

Jobs said from stage, and an Apple engineer later told InfoWorld, that over 500 WiFi networks were in operation. Not 500 WiFi adapters or connections—in an audience of 5,000, there could have been thousands—but 500 distinct networks.

Most of these networks were apparently generated by people using a MiFi, a cellular gateway from Novatel Wireless, sold by Verizon Wireless and Sprint Nextel, which relays 3G networks over WiFi.

However, after examining the video from the event and discussing it with two veteran WiFi gurus, it seems almost certain that the MiFi was only part of the problem. A flaw in the pre-release iPhone 4 iOS was clearly another element. Apple's public relations confirmed receipt of a request for comment, but none was forthcoming.

That's not to say that having hundreds of WiFi base stations doesn't cause trouble. In fact, the iPhone 4's putative driver problem likely arose from the multitude of network signals. But neither the ocean of signals nor the iPhone 4's performance can be looked at entirely in isolation.

Checking the replay

Let's take a close look at the video, which shows an iPhone 3GS on the left and an iPhone 4 on the right. What's confusing in watching the video at first is that Apple had a backup set of devices cued up and ready to go. Steve Jobs' backstage folks switch between the first set of phones and a second, and then back to the first during the first part of the referenced clip.

Here's the replay in slow-motion:

0:06: The iPhone 3GS has mostly loaded the New York Times, but the iPhone 4 displays just a title bar, and no content on the page. A WiFi icon is in the iPhone 4's status bar at the top. 0:17: Jobs brings up the backup set of devices, and the backup iPhone 4 is on 3G (switch to 720p in YouTube to see that more distinctly). 0:21: You can see the 3G indicator clearly on screen here on the backup iPhone 4. 0:28: The iPhone 4 can't acquire a 3G connection, which isn't surprising given the indoor location and thousands of AT&T devices in the audience. The audience laughs, and a wag suggests Jobs try Verizon. 0:47: The demo screen fades subtly back to the original pair of devices, in which the WiFi icon is shown on the iPhone 4, but it still has not retrieved the page. 0:59: Jobs presses the Home button, then relaunches Safari, and a WiFi icon is clearly visible, but the page doesn't load. 1:10: The page finally starts to load, but Jobs gives up and moves on.

So what happened here? I spoke to two people with a long career in wireless networking: Phil Belanger and Phil Kearney. Belanger's name is on the 802.11b spec and he helped pick the brand name WiFi, while Kearney headed up Apple's networking group (including AirPort) from 2002 to late 2008.

Neither was present at the keynote, but after seeing the video and discussing what appeared to happen, both agreed separately that the iPhone 4 was having trouble. Belanger said, "It seems more like there's something funky with the iPhone software." Kearney said, "My experience in the wireless space leads me to believe that there may be a bug in the firmware or the driver for the WiFi chip in the iPhone 4." (Kearney and his group provided advice for the iPhone and iPod touch engineers, and he consulted with Apple's WiFi chipmaker on the chip in question.)

Ten years of testing WiFi devices led me to the same conclusion. I'm the tester companies both like and hate: I've found hundreds of problems with adapters and drivers, which companies have (usually) fixed after I've reported them. This includes a number of issues uncovered with Apple's AirPort products. I'm used to analyzing and diagnosing WiFi oddities.

How did the two Phils and I make this supposition? Let's start with what seemed to be the problem initially, too many WiFi networks.

Mobile Hotspots Proliferate

There was a plethora of WiFi networks

available during the WWDC keynote

The MiFi was the first truly mobile and widespread deployment of a mobile hotspot. It's a battery-powered, shirt-pocket-sized device that picks up a 3G network and shares that access over WiFi with up to five other computers or gadgets.

While there were several similar gateways available before the MiFi, it was the first to combine portability with direct carrier resale to a mass audience. The MiFi requires a two-year contract and is free from Sprint or $100 from Verizon, with a $60-per-month contract plus five cents per MB for usage above 5 GB each month.

The MiFi defined the category of "mobile hotspot." Before the MiFi, 3G-based mobile hotspots were typically limited to either tethering (using a cell phone as a kind of modem via a USB "tether" or through a Bluetooth modem profile), or using a 3G modem plugged into a laptop with Internet sharing enabled over the laptop's WiFi card. Tethering is fine, but limited; 3G modem sharing is awkward.

A mobile hotspot creates an access point (AP) in precisely the same way as a dedicated WiFi router. This includes having a unique BSSID (Basic Service Set Identifier), which is like a MAC address for a base station, and an SSID (Service Set Identifier), the human-readable name that's presented by software that lets you connect.

Now, we're going to see massive numbers of mobile hotspots in the near future as phones supplant and supplement MiFis. The Palm Pre Plus and Pixi Plus offered the feature months ago, although Verizon is the only U.S. carrier to support it. And the just-out Sprint HTC Evo 4G, also includes this service, although it's only enabled over WiMax networks right now, and Sprint will charge $30 per month for use (over 3G or 4G) starting in July.

What will really open up the floodgates, though, is Android 2.2, which includes a mobile hotspot feature in the basic operating system setup. Carriers may choose to disable or charge for this option, but it will set up a very different expectation from phones.

Oddly enough, the iPhone 4 doesn't include a mobile hotspot option. iPhone OS 3 allowed tethering, which some carriers (not AT&T) enabled for a fee. The iOS 4 release will bring with it AT&T tethered support, but not WiFi-based sharing of a connection.

Contention in the Air

What makes the MiFi and other mobile hotspots into a congestion problem? After all, thousands of base stations can also work in concert—as at colleges, corporations, and large outdoor deployments like that of Cablevision—where centralized management varies elements such as power output and channel choice.

That's because a set of WiFi adapters connecting to a network of base stations that expose themselves as the same network (or set of networks with virtual SSIDs) don't contend for access. The adapters use a variety of techniques to share the available spectrum slice (a channel) allotted to their communications, with the base station acting as a mediator.

The problem with huge numbers of uncoordinated base stations is that each is trying to carve out its own use, and each (along with associated devices) has to be only mildly respectful of all other WiFi gear in the same and even adjacent channels.

Without base station coordination, each network takes a hit because it doesn't know precisely when a device on another network will start broadcasting. Get enough of those, and every device is backing off from talking, because it's overlapping with someone else.

Phil Belanger explained, "Rather than interference, it's just congestion. It's not a foreign signal, it's well known; all the clients can decode there's something going on."