Http request minimal package

Hi everyone!

I'm a newbie in arduino. I want to make a bootloader which gets data (the application code) from a webserver, but I have some problems: The webclient example in the IDE is too big, it works okay but its size is 14 k and the max nrww size in atmega328 (uno) is 4 K.

So my question is that, is there a way how I can make an internet connection/data transmission, which is less than 4 Kb? I think it can be possible in c, but I don't know so much about http request, udp/tcp stuffs.

I'm using an arduino uno board, programming with another arduino board(arduino as ISP) and I have an ethernet shield.

If anyone know something about this please help me!

Thanks!

So my question is that, is there a way how I can make an internet connection/data transmission, which is less than 4 Kb? I think it can be possible in c, but I don't know so much about http request, udp/tcp stuffs.

So, referencing the above bold section, you want to know if someone else has done this so you can use it?

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=39126&start=0

Network-enabled embedded systems usually do firmware updates with http://en.wikipedia.org/wiki/Tftp

If you don't like TFTP, you might be able to embed firmware in HTTP packets. In the bootloader, don't use the standard HTTP packet decoding library, instead just loop and just ignore all incoming Ethernet bytes until you see a magic start byte sequence and then start flashing incoming data to progmem. You'll also need some magic "pause" bytes and then watch for some magic "unpause" bytes, as it will require multiple packets to receive all the code. Finally, stop and reset when you get a magic stop byte sequence.

Be aware that this is a lovely attack vector for hackers, so use some method for validating your firmware is from a trusted source (you) and not somewhere else.