Tuesday, October 6, 2009

HTTP Client Concept

Recently, I have been working on a HTTP client. This HTTP client is for connecting to the Internet and retrieve any types of files. I am working on a platform which uses an Atmega128 with 128KByte of Flash. As you can see, this platform has limited resource. For example, if I download a 1 Mbyte picture. It is impossible to store all the data into the flash. Even if I am able to store all the data, there is no LCD monitor to display the picture.

To overcome this limitation, I have thought of outputting all the received data in HEX via SERIAL. Then I use my computer's terminal program to capture all of the HEX received by the COM port. With this method, I can download any files regardless of the file size.

Now the question is I have a bunch of HEX which resemble the actual file, but how do I open this file? Now the HEX editor comes into play. You first use your favorite HEX editor and open a new file. Then Import all the HEX values into the HEX editor. Once this step is done, you should save this file as the file type which you have downloaded (e.g. .jpg, .bmp, .mp3)