SystemUpdate via Wi-Fi

Has anyone implemented the SystemUpdate Class using Wi-Fi rather than an SD PersistentStorage? The thought is to download an update from a web service to a smart device, and push the update on the EMX module. Is this even possible to do?

Thanks

I haven’t tried it but there’s no reason it can’t be done. The update is simple enough.

download files from internet(LAN, WiFi, PPP) and save them to SD card and then make update will work. I think also direct stream from socket will work but is more risk, because you can get some errors during downloading files and can happen(EMX have some checksum checking when you update FW) but I still think that device can somehow lock and will need physcal reset or manual flash by USB cable…
I recommend you that you put some small SD card inside, download files, check if files are ok and then put device to bootloader and update FW…

Thank you for your answers. As to using an SD card, that would add additional cost per unit and I cannot have anymore addition cost.

I was wondering if I could just transfer the application HEX file from a web service, copy that to the smart device, and then transfer it to the EMX module, such as an NAND Flash (Persistent Storage). Then use the NAND flash as the source for the application update. Or do I just not understand the Persistent Storage.

I agree that stream from socket is risky, so it would seem to me to place the application file on the EMX module would be the way to go without adding in a USB or SD card reader.

Any ideas would be greatly appreciated.

You could store the data into a RAM buffer (MemoryStream) and after that start the update.

Thanks for the idea! I was am looking for any possiblities that you guys have tried and any pit falls before I really get deep into coding a solution. I figure you guys have the experience to point me in the right direction.

Im not shure if storing files to ram is good idea!!! Because HEX files are very big…
EMX do not have NAND, ChipworkX have NAND. You can use external serial FLASH to store data.
Smart device?

You will work with big “files” on devices which do not have a lot of RAM… For example sizes:
CLR.HEX = 1464KB
CLR2.HEX = 1407KB
Config.HEX = 7KB
bootloader.HEX my bootloader which update FW from SD card is 200KB
app.HEX depend what libraries your application use for example my is 2522KB

You need update CLR.HEX&CLR2.HEX&Config.HEX When GHI release new SDK and you build your application with new SDK.
If I will make direct updating trough wifi I will do it in chunks and after each chunk add CRC and check if it is ok. Open your HEX files with text editor and you will see how they looks…

This would be items like iPhone, iTouch,iPad, Android phones, Windows phones ;D

EMX has 14MB of RAM. You could clear up memory (6-7 MB) when you want to start updating.
You could also send the data compressed in some way, store it in the buffer and while decompressing, direct write to memory. Hex files are ascii so the compression ratio should be pretty good.