Firmware Update

31 Jan 2011

Hi all,

I'm connecting the Mbed to a server where there's a new *.bin file to transfer for Firmware Update via GPRS (cellphone). The *.bin file was compiled using the online compiler and saved in the server. Unfortunally the transfer isn't working properly (only 10700 of 10828 bytes are transfered), but that isn't my only problem right now. My problem is when i copy the bytes of the original file (opened using notepad) and paste it into another notepad file (saving as *.bin), and put it in the Mbed, it doesn't work. If i put the original file, it works. The contend of the files are exactly the same.

For example: I opened the original file that the compiler gives me (*.bin) using the notepad and get the following results (just an example):

^@^@%$&*^@^@[zzxxyy]^@^@^@^@&*(12345)

If I copy those bytes to a new notepad file and save it as "example.bin" and try to run it. It doesn't work, but the original file works.

Any help why this happens? I'm afraid of this, because later on, when I really can tranfer the file properly from the server, the copied file doesn't run.

Best Regards,

31 Jan 2011

The bin file does not contain ASCCII characters. The notepad try to display it anyway. For transfering bin files ... you have to open the file as binary (not text) and read /write in. Another way that is used in serial comm is to convert bin file in hex file and then tramsnit it like any text file .. and at destination convert it back to bin. (This is the reason for using HEX files.)

02 Feb 2011

I don't quite follow the whole procedure from online bin file to mbed (what does the phone have to do with it?) but Titi is right, saving the file in notepad will corrupt the copy. If you're on windows then you should be able to use copy in the command prompt, or just windows explorer to copy the file?