9

I have prototype of the resource constrained-device (8-bit MCU with no-OS firmware), interacting with a web server. I wonder are there any solutions, frameworks or cloud services for updating my device firmware from the web. From my research there is Microsoft IoT Hub, but I am afraid it does not suits for such resource-constrained devices. There is one more solution, I found - mbed Cloud portal, but I am not sure how it works. Can anyone help me via any advice, maybe there are some best practices for implementing firmware upgrade over the air for embedded devices in secure and robust way?

  • There are no such services atleast as of now. Implementing one in general is very tedious, service targeting specific device type can implemented. – bravokeyl Apr 3 '17 at 16:39
  • There is mender.io, which is aproximately what you want. But I believe, it is target towards "high end" embedded devices and for 8-bit nodes. – mat Apr 4 '17 at 8:05
4

I'll be answering only this part, as I know of no 'out of the box' system for an unknown firwmare.

maybe there are some best practices for implementing firmware upgrade over the air for embedded devices in secure and robust way?

In term of practice, what I would do is as follow:

1) Have a very minimal boot loader, something as dumb as possible only responsible to load the firmware with the following constraints:

  • Ability to record last boot success/failure (to rollback to a working version in case of failure)
  • Some kind of emergency process to accept a new firmware in case of catastrophic failure (optional, could be avoided if a "bricked" device is allowable)

2) Set your storage to have two "boot banks" of reasonable size to handle future evolution and firmware growth.

3) Checksum the firmware image after download to ensure it is correct before burning, checksum the bank of destination after burning to again ensure it won't fail booting for a missing bit somewhere.

The overlooked point is usually the checksum of the downloaded image before and after burning, resulting in corrupted system written on the device. Using two banks and alternating usually ease the update process.

5

mbed cloud does offer full firmware update functionality, but I think you'd have trouble porting it to your platform if you're running without an OS. I don't think the source is open today, so you can't even use it for reference. I'm also not sure what the criteria are for getting access right now.

You need to think about the features you need - is this a large scale deployment where you need to be able to do staged firmware roll-outs, do you care about signing the firmware, or is your platform completely open to anyone with physical access? How much do you care about being able to recover a bricked device without JTAG?

Realistically, features like OTA updates are probably something that drive your OS and device selection - once you factor in development costs.

5

Check out OTA which is abbreviation of Over The Air. Arduino has that property.

You can make update with Arduino IDE, Web Browser or HTTP Server.

Arduino IDE option is intended primarily for software development phase. The two other options would be more useful after deployment, to provide module with application updates manually with a web browser or automatically using a http server.

  • One of the most unpleasant things about that library and Arduino in general is lack of security. This solution is suitable for DIY or school projects, but not for commercial devices. Particular thing I dont like is absence of any authentication: it is unprotected from replacing firmware with malicious one, having correct MD5 digest. – Vadimchik Apr 7 '17 at 9:06
4

You might take a look at Particle (IoT). I'm not sure they support Arduino, but they do offer some cheap embedded boards themselves.

3

One more interesting platform, I discovered is DeviceDrive. Here is the video explaining how things work. Their OTA system seems to be pretty flexible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.