2009-06-29

Nuke your phone

A Hoffman box is an important tool for testing mobile apps. Does your app behave properly when it loses its network connection? What about when the connection is restored? What if it loses the connection while downloading data during a screen transition? What if the user cancels a transmit/receive action during a period of intermittent connectivity? Enumerate all the ways your app could break because of network connection problems, and use a Hoffman box to test your app on an actual phone.

"A Hoffman Box is an enclosure used to secure electrical and/or network equipment."[Wikepedia: Hoffman Box] I have three Hoffman boxes in my home: one in the basement where the main electric line enters the house; another one in the basement for the main feed to my apartment; and one inside my apartment, with individual circuits for each room. Hoffman is a company that makes these boxes. "Hoffman box" has become a generic term for these boxes, like Kleenex is often used as a generic term for tissue.


A Hoffman box

In the mobile apps industry, we have repurposed the Hoffman box. We use Hoffman boxes "to temporarily shield mobile devices from their carrier signals"[Wikepedia], helping us test the our apps and devices under adverse conditions. We don't use actual Hoffman-brand boxes--we apply the term Hoffman Box to any metallic enclosure that limits the device's ability to connect to the network. "Most industry Hoffman Boxes are modified faraday cages, built without an opposing electrical field running through them and often not grounded in any form."[Wikepedia]

Most of us don't have a spare Hoffman box that we can use for testing, but we do have an excellent substitute: the microwave oven in your kitchen. Your microwave oven is a box. Five sides of the box are shielded with metal, and the sixth side is shielded with a metal grid. Microwave transmission is blocked by the oven box so the oven doesn't cook you while you watch it cook your food. Thus your microwave oven is a Hoffman box.

Is the microwave oven an acceptable Hoffman box for testing mobile apps? The oven blasts your food with energy in the 2.45 GHz frequency band, so the oven's box shields against that frequency band. This table shows common frequency bands for the microwave oven, cellular networks, and WiFi networks:

Cellular
WiFi
Oven
850 MHz == 0.85 GHz


900 MHz == 0.90 GHz


1700 MHz == 1.7 GHz


1800 MHz == 1.8 GHz


1900 MHz == 1.9 GHz


2100 MHz == 2.1 GHz



2.4 GHz



2.45 GHz

5.0 GHz


I conducted some tests to see what happens to my phone inside a microwave oven. The test device is a first generation iPhone running on T-Mobile at 1.9 GHz [Wireless Advisor] and connected to a local WiFi network at 2.4 GHz.

For Test 1, I set the phone to Airplane Mode and I turn on the WiFi radio. The phone connects to my local WiFi network. I run Mobile Terminal and type ping kasperowski.com. The pings return to my phone in a few hundredths of a second. I place the phone upright in a plastic bowl in the microwave oven and shut the door. After a few seconds, ping reports No route to host, and the WiFi indicator goes dark. I remove the phone from the microwave oven. A few seconds later, the phone reconnects to the WiFi network and pings again return to the phone in hundredths of a second.


My microwave oven


Test 1: outside the oven, inside the oven, and outside the oven

For Test 2a, I unset Airplane Mode, and the phone reconnects to T-Mobile with an EDGE data connection. I turn off the WiFi radio. I ping kasperowski.com again, and the pings return in tenths of a second. I place the phone in the microwave oven and shut the door. After a few seconds, ping reports No route to host, the carrier indicator displays No Service, and the data network indicator goes dark. I remove the phone from the microwave oven. About a minute later, the phone reconnects to T-Mobile with an EDGE data connection. The next ping reports that it took about 71 seconds, and subsequent pings take tenths of a second.


Test 2a: outside the oven, inside the oven, and outside the oven

Test 2b is like test 2a, but the result is slightly different. When I place the phone in the microwave oven and shut the door, ping reports No route to host and the data network indicator goes dark, but the phone retains its GSM connection to T-Mobile.


Test 2b: outside the oven, inside the oven, and outside the oven

In all three tests, the phone lost its data connection when I placed it inside the microwave oven, and restored its data connection when I removed it from the oven. The microwave oven's box is designed to limit transmissions in the 2.45 GHz band, and I tested the 1.9 GHz and 2.4 GHz bands. For these frequency bands, the microwave oven is an excellent Hoffman box for testing mobile device connectivity.

Sources

2009-06-19

Ken Schwaber's Flacid Scrum

Ken Schwaber presented "Flacid Scrum--A New Pandemic?" last night at the Agile Bazaar. Ken's talk was a one hour overview of Scrum, with the point that if it's ScrumBut, then it's not Scrum. Scrum works because it exposes organizational impediments to success, not despite exposing impediments. Don't adapt Scrum to your organization's dysfunctions; correct them!

2009-06-01

Krausen is your friend

If you are a brewer, then krausen is your friend. I keep my brewing simple, without quantitative specific gravity measurements to inform me whether the beer has completed its fermentation or how much alcohol it contains. Instead, I count bubbles and watch krausen. After a week in the primary carboy, my active krausen is telling me that it's not yet time to rack to the secondary. This simplicity is relaxing.

LinkWithin

Related Posts with Thumbnails