Monday, August 30, 2010

Fix for the "Upgrade are failed" error when upgrading Linksys firmware

Almost everyone I know - even those that I don't really know - are shocked when they find out that I don't have an Internet connection at home. The responses span the gamut from, "What kind of techie are you?" to "How do you survive?" Let me tell you this - not only have I survived, but I have thrived. I am no longer an insomniac, I don't wake up more tired than I was when I went to bed, and I don't think I have read as many books in my life as I did these past 17 months. In my eyes, this experiment was a resounding success.

Alas, like all experiments, this one has to come to an end. The process of returning back to being online started with me finding a roommate who is perennially oncall. To facilitate his work, I picked up a Clear Internet connection device from my friend Shari's store in Bellevue at the start of August. Given how much he needs the Internet and that my Wireless router was with Jyot, I let him have the wired connection in his room. I thought I'd hold out for a little longer...

It all ends today. That's right ladies and gents, I am once again among the online netizens of the world. Being offline is dead. Long live being offline! Like everything else this past month, the transition wasn't without its share of trials and tribulations. I plugged my Linksys WRT54G in, reset the settings, and setup my wireless network with the right security settings. At this point, it was brought to my attention that the firmware on my router was a few years old. Old isn't good, right? Like a good techie, I downloaded the latest firmware, and pointed the router to the new firmware file using my trusty Firefox installation. Bad idea!!

Here's why:
1. Firefox is known to cause firmware upgrade issues for Linksys routers. Avoid using it at all costs
2. If you get an error message that says, "Upgrade are failed", searching through the Linksys forums will not provide you with any answers to fix your router. The most dire news you can get is that you have officially bricked your router. Don't believe the hype, or in this case, the bad news. This is just opinion, not fact!

After spending an hour trawling the web for information, I got what I needed at a Linksys "jailbreaking"/modding site. In hindsight, I should've started my search there because these guys surely know what their doing. So, here is the fix:

1. Download the appropriate firmware for your router's version. My router is a Linksys WRT54G V8. The V8 is KEY.
2. Connect your computer via an Ethernet cable to port 1 of your router (the order of the buttons and ports from the Left is: Reset Button, Internet (Connection to your modem), Port 1, Port 2, 3, 4, Power).
3. Manually configure the connected computer's IP settings to be:
  IP Address: 192.168.1.100
  Subnet Mask: 255.255.255.0
  Gateway: 192.168.1.1
  No DHCP configuration
4. Unplug your router's power cord
5. Unplug the cable that connects the router to the modem
6. With a pen, press down on the Reset button. The button is recessed, so please ensure that the button is actually pressed.
7. Plug the router's power cord back in
8. Keep the Reset button pressed for about 25 seconds
9. Open up Safari or Internet Explorer
10. Browse to http://192.168.1.1/

You should be presented with a screen that says "Management Mode Firmware Upgrade". Follow the prompts and upgrade your router's firmware with the downloaded .bin file's contents!

If you need images or have any other questions, follow the more detailed instructions :here:

Monday, August 16, 2010

Working week: Day -1: Flying to my destination

The samba beat ringing true in my ears, I sit in a tiny cafe by the beach. A long walk on the beach with the warm sun baking the sand was exactly the change I needed from a hectic two months of ceaseless and unrelenting pressure at work. Moving to a new team is hard, but none of my moves in the past have been anything like this one.

The flow of events changed when I touched down in Dallas. Nishant is a great host and an able partner in crime, and this meeting didn't disappoint. The craziness started on the ride back to his place, continued at this really cool bar a stone's throw from his apartment, sputtered through the taqueria food we chowed down while inebriated, and ended with a viewing of The Soup. Juggy style driving was on full display, and being back in The Lone Star State reminded why I love it so much. Texans are proud of who they are, comfortable in their skin, and extremely friendly. That part about Southern Hospitality: it's true.

Back to the present. The positive energy emanated by the people of this place is recharging my cells. I had completely stopped writing; the rigors of my routine taking a toll on my ability to look at things as an observer rather than a participant. People are milling about without a care on their minds, going in and out of conversation with complete strangers with ease and abandon. Nothing seems scripted or orchestrated here, and best of all, I am not worried about responding to the next pressing email from someone, anyone!

My tendency to take things as they come has been an aid through my travels this past year. My last trip to the East Coast, my sojourn in India and now this journey; the unexpected is at every corner if you expect just the basics. My aim is to embrace the unexpected, mingle with the local folk wherever I go, and make merry as the sun shines. Who knows when I'll be back to gray skies in Seattle...

Thursday, July 01, 2010

Jailbreak and Unlock your iPhone 3g on Windows

Previous generation iPhones, 3g in particular, are available for cheap these days. If you got your hands on one of these devices and don't want to be tied down to either AT&T or deal with Apple's walled garden, you're going to want to Jailbreak and/or Unlock your newly acquired device. I've tried to distill the information from a plethora of websites so that you can accomplish said goals. Read on...

FWIW, these instructions only allow you to have iPhone OS 3.1.2 on your 3g device. If you want to have 3.1.3, these instructions might work, but caveat emptor.

The Prerequisites
I. Download the necessary files
1. The Apple iPhone Firmware: http://www.iclarified.com/entry/index.php?enid=750
a. For 3.1.2, get this file: http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-7265.20091008.Xsd32/iPhone1,2_3.1.2_7D11_Restore.ipsw

2. Recboot: http://www.sebby.net/443-recboot-final-release/

3. Redsnow 0.9.2: http://wikee.iphwn.org/howto, http://xs1.iphwn.org/rs/redsn0w-win_0.9.2.zip

Download all these files to a location that you can easily access again. I used: c:\temp\iPhoneUnlock\

II. Cellular Network or Wifi Connectivity
Ensure that you have either a SIM card in your phone or have it connected to a WiFi network. I can't stress the importance of having some sort of network connectivity when you are jailbreaking your iPhone.

Now, for the real work; you need to do three things in order to unlock your iPhone 3g:

1. Follow the instructions on how to Downgrade to 3.1.2 from: http://lifehacker.com/5572003/how-to-downgrade-your-iphone-3g%5Bs%5D-from-ios-4-to-ios-313
- Only difference is you need to downgrade to 3.1.2

2. Jailbreak the iphone firmware using redsn0w.
a. Launch the RedSn0w application
b. Point it to the ipsw (Apple Firmware file) for 3.1.2 that you downloaded earlier (c:\temp\iPhoneUnlock\iPhone1,2_3.1.2_7D11_Restore.ipsw)
c. RedSn0w downloads some files and patches the iPhone Kernel. After it is done, it asks you to switch off your iPhone and ensure that it is plugged in to your machine. Do this!
d. Follow the onscreen prompts to put your device into DFU mode
e. Once your device is in DFU mode, redsn0w will do the rest. When the RedSn0w application moves to the next screen, you can stop pushing down the "Home" button.
f. If you get a "Flashing NOR" screen on your iPhone, the correct process has been initiated. Sit back, relax and enjoy your soon-to-be-jailbroken iPhone.

Unlock
a. Launch Cydia
b. Upgrade or update any packages it prompts you to update
c. Install ultrasnow using cydia: http://www.redmondpie.com/unlock-iphone-3.1.3-3g-3gs-with-ultrasn0w/
- You don't need to specify a new repository url. The latest version of Cydia locates ultrasnow 0.93 automatically.

Once ultrasnow is installed, your device will reboot and you will see the Pineapple logo. After your device does start up, it will be carrier unlocked!

Jailbreak and Unlock your iPhone 3.1.3 on a Mac

The instructions are pretty detailed. Unfortunately, the tool is currently Mac-only. I'll put up some detailed instructions on how to do this for Windows shortly.

Tuesday, April 27, 2010

HTTP Headers are a multi-map

RFC 2616:
Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)]. It MUST be possible to combine the multiple header fields into one "field-name: field-value" pair, without changing the semantics of the message, by appending each subsequent field-value to the first, each separated by a comma.
Today, I found and fixed a cool bug in the AmazonCloudFront client for .NET. The original implementation of the client used the System.Net.WebHeaderCollection.Add() method to specify headers for a CloudFront request. An example of one of the request headers is If-Match - this header uniquely identifies a CloudFront distribution, and the value associated with this header is the ETag specified for the request.

Using the Add method is fine if a new request object is created for every CloudFront request; the issue arises when an attempt is made to reuse an existing SetDistributionConfigRequest object to perform another CloudFront request, albeit with new parameters. In the reuse case, the new header values will be appended to the existing headers' values.

Let's take the case of If-Match: when the request was sent over HTTP, CloudFront received a comma-separated value for If-Match containing all the ETags specified during the lifetime of the request object. When CloudFront received this string, it couldn't verify the identity of the distribution, and rejected the request.

The fix: Use the WebHeaderCollection's [] accessor to set a unique value for every request header. Fixing this bug makes it now possible for the same request object to be reused for multiple calls.

Friday, April 02, 2010

Critiquing the iPad, and getting it wrong!

I like Cory Doctorow, especially his unique take on technology and all things geek. In fact, Boing Boing was the first RSS feed I subscribed to, ever! His latest piece on why he dislikes the iPad is a miss though; he doesn't get some basic tenets of why the iPad will succeed.
if you can't open it, you don't own it.
I consider myself to be quite the technophile, but when it comes to unscrewing the back off my laptop and fiddling with its innards, I *seriously* consider my alternatives. Most people that own computers panic when it runs slowly, panic even more when they get a Virus alert, and suffer a melt-down when their computer crashes or their hard drive fails. You think the average computer owner can bring out their screwdriver set and start tinkering with their computer? A laptop or desktop, as open as a hardware platform as can be, is still very intimidating to a regular Joe.

The iPhone was criticized for being a closed hardware and software platform. Did this stop the really inclined tinkerers from peeking inside and figuring out how these devices worked? No! For proof of this phenomenon, you don't have to go farther than Mumbai's grey market. For a very fair price (10 - 20 US$), you can pick from a number of "technicians" who can open your iPhone, replace your battery, tweak the hardware settings on the LCD, jailbreak the device, et al. Mumbai, Delhi, Moscow, Seattle - hardware geeks everywhere know everything they need to repair an iPhone, to hack an iPhone, to replace the software on the iPhone. What's that about not being able to customize the device?
The way you improve your iPad isn't to figure out how it works and making it better. The way you improve the iPad is to buy iApps. Buying an iPad for your kids isn't a means of jump-starting the realization that the world is yours to take apart and reassemble; it's a way of telling your offspring that even changing the batteries is something you have to leave to the professionals.
Isn't that what you do with a car, or a TV, or a DVD player, or a clock radio, or ... Why is this a bad thing? Why is it such a blasphemy that a device is locked down so as to enable scenarios that make it simpler to use and interact with than any other device available? In this age of information overload, the iPad offers me the ability to never have to learn how to make it work other than pressing its power button. Brain cells saved only to be wasted on something else that might help me find a job or improve my life!

What made me write this post though was this paragraph:
But with the iPad, it seems like Apple's model customer is that same stupid stereotype of a technophobic, timid, scatterbrained mother as appears in a billion renditions of "that's too complicated for my mom" (listen to the pundits extol the virtues of the iPad and time how long it takes for them to explain that here, finally, is something that isn't too complicated for their poor old mothers).
My mother isn't stupid, but she does struggle with using a computer. When did our measure of stupidity become proficiency with a computer? My mother could whoop most people's behinds when it comes to most things not related to using her computer; that she can't use her computer is not so much her fault as it is the fault of Microsoft or Apple or the other software makers. But I would buy the iPad for her, like I would buy an iPhone for her. She took to my iPhone and my Macbook Pro like a duck takes to water. In fact, my mom doesn't know how to use Copy/Paste and until a few days ago, didn't even think she needed such functionality!

April 3rd is tomorrow, and let me tell you something - the iPad will sell, and the 2nd version of the device will outsell its predecessor, and so on. When I used to walk around the 1st Gen iPhone, my friends used to mock me. These same friends now connect to the world with said iPhone. We have severe technological amnesia - being critical of something today doesn't preclude owning the thing tomorrow (or a year from now). I hope Cory wakes up and smells the coffee at some point; the rest of us common folk have already seen the light.

Friday, March 26, 2010

Mobile platform multi-tasking revisited

Everyone is clamoring for multi-tasking on their mobile smartphones. android has it, windows mobile has it but the iPhone and the new dangle windows phone 7 don't. This isn't that hard of a ponlem to solve you would think, but it really is. Reason - constrained resources on the phone and no good user interaction model for users to kill rogue applications.

The biggest issue with multi-tasking on phones though is reduced battery life. Right now, my iPhone barely gives me 5 hours of usage; I shudder to think what my battery life will reduce to once multi-tasking becomes du jour. Single-tasking is plain not good enough because switching to another app means all context is lost in the current app. There are times when I am listening to an episode of fresh air in my browser and the phone rings - bam, need to start the episode from scratch! So we are at an impasse, unless...

Yes, there is a third solution; an idea which is more of a hybrid approach - application hibernation. Switching to another app puts the current app into a form of suspended animation, kinda like the pause button for media playback. The application's state is saved to persistent storage and room is made for the new application. It would be trivial to provide a list of "suspended"/paused applications, with a cool ui that allows a user to literally press Play on the application they want to turn "On". It's going to be really interesting to see what strategy the 3 leading mobile platforms will adopt.