0

OTA from Adafruit.io
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

OTA from Adafruit.io

by tpitman on Tue Nov 27, 2018 6:57 pm

I was wondering if there was a solution for doing over the air updates from adafruit.io.

I am making a device that will go to customers who will not have the Arduino IDE on their PC or the expertiese to use it. I would like to be able to ship my device so that it can be updated in the customer's home without anything special on their part.

The customer will be required to enter credentials for a wifi hotspot. They would then go into an "OTA" mode for the device at which point I would like the device to "call home" to the adafruit.io servers to get the update.

If adafruit.io doesn't have anything like this built in then my second option would be that I would have to set up some kind of an update server to do this. In that case is there anything out there already that can provide code or a server set to do this?

tpitman
 
Posts: 67
Joined: Mon Sep 21, 2015 3:42 pm

Re: OTA from Adafruit.io

by brubell on Wed Nov 28, 2018 11:03 am

I was wondering if there was a solution for doing over the air updates from adafruit.io.


Part of Adafruit IO's TOC/TOS is a right to privacy. We will not be adding any ability for us to update your board over-the-air.

However...
The customer will be required to enter credentials for a wifi hotspot. They would then go into an "OTA" mode for the device at which point I would like the device to "call home" to the adafruit.io servers to get the update.


There is a feature in the pipeline for something similar to how an Amazon Echo pairs with a network. It will be limited to transferring and saving WiFi and AIO credentials, though, not the device's software or updating the device.

If adafruit.io doesn't have anything like this built in then my second option would be that I would have to set up some kind of an update server to do this. In that case is there anything out there already that can provide code or a server set to do this?

Possibly deploying Raspberry Pi W's (they work with Adafruit-IO-Python) is a solution. It'd avoid the Arduino IDE entirely and can be SSH'd into.

brubell
 
Posts: 189
Joined: Fri Jul 17, 2015 10:33 pm

Re: OTA from Adafruit.io

by tpitman on Wed Nov 28, 2018 11:10 am

Thank you for the answers.

In response, we thought about using the PiZero, but it just doesn't boot fast enough for our needs.

If you have any suggestions on how we can use the OTA with our own server or another service that is out there I would appreciate it. So far it looks like OTA goes into a waiting mode and expects the PC to initiate actual updates and that doesn't seem like it will work well from a server.

tpitman
 
Posts: 67
Joined: Mon Sep 21, 2015 3:42 pm

Re: OTA from Adafruit.io

by brubell on Wed Nov 28, 2018 11:17 am

tpitman wrote:Thank you for the answers.

In response, we thought about using the PiZero, but it just doesn't boot fast enough for our needs.

If you have any suggestions on how we can use the OTA with our own server or another service that is out there I would appreciate it. So far it looks like OTA goes into a waiting mode and expects the PC to initiate actual updates and that doesn't seem like it will work well from a server.


Pi Zero would boot quickly enough (unless you're deploying something time criticial). There's a fully headless script that released yesterday, might address the need - http://peter.lorenzen.us/linux/headless ... figuration.

There does exist an unofficial CircuitPython version of Adafruit IO MQTT for the ESP8266. There'll be an official one down the line, as CircuitPython evolves. This'll most likely be the simplest way to enter credentials (since the board acts as a USB drive).

On the Arduino side, nothing yet, but check out WiFiManager (https://github.com/tzapu/WiFiManager). It may be a good starting point.

brubell
 
Posts: 189
Joined: Fri Jul 17, 2015 10:33 pm

Re: OTA from Adafruit.io

by tpitman on Wed Nov 28, 2018 11:31 am

We need a full GUI, so headless doesn't work, but thank you for the ideas....

Maybe I was not clear on the main purpose of my post. I am not really concerned about entering credentials for wifi. I will have the user enter them.

My main question and requirement was OTA. I need to be able to update the firmware on my huzzah32 while it is in the field. There has to be some solution to this somewhere. Does anyone know where I might find something so I don't have to write it myself?

tpitman
 
Posts: 67
Joined: Mon Sep 21, 2015 3:42 pm

Re: OTA from Adafruit.io

by brubell on Wed Nov 28, 2018 5:21 pm

tpitman wrote:We need a full GUI, so headless doesn't work, but thank you for the ideas....

Maybe I was not clear on the main purpose of my post. I am not really concerned about entering credentials for wifi. I will have the user enter them.

My main question and requirement was OTA. I need to be able to update the firmware on my huzzah32 while it is in the field. There has to be some solution to this somewhere. Does anyone know where I might find something so I don't have to write it myself?


If you are using an ESP32, you can do OTA updates (built into the ESP): https://docs.espressif.com/projects/esp ... m/ota.html

brubell
 
Posts: 189
Joined: Fri Jul 17, 2015 10:33 pm

Re: OTA from Adafruit.io

by tpitman on Wed Nov 28, 2018 5:33 pm

This is very helpful.

I am sure I could probably parse these documents and examples and figure out how to configure a server on AWS or Azure or something, but does anyone know of a service that already exists that makes all that easy that is already set up?

tpitman
 
Posts: 67
Joined: Mon Sep 21, 2015 3:42 pm

Re: OTA from Adafruit.io

by abachman on Thu Nov 29, 2018 11:59 am

Hi tpitman,


Particle.io might be a much better fit, especially if you're intending to deploy hardware to customers: https://docs.particle.io/tutorials/device-os/device-os/.

Adafruit IO is aimed more at prototyping and ease of custom development rather than white label hardware deployment, Particle will probably be more expensive at the low end but has OTA support and more developed device management features.

You could also check out something like Mongoose OS (GitHub link) which has ESP32/8266 support and OTA features while also supporting Adafruit IO as a data backend. It's not clear that you can run your own OTA servers without also paying for their Enterprise licenses per-device, though.


- adam b.

abachman
 
Posts: 242
Joined: Mon Feb 01, 2010 12:48 pm

Re: OTA from Adafruit.io

by tpitman on Fri Nov 30, 2018 11:25 am

Thank you for this information. I have reached out to particle.io and am hopeful they can help.

tpitman
 
Posts: 67
Joined: Mon Sep 21, 2015 3:42 pm

Please be positive and constructive with your questions and comments.