Pretty short, like 5 feet away from each other, so by no means do I need something with long range.
there are small boards called wireless serial transparent
transparent means they do all the bitbanging just like a wire.
To upload a sketch into an arduino the bootloader must be started through a reset. This means it is not sufficient to just connect Rx/Tx. There must be minimum a third wire for creating a reset-pulse.
I don't know the details how you do this. If the wireless serial transceiver supports the DTS, CTS, RTS signal-lines it should be doable.
Such a pair of wireless serial transparent tranceivers need only themselve to work.
Maybe there are also ESP8266/ESP32 based solutions where one ESP acts as the router another as the client.
best regards Stefan
Just a quick update for everyone, my current plan is to use the WINC1500 WiFi Shield from Adafruit and the WiFi101 library + @Juraj's ArduinoOTA library to accomplish OTA updates with my Arduino MEGA. I'm just doing a bit of research to see if that WiFi shield will play well with the Elegoo TFT LCD shield I am using, and if it does I'll probably go ahead with this plan as it seems to be the most simple/reliable.
one more thing. the shield gives you full network access in the Mega sketch if you want to enhance your project to IoT. (esp8266 would do it too)
If you want only OTA, but not a networkng library, then for esp8266 there is a specialized firmware only for OTA to ATmega. it is optimized for Uno. for Mega there are some patches.
If you want only OTA, and you upload from Linux, then it is very simple because avrdude on Linux can write to network port and a simple sketch on esp8266 can reset the ATmega and relay avrdude to ATmega bootloader.
Thank you for all of that info!
I upload code to the Arduino from Windows 10, not Linux, so unfortunately your 3rd point doesn't apply to my situation.
OTA sketch uploads are my main priority, but it would be neat if I was also able to enhance my project to IoT with something like Adafruit.IO! I want to find the simplest solution to my problem but one that will still work reliably. If I want to setup both OTA updates AND IoT connectivity, which would be easier to integrate into my project? To me it seems like the Adafruit WiFi shield would be easier to implement than adding an ESP8266 module, and I am okay with spending extra on the shield instead of a cheaper alternative like an ESP8266 module if the shield will be easier to setup and more reliable.
yes it is much easier to use the WiFi101 shield. but esp8266 is much cheaper. people buy it and they are overwhelmed with serial communication, AT firmware, flashing mode activated with pin state, flashing settings etc.
I made a WiFi library to use esp8266 as WiFi 'shield', but it requires to update the AT firmware on esp8266. And that is a problem for many.
Yeah, being overwhelmed with all of the setup and messing around required to get it to work is what I am worried about, so I think I will go with the WiFi101 shield and try that out, I don't mind spending the extra money if it works well.
Thanks again for all your help with this! I am very new to networking, OTA updates, and IoT with Arduino, so I appreciate all the help!
Hello, I have purchased this Adafruit WINC1500 breakout board, which is the same thing as the shield version. I have it all wired up to my Arduino mega and have successfully connected to my home network with it using the WiFi101 library! Very exciting!
However, I am a little unsure of what steps I need to take to get it working with the WiFi101OTA/ArduinoOTA library. @Juraj, is there a list of steps or checklist anywhere that I can see to better understand how to set it up? I've seen things here and there talking about burning a bootloader and loading a new board definition and such, but I don't really understand what order these steps need to be done in. Thank you for your time/help, I really appreciate it!
did you read this?
overview:
- you can use MegaCore or 'my_boards' to burn Optiboot with support for OTA. you must then use MegaCore or my_boards for USB upload too.
- you have to copy the extras/avr/platform.local.txt next to platform.txt in use (Arduino AVR core if you use my_boards or MegaCore if you use MegaCore)
Yes I did, and I have added your my_boards board definitions to the correct folder, and I can see them in the IDE! However Iām not sure what Iām supposed to do next to burn the boot loader. Do I just hook up my mega, select the right board from my_boards, and click the āburn boot loaderā tool, or is there more to it? Iāve seen stuff online about requiring an āISP Programmerā or similar device for burning boot loaders, which I do not have
So I need one of these? If so, is it possible to use a second Arduino as the programmer instead? Thanks!
Thanks for the info, I will read through it!
Okay, I have successfully completed the first step of burning the opiboot bootloader to my Arduino mega! However, I'm not totally sure if I have done the 2nd step correctly, because when I try to test the OTA functionality it doesn't work, no network ports appear in the Arduino IDE! I have copied extras/avr/platform.local.txt to Documents/Arduino/hardware/my_boards/avr, right next to platform.txt, like you said. Is this the correct file location to copy it to? Am I supposed to do something else afterwards like delete the original platform.txt or what?
Also, which example sketch should I use to test the OTA functionality? There are many examples included in the ArduinoOTA library but I don't really know which one to use
Thanks again!
UPDATE: I have successfully completed an OTA update!! Thank you everyone for all of your help!
I accomplished this using the OTA Upload from IDE without 'network port' method, but I still cannot get a network port to show up. Is it worth trying to get it to show up as a network port? Like will I lose any functionality if my arduino can't show up as a network port or no?
First, have you installed a recent version of python (3.5 or something) and excluded it from your firewall (on a private network, and our you on a private network)
Second, Do you have a VPN turned on ? My VPN service effectively blocks the IDE from finding OTA ESP ports (Though the support team insists that it shouldn't and i am still conferring with them)
Close & reopen the IDE, and it should find it (sometimes a reboot of your computer helps)
@Deva_Rishi, python is not used here. it is not esp core
@Isopod00, if you use my_boards then the platform.local.txt goes into Arduino AVR boards package. in my_boards the platform.txt has the entries from platform.local.txt, but not all versions of Arduino IDE use it (Arduino updated the builder with some bugs on the way to better builder)
the OTA port detection in IDE is unreliable and the port propagation in the ArduinoOTA library has some issues too. so they sometimes not play together.
Oh that's what it's for. Just know that for the OTA ports in the IDE to show up, it needs to have permission within the firewall as well. The OTA port detection is not to great, agreed with that, but they reliably show up with my VPN 'off' and don't with my VPN 'on'
No, I do not use a VPN on my PC, but thanks for the suggestion!
Okay, thanks for the heads up. Is there any downside to me just using the "upload sketch using programmer" method or no? Because if there is no downside to just using that method instead of network ports then I probably won't work very hard to get the network ports working.