Android: First Encounter (AT&T/Cingular)
by HidekiAI on Jul.25, 2009, under Technology Opinions
I’m not too much of a cell-phone user these days, during the analog phone days, just like when e-mail became very popular back in mid-90′s, I was addicted to it.
Last time I bought my cell-phone, I specifically inquired to see if I can purchase an unit which had no CCD/camera because I did not see any use for it (I did find a use for it, although I ride motorcycle now, I used to drive and whenever I got cut-off or reckless drivers pissed me off, I took their license plate with the camera; One of these days, I am going to create a web-site called assholedrivers.comwhere I’d post their plates and until they make a public apologies to all drivers, it will stay up). I wanted a Sony/Ericsson phone because it had the capabilities to download Java. But that didn’t go so well when I discovered that I was getting charged so much for data-usage from AT&T.
A colleague of mine (http://www.sjbaker.org/wiki – this person is a guru of graphics and everything else, he is incredibly wealthy with so much knowledge, to me it is always a treat to talk to him – not only is he the original author of TuxKart and plib, but you must check out his Simple 3D Scanner link on his page!) gave me this link http://developer.android.com/guide/developing/device.html#dev-phone-1after few discussions about games on phones (including recent discussions we had on OpenGL ES 2.0 – by the way, currently Android is OpenGL ES 1.x).
After doing some researches, I finally purchased it for these reasons:
- I loved the fact that it was Linux 2.6 at the heart of it
- The SDK and NDK by Google proved to me that this is serious (NDK is the native developer’s kit which lets you access the OpenGL ES and other low-level directly)
- It has built-in WiFi, so I won’t get charged by AT&T on DATA
- It’s unlocked
- This Stanford Video: http://www.youtube.com/watch?v=WUrMI9ZGxQ8
- This “it makes it look easier than it is” video: http://www.youtube.com/watch?v=I6ObTqIiYfE
So once you have purchased the ADP1 (Android Developers’ Phone 1) from http://developer.android.com, it’ll take approximately 3 business day to arrive via UPS Ground (by the way, their invoice will say FedEx so if you are checking the status based on the tracking number they give you, make sure to go to UPS even though they say FedEx), in the meanwhile, while you are waiting anxiously, download the SDK and work on all the examples they provide.
Preparation before ADP1 arrives
If you are like myself who is using this phone not just for developing but also as a “phone”, other than preparing for developing by working the examples using the simulator, you will want to do the following to make your life easier:
- If you do not yet have a GMail account, create one now. When Android arrives, first thing it will do after you insert your existing SIM chip and turn it on is have you log in. It will be quicker if you already have the account so you won’t have to create one while starting up.
- Once you have that GMail account, go to Contacts settings and start adding all your contacts that is in your current cell-phone. If you work on the SDK examples and watch a lot of Android developers’ videos, you will start to clearly understand that Android applications are about mash-ups. And that contact list can play major role in few applications including dialing and messaging.
- If you have the capabilities to save your current phone data for FDN in your SIM, you might want to update/backup as well.
- Optionally, call AT&T or login to att.com and upgrade your current account to have unlimited DATA for your account. I’ll talk a bit more later, but I don’t have (or want) DATA on my account, and you can get away with it for a small price. But you will need a WiFi.
I think the most important one is to add all your contacts in for phone number(s) (for dialing), and optionally e-mail addresses (for mailing) and physical addresses (for GPS and Google Map).
Also, as mentioned in regards to AT&T DATA access, you can only get away with it if you are anticipating to use your Android Dev Phone via WiFi. Meaning whether you are at work or home, there should be a WiFi access points for your Android to connect to. If you don’t have a WiFi AP or router at home, go buy it now before your Android arrives (it’s way cheaper than paying AT&T extra $20.00/month for DATA access if you don’t use your Android for such things as GPS, etc).
The Arrival
Once it arrives and you’ve prepared your GMail account and contacts, and you’ve patiently waited (at least) 3 hours for your battery to charge before using it (yes, that 3 hours felt like eternity, but you can use that 3 hours to update Contacts in your GMail if you have not yet done so - notice how many time I emphasize this), you’re ready to turn on your ADP1.
When I first turned it on, it immediately asked for my PIN1 (from my SIM) because I have my phone set to ask me for my PIN1 every time I turned it on. It then went through the process to have me either create or login to “Google Account” (which is your GMail account), but because I don’t have DATA access setup (the APN for AT&T), it did not let me continue (how naive of me to think it would just get me to the desktop without DATA access).
I was a bit stuck for few minutes because it felt like a paradox. My thumb accidentally pressed the MENU button and the Setup menu appeared! How lucky of me (yes, if I read the manual, I would have probably figured it out – but with a new geek toy, you’d be in the same shoe as I am!).
So hit the MENU button and temporarilysetup the APN with AT&T/Cingular:
From http://www.androidonhtc.com/carrier_network_settings
Name: AT&T
APN: wap.cingular
Proxy: leave blank
Port: leave blank
Username:WAP@CINGULARGPRS.COM
Password:CINGULAR1
Server: leave blank
MMSC: http://mmsc.cingular.com
MMS Proxy: wireless.cingular.com
MMS Port: 80
MCC:310
MNC:410 (note. this could also be 310, 41 or 15)
APN Type: leave blank
Warning: If you are like myself, who do not have DATA account, you will get charged for the DATA usage, so only use it to get your Android booting to the desktop!
Once you get to the Android desktop, you can go back to your APN settings and either delete the AT&T/Cingular APN or do like I did, I just changed the “wap.cingular” to something like “wap.cingularXXX” so that it will never find it (just in case if I ever need to access DATA through APN in an emergency).
Now setup your WiFi (if you don’t have WiFi, you’re screwed, you’ll have to use DATA). If you have your WiFi router setup with MAC access (same goes with your router for your LAN-to-WAN) you can go to the setup and find the MAC address for your ADP1.
Once you get your WiFi set up, you should now be able to browse and even be able to use your GPS to query your locations, and will even be able to start grabbing all the wonderful applications (my current favorite is the Tricoder which is actually useful!).
Developing
I’ve tried developing on my laptop which is Vista, and have found it quite slow with the SDK Android Emulator. In fact, often I would have to start the emulator, shut it down, and relaunch it via Eclipse or command line (adp). I’ve not tried the usb_driver that comes with the SDK on my Vista, but I’m convinced it’s a flip of a coin since others on the Internet has reported difficulties. I’ll stick with Linux, thank you…
Unlike Vista, the emulator on my Gentoo was and is reliable and fast. Only difficulties I had was that when I emerge‘d the latest eclipse-sdk package, it would not let me install plug-ins (something about it was not built to allow plug-ins installation), so I had to download the current binary directly from eclipse.org and ran it from my local home directory. I was able to install the plug-ins, etc and off I went.
When you setup your ADP1 to be your target device instead of the emulator, for Gentoo use the same settings as Ubuntu “Drapper” version indicated on Android developers’ web-site under Device page:
SUBSYSTEM==”usb_device”, SYSFS{idVendor}==”0bb4″, MODE=”0666″
If you have installed SANE on Gentoo, you’ll find that this is the similar format (“usb_device“) as SANE. So basically, if in the future, if it stops auto-detecting your USB when you plug-in your ADP1, check to see what the smart people of SANE did on the latest/current version of Gentoo kernel, and change your rules accordingly. By the way, they (http://developer.android.com/guide/developing/device.html#setting-up) have a typo where they tell you to call the rules file as “51-android.rules”, and then it tells you to chmod the “50-android.rules”. But I think most (if not, all) of us instinctively already have set the access to the rules after creating it anyways…
To test if your ADP1 is connected to your Gentoo (or whatever *nix flavor), after you connect it via USB, you should be able to look around by calling “adb shell” or quickly verify the device by ”adb devices” (as a root).
In order to connect to the device the first time, you’ll need to do it as a root. If you tried to do “adb start-server” from none-root account, even though the adb has started, it won’t connect to the device. So if you have an adb running as none-root account (i.e. do “ps aux | grep adb“) then kill that server, restart the server as root, and then you should be able to use it from normal user account.
Other methods to verify that ADP1 is connected are:
- lsusb – should show up as “ID 0bb4:0c02 High Tech Computer Corp.” (in most of the time, you need root to lsusb).
- /proc/bus/usb/devices – you should see “Vendor=0bb4 ProdID=0c02 Rev= xxx” somewhere in this file
- usbview- a GUI to list the currently connected devices, somewhere in the tree-view, you should see “Android Phone” (this is similar to viewing /proc/bus/usb/devices in GUI view but with more info).
Last but not least, if all went well, when you try to launch your applications from Eclipse, you should now see an option “Choose a running Android Device” (the emulator would be “Choose a new Android VirtualDevice”) and you’ll see the serial number found in your /proc/bus/usb/devices (or “adb -d get-serialno” or “adb devices”) to launch your app…
So you wrote your App in SDK 1.5
So this is where I stand… The phone came with SDK 1.0. As mentioned above, when I try to launch my test-applications, I now see an “Android Device” to test against. But… But the “Target” is v1.0. When I try to launch it, I would get:
[2009-07-25 12:51:32 - MyAndroidApp] ERROR: Application requires API version 3. Device API version is 1 (Android 1.0).
[2009-07-25 12:51:32 - MyAndroidApp Launch canceled!
Bummer...
I don't want to get into details right now, but you can find 1.5 at HTC and flash it at your own risk! But you'll most likely want to read the upgrade instruction on the HTC website few times to make sure you know what you are doing the first time.
I've chosen to take the path of "Recovery Image" because they said it was easier. At this time, I don't want to complicate things. The upgrade was quite trivial, but there are few notes I have:
- When the "!" icon comes up, their instruction was a bit deceptive because they said a "console" will appear and you shoudl turn on the logging. The console never appears, making me think that it had either crashed, hung, or was waiting for password (i.e. I even tried turning off my SIM PIN). You just enter the Alt-l Alt-s and that was that...
- The icons that follows to indicate that it has completed and ready to be rebooted was kind of a confusing graphics as well.
- Once rebooted (both radio and image was updated), my SD card would not be recognized. The new settings even has an option to format SD, so I tried it. In the end, I had to "Reset" to factory settings and it finally recognized it. Just in case, I formatted the SD.
- All my applications I've downloaded from Market was gone, but they were clever enough to remember what I've downloaded last time, so it was very easy to find the apps again. There's even an ssh terminal now, and it's quite easy to use compared to the Telnet!
- Unlike v1.0, this latest version (currently v1.5) allows you to skip the GMail account registration, so you don't even have to enter the APN anymore! You can go setup your WiFi directly, then reconnect to GMail. Nice! (although I wished they can save all the settings into SD so that we don't have to re-enter the WPA/WAP over and over again each time we flash).
- New option includes a setting to detect when the screen gets re-oriented into horizontal and vertical mode.
- It still cannot read my SIM saved FDN's (from my other phone), that's OK because all the important contacts (my family) are on GMail Contacts anyway.
- There are more apps for 1.5 than 1.0, including ssh and BofA Online Banking.
- Last but not least, there is now a check for update option in the setup.
Initial Impressions (Opiniated mixed list of pros & cons)
- One of my colleague mentioned that the visual password entry is neat idea, but if you are looking over somebody's shoulder for PIN entry, this is much easier to memorize (as a pattern) as compared to watching somebody punch in the PIN numbers. It's really neat at first to show off your Android, but I agree that it's less secure.
- Currently, the password entry defaults to flashing the character before it star's out (you can change this to not show in setup). The justification (most likely) is that since these devices are so tiny and you'll have to hunt-and-peck the password anyways, and if somebody was watching the tiny-little-screen with you, all s/he has too do is watch the keyboard that you'd be pecking anyways, so the password entry is sort of moot. Or if you don't have a keyboard, the keyboard emulator must be used, in which case it's much easier to watch password entry. Perhaps somebody can write a password entry based on:
- Voice-recognition (like in Star Trek when they verbally speak out the authorization code - this to me is like saying "hey everybody, my password is..." but I am assuming it is also based on voice recognition)
- Visual recognition - Somebody wrote a screen-saver unlocker using OpenCV on CodeProject.com, I thought it was pretty neat.
- Thumb print - you can take a picture of your thumb each time to unlock. The problem with this how hard it would be to take a picture of your thumb! Same with retinal...
- I left my ADP1 in my pocket while sitting in an area where WiFi connection was very bad. It kept of connecting and reconnecting, in to a point where it was eating up so much juice, that it (the battery) became hot! What a great way to inform me that I'm in an area where WiFi is poor...
- It's nice that you can use Telnet (and even ssh client) on this device, but typing is a bitch! I gave up! I'll stick with applications that I can touch-and-point. I want to avoid apps that makes you use the keyboard as much as possible. I don't understand how people can drive and message with these tiny keys, as a motorcyclist who's almost been hit many times by cell-phone maniacs, I want them arrested...
- I love the idea of being able to publish based on library versus application. One of my favorite library which I believe would be used by many applications in the future to come is the bar-code scanner. Imagine being able to write an application such as building a shopping list by scanning the item, in which it will automatically add to your list. Then when you get to the grocer, you scan it again to mark off the list.
- The integration of GPS and Google-map is a very cool usage of Android! The developer(s) who is writing that paint-ball type (instead you take a snapshot picture of your opponent) is a very innovative and imaginative usage of Android!
- I am quite impressed with the SDK API, you can tell that because they (the smart people who are working on the SDK) are a user as well as developer of the SDK, so a lot of thought has been put in. The pattern of usage makes a lot of sense (at least to me) when you think about how data needs to be passed around from applications to application (i.e. your app queries bar-code scanner, in which it queries Google shopping, etc).
- I know I must have miss-entered my PIN2 more than 10 times before I finally gave up and called AT&T to give me my PUK2 (by the way, you can find PUK1 on AT&T web site if you click on device while logged into your account), yet it didn't lock up my SIM chip. Does this mean that when they said that it's completely unlocked for developers, it won't hard-lock up my SIM? I'm not going to take the risk to find out but I should be verycareful not to loose my phone, because that would mean the theif would never be locked while trying to brute-force my SIM PIN numbers...
Thanks for reading && peace!
P/S: If you're reading this while waiting for your ADP1 to arrive, did I mention that you should be updating your Contacts database on GMail? *grin*
[Edit] Here are things I’ve discovered with v1.5 since the time I’ve written this BLog:
- It can read my SIMs (saved phone number) – I had to go to the Dialer and select the Menu, there you will find importing features. My Sony/Ericsson saves the Mobile and Home numbers as separate elements, but at least it beats re-entering for some if they have long list of numbers.
- I love the fact that it has speach recognition for Google Search so that I don’t have to type it out. It is very nice feature!
LinkedIn profile
Recent Comments