ESP8266 or Arduino OTA to Arduino?

Started by brolly759, December 14, 2016, 01:33:56 AM

brolly759

Is it possible to OTA a moteino with an ESP8266 or other Arduino variant rather than needing a linux / Windows PC?

Thanks

Felix

Not really.
Right now you need a PC to run the program which takes your serial HEX stream and talks to a programmer, which then relays that HEX stream to the target.
The supported program is a windows program, there was an older python script that did the same but it's not up to date. So even if the python script was updated, you'd need a machine which can run that or the windows program.
Doing all this with an ESP seems not worth it in terms of what you gain.

brolly759

Thanks for the response. If I was creating a hub as a product, the ESP8266 is easier to code (Arduino world), cheap, and easier to create a circuit board compared to a Linux embedded

joelucid

I've been working a lot with the esp8266 as gateway. It's great for that purpose and in my opinion much more reliable than a Pi. I'm using it for OTA also but I use a different scheme than Felix. Someburner has a native esp8266 gateway on GitHub that supports Felix style OTA.

Joe

brolly759

Joe, have you published your code yet on OTA? I was trying to follow the posts you had with ~ 2.5s OTA.

Here is a github of someone doing something similar to you using the xBee modules, OTA not needing an external EEPROM
https://github.com/davidsainty/xbeeboot

joelucid

QuoteJoe, have you published your code yet on OTA? I was trying to follow the posts you had with ~ 2.5s OTA.

I haven't. I sent a beta test version to three people and found the response underwhelming. So my enthusiasm about releasing it kind of waned.

joelucid

QuoteI haven't. I sent a beta test version to three people and found the response underwhelming. So my enthusiasm about releasing it kind of waned.

BTW, there is one more reason I'm on the fence with the bootloader: it works great for normal installations, even supporting multiple bitrates and coin cells.

But I've recently implemented frequency hopping and would like to do TDMA in the future (all my new motes get 32.7k clock crystals). There's no way all that code would fit into a bootloader of 4kb size. There's a solution for that, too: sharing the radio library between bootloader and application and being able to update both independently, which has many advantages of its own. But I just haven't gotten to that part nor do I know if I ever will.

Joe


Felix

Ok ....... so the answer still stands at not really.
Not without extensive extra coding at the very least.

WhiteHare

#8
I'm not sure what the OP meant by "OTA to a moteino," but depending on what he meant, the answer may be "yes":  https://lowpowerlab.com/forum/wireless-programming-(aka-ota)/windows-program-for-wireless-programming/msg12478/#msg12478

And it works quite well. 

If that's what you meant, I've reduced that prototype mess to a very simple PCB shield for a Wemos D1 Mini.  You'd still need to plug a Moteino into it, but it would give you a portable (i.e. totally wireless) gateway through which you could do OTA updates to other moteinos (not plugged into it) using msjfb's windows app.  That was proven out over a year ago.

Felix

In the first post, it's apparent to me the question is about doing Wireless Programming of a target Moteino, using an ESP8266 only, no PC:

Quote from: brolly759 on December 14, 2016, 01:33:56 AM
Is it possible to OTA a moteino with an ESP8266 or other Arduino variant  >>>>> rather than needing a linux / Windows PC? <<<<<<<<

OTA = "Over the air", mostly used in relation to wireless programming. Not really obvious but ... seems to fly just like "IoT".

executivul

Quote from: joelucid on December 16, 2016, 03:07:40 AM
BTW, there is one more reason I'm on the fence with the bootloader: it works great for normal installations, even supporting multiple bitrates and coin cells.

Hi Joe,
It's been almost a year since the last time I've bugged you about the bootloader code and kept hitting refresh daily on this forum waiting for your published bootloader.
I'm running now with some HC-05 BT modules hooked up to be able to program some nodes, unfortunately it messes up my ATSHA204 signing somehow, a RFM69 OTA bootloader without external flash would be priceless.
So could you please share this beta "works great for normal installations" version?
Thank you.

WhiteHare

Quote from: Felix on December 16, 2016, 01:23:26 PM
In the first post, it's apparent to me the question is about doing Wireless Programming of a target Moteino, using an ESP8266 only, no PC:

OTA = "Over the air", mostly used in relation to wireless programming. Not really obvious but ... seems to fly just like "IoT".

One could read that as meaning he doesn't want to have a PC dedicated to being connected to a Moteino.  For instance, maybe he only owns a laptop, and he wants to take that with him out of the house--not have it tethered to a moteino.   It's a slippery slope.  I mean, are we to assume that he doesn't compile his sketches on a PC either?  Because it's that step which generally immediately precedes an  OTA update.

brolly759

Good evening everyone. To clarify, here is my ideal situation:

ESP8266 is the Gateway / Hub and talks over MQTT to a broker somewhere in the Ether. The ESP8266 can OTA, upload sketches to motes using RF69 modules without external EEPROM. Using an ESP8266 or variant would reduce the cost of a Gateway significantly by not needing a Linux/Windows system. 

joelucid

QuoteESP8266 is the Gateway / Hub and talks over MQTT to a broker somewhere in the Ether. The ESP8266 can OTA, upload sketches to motes using RF69 modules without external EEPROM. Using an ESP8266 or variant would reduce the cost of a Gateway significantly by not needing a Linux/Windows system.

Exactly my setup. It's not only the cost that's the issue. Raspberry's are pretty noisy and I got a big boost in radio sensitivity when I switched. Plus Raspberries aren't exactly reliable for some people. I've never had these issues but people I've helped with their projects have had frequent flash drive corruption or reboots for example.

brolly759

Would love to know your setup or how to do it! :)

Something I had an issue with on Raspberry Pi3, I had to dumb down the CPU core clock speed to 250 because the UART is tied to the Core speed, and baud rates will fluctuate, so any xBee modules would read or send garbage data :(