Date
1 - 11 of 11
Remote Update OCS Sketch
Lots of reading on OTA or using alamode, lots of confusion. So I when back to step one, how to update my sketch to the OCS Arduino mega2560 with what I have around the observatory.
1. I already am using RPi4 with Stellarmate, and I installed the Arduino IDE. So I can download update OCS sketches using VNC. Well that is one option but presents several questions. a. will I be able to keep the usb plug inserted into the Mega and use it only when uploading the sketch? b. Arduino is powered via 5v external power supply due to I have it running 24/7. c. will having both plugged in do any damage? I have googled the subject and it comes to "whether the chicken or the egg came first". There are so many different answers on this subject. Ok, so I found somewhat of an answer from the website. Open Electronics , they claim that "Therefore it is clear that if you apply the voltage to the USB port and an external source to the JACK socket at the same time, it will be this last one to power the circuit, while the USB connection will keep working for the data exchange with the computer and no longer as a power source. We remind that in both cases the 5 V socket cannot be used as input, but only as output." Then I was thinking, maybe I can use a relay to turn on/off the OCS Arduino while I use the USB connection to upload the sketch, but the usb cable would still be in place when I get done uploading the sketch. So when I turn the OCS back on will there be a issue with the cable still plugged into the RPI4? How about direct connection using intranet to upload sketch, or somehow make the OCS into a hotspot just to upload the sketch via wifi. Comments, Ideas or Thoughts, anybody?
|
|
koal01
Hi,
I've received my ISP programmer and about to burn the bootloader with it. I'll tell you if i can progress to something interesting. Koal01
|
|
koal01
Hi Howard,
|
|
I was wondering about using the ide, whether that would work. Did you use the ota library or a different one? There are different one used.
nino
|
|
Howard Dutton
Wheres the sketch that accomplishes this?
On Tue, Mar 3, 2020, 8:12 PM Fernando Nino Sr <ninosr55@...> wrote: I was wondering about using the ide, whether that would work. Did you use the ota library or a different one? There are different one used.
|
|
koal01
Hi Howard, Fernando,
Yes ArduinoOTA is very interesting and seems quite Easy...seems ! At the beginning I was thinking it was a listening port problem but i was wrong. Sorry Howard please forget my last demand. As i said with ArduinoOTA I can upload OCS remotely only the first time when the sketch on the mega is running ArduinoOTA library. But when OCS is installed ArduinoOTA is not running and then it is not possible to re-upload, etc... I did not want to bother Howard with a feature that could work on the side but here again i was wrong. I'm afraid the ArduinoOTA should be mixed with OCS not sure Howard would be interested in that. I can write a little small guide of the first steps to help you save some time. I'm still testing with a little headache i have to admit. Tell me if you are interested in that Hear is the github link i'm using https://github.com/jandrassy/ArduinoOTA Juraj is the developer and tried to help me but no solution for the moment Koal01
|
|
koal01
Here's a video showing the upload
https://drive.google.com/open?id=1FfFrY63-BuB1sVk5z5QEMB5DSbOY1cs_
|
|
koal01, are you using this https://github.com/jandrassy/ArduinoOTA/tree/master/examples/OTEthernet ? That is the same sketch I was looking at, did you change the OTEthernet sketch to show a static IP or used DHCP, I have a static ip on my OCS module. Also just wondering if Watchdog is resetting itself after a certain time then try to upload the sketch?
Nino
|
|
Fernando glad to see another one suffering on the same issue (joke !).
Acutally the watchdog is off on my OCS. I'm working on this OTEthernet sketch as a basis since it works fine. I mean i can upload it constantly without any problem through the ethernet interface. The ip used in this sketch is dynamic yes so i added it in Arduino programmer as a second address (see the video), so the first line is the static Ip (OCS) and the second one is the dynamic Ip (OTethernet) The OTethernet sketch has 2 declarations one in the void setup ArduinoOTA.begin(ip, "Arduino", "password", InternalStorage); and a second in the loop : ArduinoOTA.poll(); I inserted them in OCS at the same place but no way.
|
|
koal01
I also tested the second remote solution with Ariadne bootloader.
It works fine but this option has 2 little drawbacks : 1- more manipulations with converting hex to bin firmware, using a tftp client to upload, with ArduinoOTA you do everything in the IDE. 2- a static Ip 192.168.1.128 in Ariadne bootloader. if you are in the same network you are lucky but if are not, you'll have to launch a sketch in the example to change this Ip and write your own ip settings in the EEprom that suspend the settings registered in the bootloader. Please note when the board is powered off/on OCS ip settings are lost... What would be interesting is that OCS writes ip settings in the EEprom so that we don't have to launch this sketch every time the board is powered off/on. I tested the cusomized WriteEhernetsettings powering the board off and on and ip settings are never lost. Really it would very nice Thank you
|
|
Howard Dutton
I will look at this... just hands full at the moment.
|
|