Skip to content

Need help using ArduinoOTA with Arduino Mega #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SandraWeddig opened this issue Sep 29, 2019 · 15 comments
Closed

Need help using ArduinoOTA with Arduino Mega #10

SandraWeddig opened this issue Sep 29, 2019 · 15 comments

Comments

@SandraWeddig
Copy link

SandraWeddig commented Sep 29, 2019

Hi!

I have an Arduino Mega 2560 and would like to do OTA updates of my sketches.
As I understand, this is possible with you project.
Is there a step by step tutorial how to use it?
How can I get network ports in my Arduino IDE?

Thanks,
Sandra

@JAndrassy
Copy link
Owner

yes, it is possible
did you read this? https://github.com/jandrassy/ArduinoOTA#atmega-support

@SandraWeddig
Copy link
Author

Yes, I did read it. But I'm not sure, if I did understand and follow it all.

I did copy my_boards to /opt/arduino/hardware.

Then I did burn the bootloader Arduino Mega 2560 (Optiboot) to my board.
After this I did burn the network configuration (I use an ethernet shield) to the board and uploaded my sketch in which I did add "#include <ArduinoOTA.h>", "ArduinoOTA.begin(Ethernet.localIP(), "Arduino", "password", InternalStorage);" at the end of the setup function and "ArduinoOTA.poll();" in the loop().

There appears no network port in my Arduin IDE. I have disabled my client firewall and can ping the board.

@JAndrassy
Copy link
Owner

did you try the OTEthernet example?

@SandraWeddig
Copy link
Author

Yes, and it didn't worked till I changed to ArduinoIDE 1.8.3.

The bug arduino/Arduino#8408 blocks network ports since version 1.8.5.

Thanks for your help. I will try the OTA update next (board is already under network ports) and give you feedback.

@JAndrassy
Copy link
Owner

but make sure you have AVR boards package at least version 1.6.21 installed for upload tool arduinoOTA version 1.2.

@SandraWeddig
Copy link
Author

I still fail at the password... with the default. :(

@JAndrassy
Copy link
Owner

copy here the upload command from the IDE console

@SandraWeddig
Copy link
Author

I only see "Resetting the board
Failed to reset the board, upload failed" in the command line, when I press the upload button from Arduin IDE. Now it works with version 1.8.9 also, but I doesn't differ when asking for the password.

@JAndrassy
Copy link
Owner

in Preferences check verbose mode for Upload

@SandraWeddig
Copy link
Author

The command is "/root/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0/bin/arduinoOTA -address 192.168.69.201 -port {upload.network.port} -sketch /tmp/arduino_build_393267/OTEthernet.ino.hex -upload {upload.network.endpoint_upload} -sync {upload.network.endpoint_sync} -reset {upload.network.endpoint_reset} -sync_exp {upload.network.sync_return} "

@JAndrassy
Copy link
Owner

JAndrassy commented Sep 29, 2019

upload with my_boards Mega. it has the right command.

EDIT: If you burned the my_boards Optiboot, the USB upload with standard Mega selected should not work.

@SandraWeddig
Copy link
Author

SandraWeddig commented Sep 30, 2019

I use the entry "Arduino Mega 2560 (Optiboot)".
Can I edit any file, so that it uses the rightupload command?

@JAndrassy
Copy link
Owner

JAndrassy commented Sep 30, 2019

then try to copy platform.local.txt from extras/avr folder, next to platform.txt in the AVR boards package Packages are located in ~/.arduino15/packages/ on Linux and %userprofile%\AppData\Local\Arduino15\packages\ on Windows (AppData is a hidden folder).

EDIT: the default AVR package can be in IDE installation folder

@SandraWeddig
Copy link
Author

That did the trick :)

Thanks, I can now upload via OTA.

@Kashyapkoshti
Copy link

That did the trick :)

Thanks, I can now upload via OTA.

Can you please provide step by step procedure from beginning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants