Valid HTML 4.01 Transitional

HTC G1 Cellphone

Jim Carter, 2009-03-30


Performance as a Cellphone

For the G1 the prime networking activity is making voice phone calls. As a voice phone the G1 has performed at a high level: voice quality is good and volume is adequate (and adjustable), both for the G1 user and for the chat partner. I have used it near a moderately busy street, and both I and the partner were able to hear, but I have not (yet) tried using it in a really noisy environment. The radio seems to get the message through even when the signal level is low, and the cell controller handles handing off from UMTS to the 2G GSM net and back again, which is said to be a problem for other phones.

It is interesting to monitor which cell antennae the phone uses. By flipping between Google Maps and the Tricorder, I identified a number of them, and I wrote a simple program to convert their latitude and longitude into how far away they are (range shown in meters). The signal is in whatever arbitrary units the cell coprocessor gives out. These are not the only antennae; I have seen it use one as far away as about 2km, but it jumps around and I was not able to write down the coordinates of every antenna. It's interesting that only antennae in one cell were used. For 3G (UMTS) service it looks like my house has rather low signals, due to unfavorable topography relative to the actually used antennae.

Lat Long Signal Cell ID Range Description
34+0.779 -118-26.159 -- -- 0 Our location by GPS
34+0.805 -118-26.215 25 30691 99 Mountain View north of Lawler (2G)
34+0.093 -118-26.310 10 13268535 1294(?) Mountain View north of Indianapolis (3G)
34+1.142 -118-26.405 6 13268535 772 Inglewood x Dewey (3G)
34+1.451 -118-25.824 6 13268535 1349 Purdue x Rose (3G)
34+1.189 -118-25.382 6 13268535 1416 Sepulveda x Clover (3G)

Data Networking in General

The phone will always try to get the best data connection available, depending on what it can find and what the user is currently permitting. Best is in this order: WiFi, UMTS (cellular 3G), EDGE (cellular 2G), or GPRS. WiFi eats battery, particularly if it can't find an access point and has to scan repeatedly. Standby time with WiFi turned on is at most 100 hours, if that, so you may want to disable it if you know you won't be using WiFi, like when travelling. While cellular data requires little battery power if not being used, data roaming charges are ridiculously high, and even if you put synchronization and e-mail checking on manual you might miss something and incur charges. As far as I can see there is no way to explicitly disable cellular data but leave WiFi on; but you can forbid data roaming specifically (in Settings - Wireless - Mobile Networks). It is said that UMTS (cellular 3G) uses about twice as much power as EDGE (cellular 2G), so when battery energy is critical it may make sense to tell the phone (in Settings - Wireless - Mobile Networks) to use only 2G networks.

Airplane mode, in Settings - Wireless Controls, disables cellular voice and data, WiFi and Bluetooth. One nasty feature is, when you come out of airplane mode you need to re-enable WiFi and Bluetooth individually; it doesn't remember how they were before.

Wireless Network

When the wireless network is disabled, the WiFi device tiwlan0 does not exist (driver unloaded?) and the default route goes through the cellular net, rmnet0. When enabled, the default route goes through tiwlan0.

Speed Tests

These tests were done by downloading 4.1Mb of compressed data (a music track as Ogg); WiFi is from the home server's wired Ethernet interface (100baseT from the access point) while cellular data is from my work account (100baseT Ethernet). If I sent data to the cellular interface from the home server it would be limited by the speed of DSL to 16Kb/sec. Each measurement is repeated three times and the reported value is the median ± half the range, in bytes per second. Except, the cellular net was tested only once per condition. Signal levels are as reported by the Tricorder application; the units here are not well documented and should be used only to distinguish strong from weak signals. For comparison I also tested my laptop, a Dell Inspiron 6400 with an Intel PRO/Wireless 3945ABG Golan NIC.

Host Network Signal Speed
Laptop 802.11g 27 (2.61±0.16)e6
Laptop 802.11g SSL 27 (2.67±0.10)e6
G1 802.11g 27 (0.86±0.13)e6
G1 802.11g (#2) 31 (1.07±0.01)e6
G1 802.11g SSL 27 (5.6±0.2)e5
G1 802.11g SSL (#2) 31 (2.68±0.07)e5
G1 3G 6 1.66e4
G1 2G 25 1.53e4
G1 2G (#2) 25 7.15e3

The kernel in Android has a feature, patched in and controlled by kernel configuration parameter ANDROID_PARANOID_NETWORK, such that the network cannot be used unless the running program was executed by a member of group 3003 or 3004; Bluetooth is similar except for group 3002. Root is not automatically allowed on. A normal Linux kernel allows anyone to send or receive on the network, including hackers.

The System Server is execed in group 3003; see ./frameworks/base/core/java/com/android/internal/os/ It is almost certain that no programs in the regular distro are setGID 3003 or 3004.


The GPS radio and coprocessor seem to capture satellite signals with reasonable sensitivity given less-than-ideal sight lines to the open sky, and position measurements are delivered promptly, provided the user takes into account the design and behavior of the transmitters. However, the user can easily get the impression that the GPS receiver is weak or malfunctioning, if it is not given enough time to download the needed operational data from the satellites.

This article about GPS on Wikipedia provides quite a lot of interesting data that is relevant to issues using GPS on the handheld device. I'll summarize:

The GPS satellites transmit continuously, all on the same frequency. The receiver distinguishes them by orthogonal codes, the same general idea as for the CDMA system for cellphones. As the satellites, the Earth and the receiver are all moving relative to each other, the receiver needs to interpret signals from each satellite according to its own Doppler frequency shift, which may require a process of trial and error unless the frequency can be predicted. The signal has multiple levels of modulation, and a precise time delay measurement can be obtained once every six seconds; all the satellites transmit the same kind of data at the same time (where simultaneity is defined in a non-rotating reference frame co-moving with the Earth's center of mass).

The ephemeris is a set of parameters in a formula by which the satellite's position can be predicted; this information is required to convert the timing differences to the receiver's position. Each satellite transmits its own ephemeris, sending a complete copy spread over 30 seconds. For two to four hours it remains accurate enough; then the latest ephemeris must be captured again. Further, there is an almanac which gives longterm but less accurate position information for all the satellites; it is spread out over 12.5 minutes and I think, but am not sure, that it's OK to start recording the almanac in the middle. I am not sure how long the almanac remains valid. The receiver needs the almanac to promptly lock on to satellites; otherwise a process of trial and error must be used.

The implications for GPS at the receiving end are these:

See also the notes on the apps page about Google Maps and about GPS Status. The Tricorder app also has a GPS readout, and quite a number of apps (available in the Android Market) use your current position for various purposes, some useful.

In this forum thread about slow GPS locking, several users have some suggestions. First, a hard power cycle (remove the battery) makes locking happen promptly for most users. User Extorian (2009-03-30) gives a lot of info about GPS and in particular indicates that the orbital elements of the satellites are being stored somewhere. He says, You will need to use your GPS for at least 15 minutes per week to keep your almanac data up to date.

USB Networking

If you turn power off in the phone, then plug in the USB cable, the red light comes on (charging) but this configuration is inert as far as data transfer goes.

At first I could not mount the phone as a USB mass storage device. With the SD card mounted, I connect the provided USB cable from the G1 to my laptop (Linux kernel, SuSE 11.1, Dell Inspiron 6400). The G1 gives a notification that a USB connection is in progress and puts a USB icon in the status bar. On the laptop, udev creates /dev/sdb (which I verified, using lsusb and udevinfo, is on the G1). file -s /dev/sdb (as root) reports writable, no read permission despite a mode of 660. It is of course not possible to either mount /dev/sdb or investigate it for partitions.

Thanks to chenderson2 for this answer (2008-11-09): The USB symbol in the status bar isn't just decoration; it's a notification. Read it (Menu - Notifications) and click on Mount. Now you can mount, then read/write the USB mass storage on the partner machine.

Transfer speeds on the USB cable, copying onto the G1, writing a few big files: 46Mb transferred in 11.01 secs (counting the sync afterward), 4.2e6 bytes/sec. 33Mb of smaller files (825 of them) in 17.80 sec (1.85e6 byte/sec).

I used Thunar (XFCE file manager) to monitor files being transferred. When finished I changed directory to /media and tried to eject the volume, but it was busy and could not be unmounted. The reason was, Thunar still had inotify watches on that directory and its subdirectories. Once I directed Thunar's attention to a completely different directory, Thunar could eject the volume.


The procedure to pair with a device is:

I had no trouble to get the G1 to pair with these devices:

Once the device is paired, it is not necessarily connected, particularly if it has been powered off in the meantime. Select the device entry and the G1 will (attempt to) connect to it. However, so far I have failed to connect to any of the above devices [in Android v1.0].

In Android v1.0, the only user level protocol support in Android is for HSP/HFP (mono audio at 8kHz with mic and control buttons), and I couldn't get even that to work (i.e. connect with my Motorola HT-820 music/telephony headphone), although other users with normal HSP earphones report that it works nicely. The coming release will supposedly have full support for A2DP/AVRCP (stereo audio at 22kHz), and a future release will add HID (keyboard and mouse), DUN and PAN; basic command-line support for these profiles is promised for the next release but proper Java GUI support will not be ready. There is no discussion of OBEX, either incoming or outgoing.

Starting in v1.5 Cupcake, I can connect to my Motorola HT-820 headphone, and the music player can send audio to it via A2DP/AVRCP (stereo audio at 22kHz).

Revision history: