2012.02.16 09:50:46 p.m.
iPhone Nightly Data Usage -- Culprit found? Tags: iphone


Yes, the iPhone actually can use a lot of extra data

Since getting a new iPhone 4S, I've noticed that it transfers much more over the cellular data network on its own than I do manually. For a while, I was even manually turning data on when I needed it, then turning it off again. Needless to say, this was quite tedious. The majority of the unnecessary data transfers seemed to be occurring at night as I slept. Online discussions of similar issues were generally inconclusive. Many commenters seemed to place the blame on the user, saying that they only thought the data was being used at night since AT&T was aggregating the days usage and reporting it at night. Using the Data Usage Defender app, I verified that the data was, in fact, being used during the night time.

Another article claims that AT&T was in fact transferring exorbitant amounts of data in the wee hours for diagnostic reasons, but that you weren't supposed to be charged for this usage. They even claim that this data is transfered when the Cellular Data options were off... To me, this explanation seemed unlikely.

A Gizmodo article posted a sloppily worded "official explanation" from AT&T that late night data usage on the bill is just a "routine update of your daily data activity on your device to ensure the accuracy of your data billing. Customers are not charged for data usage, given that no data session is generated.". Apparently this was again interpreted as saying "its just the aggregate data used from earlier in the day". But, the statement, and especially that last bit about not being charged for data usage just plain makes no sense to me.

So, I struck out on my own.

The search (abbreviated)

After turning off any data usage settings that I could find (iCloud's sync, the App Store's "Use Data", etc.), it looked like my data usage was under control. Over the following month, I woke up a handful of times to find another 10M used overnight. However, this was infrequent enough that it wasn't going to threaten to overrun my data plan, so, although annoyed, I wasn't too worried.

Then, a few nights ago, it started again. 10M in one night. 15 the next. Nothing at all the third night. Another 10M last night. WTF? This had to stop. But, first, why was one night data free? It dawned on me that I hadn't plugged the phone in that night (I get about two days worth of battery with normal usage). So, this morning I plugged the phone in and let it sit for about two hours. Another 3M was used. Somehow I had to figure out what was using all of my data.

Using a VPN with a proxy server set up, it is possible to dump all traffic the iphone sends and receives. By looking at a dump of the data traffic, I found out that the phone was connecting to ax.init.itunes.apple.com roughly every minute and downloading a file called bag.xml. According to a blog post by @DHowett, this file is a list of information about all applications installed on the phone that is used to determine if any updates are available. For me, each transfer was running about 30K. Throughout the day, I have been able to reliably reproduce runaway data usage by plugging my phone in. I have also been able to verify that it is almost entirely due to downloading bag.xml.

Possible Resolution

Since the App Store appears to be the source of my data usage, I once again looked at the Store configuration settings. The only thing that was left on was the "Apps" setting under "Automatic Downloads". (Note that "Use Cellular Data was not turned on.) On a hunch, I turned off the auto-app-download feature, plugged in the phone, and made some lasagna with my wife. After over an hour had passed, I checked the phone. No data was used during that period (or at least less than the 10K precision of Data Usage Monitor). So, I turned the option back on, waited a bit longer, and sure enough returned to data usage at the prior rate.


So, there it is. The App Store's Automatically Download Apps feature can cause constant, repetitive checking in with the App Store while the phone is plugged into power. For me, this was using data at the alarming rate of 30K per minute, which if constant throughout the month, would have led to ~1.3G of data usage.

Now, I still don't know why (thankfully) this has only been an intermittent issue for me. Some condition clearly has to be satisfied to trigger the constant checking for updates by the App Store. One possibility is that I currently have a few apps that actually do have updates waiting, whereas I was previously fairly quick to download the updates.. At this point, however, that is just speculation. Regardless, it looks like Apple's software has a real bug that is (potentially) costing unwary customers real money.

Update (Feb 17, 2012 12:22)

A talked with Apple support this morning (after setting up an appointment yesterday). Very pleasant experience. The initial rep took my information and quickly escalated to a senior support advisor. He took down a more thorough description and passed it along to engineering. It may take a few days to hear back from them, but at least it quickly got pushed through to the correct channels. So far, this has definitely been my best experience with customer support at a large company.

2011.04.21 10:23:19 p.m.
better than grep Tags: unix

If you are a unix geek and search through large directories of text files (e.g. code), then ack is a pretty amazing replacement for grep.

Just thought I would pass that along.

2010.10.06 09:56:34 p.m.
Elicit 2.1.0 Released Tags: elicit

I have released a new version of Elicit (a screen magnifier / color selector).

After getting some feedback from a few users, I decided to change how actions are initiated. In prior versions, to start zooming, you would click on the magnifier region and drag to the area you want to zoom in on. Likewise, to select a color, you dragged on the color palette. This is a bit unintuitive and not easily discoverable. So, I have added two buttons that you simply click (and release) to start zooming (or selecting colors). This freed up left mouse drags on the magnifier / swatch, so these now perform drag and drop.

I have also added a small script called elicit_remote that uses dbus to communicate with Elicit. You can use this to bind global key combinations to elicit actions. For example, I have the Search button at the top of my keyboard bound to run elicit_remote Magnify, If elicit is not currently running, it will launch and begin magnifying.

2010.06.19 11:40:22 p.m.
Converted Suitcase UV Lamp Tags: projects

Last weekend Suzanne came home from an antique store in Fremont and plopped an old beat up suitcase in front of me. The suitcase contained a vintage ultra violet lamp on a hinged armature. The lamp was manufactured by Mastercraft Mfg. Industries in Chicago under the brand name Graham-Walker. Despite living in Seattle, we weren't really in the market for a UV lamp. However, a few months ago we had come across some reproduction early 1900's bulbs at Great Stuff down in Georgetown. The bulbs are clear glass and run at a lower wattage so the filament can be seen. The filaments come in a variety of patterns, with our favorite being the squirrel-cage design. We both agreed that this lamp would be perfect for one of those.


The UV bulb socket is slightly larger than the standard bulb size, so it would need to be replaced. The cord from the bulb to the switch box had cracked insulation that was entirely missing in some places, so I wasn't about to turn it on before rewiring it. The circuitry is pretty simple with just a switch and a large transformer to step up to the higher voltage needed to run the UV bulb.

I replaced the damaged wiring and finally got to test it out. The transformer had a nice loud hum and the UV bulb was too bright to look at after a few seconds. Since I couldn't really get to the transformer to check it out in depth, I shut the lamp off and got to work replacing the bulb socket and removing the transformer from the circuit.


Unfortunately, everywhere I could think of that would sell reproduction bulbs in Seattle seemed to be out of stock. I didn't want to pay for shipping since the bulbs are expensive enough to begin with. Finally, this weekend I managed to get my hands on the last FerroWatt squirrel-cage bulb in stock at Rejuvenation (which has a beautiful storefront south of downtown). We brought it home and plugged it in. It was a bit bright (they only had the 60W model), so we plugged the lamp into a dimmer switch to bring it down a bit. The result was exactly what we had in mind from the start.

I haven't been able to find much information online about the lamp. A search on the model number yielded a Danish collector with a somewhat disturbingly large collection of vintage IR and UV lamps, including an identical model. The original bulb is a 100W General Electric Mazda S-4, which according to a spec sheet at Lamptech, was (first?) manufactured in late 1940. The only similar style lamp I've come across is a Hanovia Alpine Travel Sun Lamp for sale on Amazon. The seller lists it as 1940s. The two have identical on/off switches, so the Graham-Walker is probably from the 1940s as well.

I have some more pictures up in a photo gallery.

2010.05.25 07:11:24 p.m.
Removing applications from Ubuntu's Messaging Menu Tags: ubuntu

If you use Ubuntu and don't use the default mail program, Evolution, you can remove it from the Messaging Menu by running the following command:

$ cp /usr/share/indicators/messages/applications/evolution \

You can also add custom applications by creating a file in ~/.config/indicators/messages/applications that contains the full path the the .desktop file to load.

Also, if you use Thunderbird, and want some rudimentary support for the messaging indicators, I put up some code at github for an extension. Just run ./build.sh and install the .xpi file from Thunderbird's Add-ons dialog.

The extension is based an an earlier one available on lunchpad.