I finally got sick and tired of my iPhone disconnecting from wifi when locking, not actively in use, or feeling unloved, and did some research this weekend. There seems to be two issues that are not easily overcome:
- the phone disables wifi when it autolocks
- the phone disables wifi after a certain period of time (default: 30 minutes)
Point #1 is an obvious power saving measure, but #2 is a bit harder to explain. In fact, the only legitimate reason I can make up from whole cloth is that using the wifi for longer than that period of time could perhaps cause a heat problem, but that's a wild guess, and given Apple's nature it's more likely they wanted to somehow disable streaming applications or other apps that would require a persistent connection. Skype would be a good example.
Point #1 is a tough nut to crack; you either have to go into settings and disable autolocking, which is cumbersome, or you can install an application from Cydia (the jailbroken iPhone store) that maintains wifi and active-app responsiveness after the phone autolocks. There are two such Cydia apps; Insomnia and KeepAwake, and by all accounts they are basically the same.
Point #2 is harder because there's no non-jailbroken workaround, as far as I know. The insomnia bugtrack had a big thread on this issue, and it was tracked down to an XML preferences file at
/Library/Preferences/System Configuration/com.apple.wifi.plist. In this file there's a key called
DisassociationInterval that is initially set to 1800 (30 * 60); change it to some higher number.
Even after doing this, my iPhone is unfortunately still too flaky to trust with shoutcast radio, but Cecilia's iPod touch handles it for hours just fine. Rabid apple fans have ways of making these types of issues all about the quality assurance angle ("You would be upset if your phone battery died because you weren't paying attention!"), but the fact is that this is either poor engineering or the same type of anti-customer crippleware that other carriers load on their phones.
Credit where credit is due, the iPhone really changed the game with respect to smart phones. I'm not even really thinking about the touch screen concept when I say this; the iPhone is emphatically a small portable computer, and much of its functionality is software and thus the possibilities are prety fantastic. It would make a great little ad-hoc Shoutcast player when I'm in the living room. Shame.