Friday, March 29, 2013

Be Careful with 'Assisted GPS'

Many cellular modules have GPS capability, and support up to 3 modes:
  1. Standalone (no network assistance): the hardware tries its best with GPS satellite signals captured through the cellular antenna path. Depending on your antenna, the signal could be difficult to obtain and hold, but it won't add anything to your cellular data costs.  A fix might take as long as 12 minutes after power up or gaining clear sky view.
  2. Mobile-based (network assisted) or MSB: again, the local hardware is calculating the position, but obtains various data files by billable network traffic. In MSB, the hardware must detect viable satellite packets and the network help is primary to speed up the initial fix, plus help when fewer satellites are visible to the device.
  3. Mobile-assisted (network calculated) or MSA: is like MSB, but will likely have more billable network traffic. In this case, the mobile device literally forwards corrupt GPS satellite packets and other information to a network-based server, which (over-simplified) can use pattern-matching with good packets supplied by other GSP-MSA devices in your neighborhood. The network server literally offers error-correction with the very worst of satellite conditions.
The problem is that the billable network traffic amount is pretty weakly defined. Some of the network traffic is free, while other traffic is billable.

Now an example: I had a Digi ConnectPort X4 IA with a Gobi3000 cell module. An early firmware incorrectly allowed the cell module to default to GPS active in MSB mode, which wasn't a huge problem with I had the Gobi module configured for GSM/AT&T, as I had a good cell signal in my odd inner-corner office. I have been told the Gobi 3000 'ephemeris' data file & related data is about 40K, and is loaded after a cell module restart, and then refreshed once a day (I was told by word of mouth only!) 

However, after 6 months of happy GSM operation, I reconfigured that unit for CDMA/Verizon to test some CDMA issues, and at my desk the CDMA signal is a much worse than GSM. A few days later I started getting 'usage alerts' from my carrier warning that my daily limit of 100K was being breached. Some investigation lead me to discover that my 10MB per MONTH cell data plan was now seeing nearly 8MB per DAY!

Fortunately, I asked a fellow engineer about this, and he'd seen the problem at a large customer site.  Apparently, the AGPS subsystem in my unit was failing to fetch the ephemeris data file from Qualcomm's web site, and retrying quite aggressively.  This retry was creating the 8MB of unwanted data every day for enough days that I began seeing the alerts!

Solution? Well, technically I didn't even need GPS, plus even if I did, since the unit runs 24/7, the faster initial fix wasn't of much value. My solution was to set GPS to standalone mode. In the end, the overage cost me about $34. Without the alert, I would not have detected the overage until my bill arrived, and then likely would have seen (at my $2/MB overage charge) about $500. Image if I had 100 units doing this for the same month!

Moral of the story: Be very deliberate about GPS use within a cell module; make sure the mode selected is correct, or even turn it off if you have no need for it.  Of course, also make sure your usage alerts are enabled at your carrier!