JAndrassy / ArduinoOTA

Arduino library to upload sketch over network to Arduino board with WiFi or Ethernet libraries
GNU Lesser General Public License v2.1
435 stars 89 forks source link

Password wrong #221

Closed LukeScrewdriver closed 10 months ago

LukeScrewdriver commented 10 months ago

Hi, I'm trying to upload code to an arduino mega and an arduino nano 33 iot.

Attempting on ide 2.x (for 33 Nano iot): When I try to upload the code it does not ask me for the password I enabled the detailed output and noticed that it uses 'arduino' as the password. I tried to run the program it points me to from the console with the correct parameters and it loaded correctly.

Attempted on ide 1.x (Arduino Mega): When I try to load the code it asks me for the password I enter the password (which I verified) and then it asks for it over and over again as if it were wrong. I enabled the detailed output and noticed that parameter are incorrect.

/home/luke/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0/bin/arduinoOTA" -address 192.168.1.82 -port {upload.port.properties.port} -sketch "/tmp/arduino/sketches/F86C5CF794A753D560813E2D582387CA/ArduinoFirstFloor.ino.hex" -upload {upload.port.properties.endpoint_upload} -sync {upload.port.properties.endpoint_sync} -reset {upload.port.properties.endpoint_reset} -sync_exp {upload.port.properties.sync_return}
JAndrassy commented 10 months ago

password is the third parameter in ArduinoOTA.begin(WiFi.localIP(), "Arduino", "password", InternalStorage);

for Mega you didn't copy platform.local.txt from extras to the boards package. the upload command you show is for ArduinoYun. https://github.com/JAndrassy/ArduinoOTA#atmega-support

do you have the latest version of the SAMD boards package?

LukeScrewdriver commented 10 months ago

I remembered installing them... now they are installed immagine

password is the third parameter in ArduinoOTA.begin(WiFi.localIP(), "Arduino", "password", InternalStorage);

Yes i changed the name and the password field

do you have the latest version of the SAMD boards package?

Yes

JAndrassy commented 10 months ago

you can't use OTA if you use Arduino AVR Mega variant. you have to change the bootloader and then the upload over USB doesn't work with the official variant. if you use MegaCore, then copy the platform.local.txt there. but maybe use my_boards Mega if you copied it. (and delete other boards from your my_boards if you don't use them)

LukeScrewdriver commented 10 months ago

Yes the upload to the mega has settled down. I have another small problem but I will create another issue for that. Thank you for responding to me quickly