Tkanks a lot. I will try it again next Tuesday when I have again access to my machine and will give a report ...
Thanks a lot! Just tried it and now it (seems) to work. Originally, I have downloaded the file from the same directory as you referred to, so I do not know, why it was not working, maybe it was indeed corrupted.
When I am connecting via OTA, I am getting the following output in the output box:
Connecting to board ... done
Uploading sketch ... done
Flashing sketch ... Error flashing the sketch
So do not know what the error means. IDE says uploading done and I have also seen that the new code was correctly executed on the arduino. Can I ignore this message or what does it mean and how can I get resolved it?
@Juraj, many thanks .. I followed the procedure (at least I hope so)
I have downloaded arduinoOTA_1.4.1_Windows_64bit.zip
to my computer and replaced the former arduino.exe in the folder
C:\Users\xxxx\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0\bin
by this new file (the former one was from 2019)
Then I have updated in
C:\Users\xxxx\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.2.2
the platform.local.txt file as follows:
This configuration file supports the general ArduinoOTA library GitHub - JAndrassy/ArduinoOTA: Arduino library to upload sketch over network to Arduino board with WiFi or Ethernet libraries
#IDE 1
tools.bossac.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
tools.bossac.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
tools.dfu-util.network_cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
tools.dfu-util.upload.network_pattern="{network_cmd}" -address {serial.port} -port 65280 -username arduino -password "{network.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b
#IDE 2
upload.tool.network=arduino_ota
tools.arduino_ota.cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
tools.arduino_ota.upload.field.password=Password
tools.arduino_ota.upload.field.password.secret=true
tools.arduino_ota.upload.pattern="{cmd}" -address "{upload.port.address}" -port 65280 -username Arduino -password "{upload.field.password}" -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b -t 30
arduinoOTA as programmer. add entries with {ip} into programmers.txt
tools.arduinoOTA.cmd={runtime.tools.arduinoOTA.path}/bin/arduinoOTA
tools.arduinoOTA.program.params.verbose=
tools.arduinoOTA.program.params.quiet=
tools.arduinoOTA.program.pattern="{cmd}" -v -address {ip} -port 65280 -username arduino -password password -sketch "{build.path}/{build.project_name}.bin" -upload /sketch -b -t 30
After compiling + uploading the sketch i received the following messages:
Connecting to board ... done
Uploading sketch ... done
Flashing sketch ... done
Error flashing the sketch:Unauthorized
Well, at least instead of getting "Flashing sketch ... Error flashing the sketch" now it says "Flashing sketch ... done". sounds much better but a new error occured
"Error flashing the sketch:Unauthorized"
With the former arduino.exe and the error message "Flashing sketch ... Error flashing the sketch" the code was downloaded anyway and worked even if there was the error message!
Now it is not downloading ..thus it seems even worse
- I opened the port UDP 65280 in my network for the arduino
- in my code I am using in the
setup():
ArduinoOTA.begin(WiFi.localIP(), "Arduino", "password", InternalStorage);
and in the loop()
ArduinoOTA.handle();
and also entered password when I was aksing for
Do you have any idea what went wrong?
@Juraj
thanks a lot for the link, which I have read already before but I can't find the problem
My code in the setup() is
ArduinoOTA.begin(WiFi.localIP(), "Arduino", "password", InternalStorage);
and I am entering password in the IDE mask (tried it several times also via copy and paste from the code to avoid misspellings)
but it's still leading to the same problem of
"Error flashing the sketch:Unauthorized"
Do you have any other idea how to resolve the issue?
could you try with IDE 1?
Great! With IDE 1.8.18 after entering the password it worked!
Connecting to board ... done
Uploading sketch ... done
Flashing sketch ... done
OK
Sketch uploaded successfully
I have tried it again with IDE2 - same problem
are you on newest version of IDE 2?
yes it's IDE 2.3.3
it looks like it starts the upload tool twice
Hi guys, I use Mac, I followed your advice and I got this error:
fatal error: runtime: bsdthread_register error
runtime stack:
runtime.throw(0x13693d0, 0x21)
/ssd/go/src/runtime/panic.go:616 +0x81 fp=0x7ff7bfeff6c8 sp=0x7ff7bfeff6a8 pc=0x1028be1
runtime.goenvs()
/ssd/go/src/runtime/os_darwin.go:129 +0x83 fp=0x7ff7bfeff6f8 sp=0x7ff7bfeff6c8 pc=0x1026763
runtime.schedinit()
/ssd/go/src/runtime/proc.go:501 +0xd6 fp=0x7ff7bfeff760 sp=0x7ff7bfeff6f8 pc=0x102b4d6
runtime.rt0_go(0x7ff7bfeff798, 0xe, 0x7ff7bfeff798, 0x0, 0x1000000, 0xe, 0x7ff7bfeff988, 0x7ff7bfeff9df, 0x7ff7bfeff9e8, 0x7ff7bfeff9f6, ...)
/ssd/go/src/runtime/asm_amd64.s:252 +0x1f4 fp=0x7ff7bfeff768 sp=0x7ff7bfeff760 pc=0x1050fe4
Thanks a lot ... do you have any idea how to fix it?
I'm going to ask you to provide the full verbose output from an upload attempt.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
- Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open. - Uncheck the box next to Show verbose output during:
☑
compile in the "Preferences" dialog. - Check the box next to Show verbose output during: ☐ upload.
- Click the "OK" button.
The "Preferences" dialog will close. - Attempt an upload, just as you did before when you encountered that error.
- Wait for the upload to fail.
- You will see an "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
- Open a forum reply here by clicking the "Reply" button.
- Click the
<CODE/>
icon on the post composer toolbar.
This will add the forum's code block markup (```
) to your reply to make sure the error messages are correctly formatted.
- Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
This will paste the error output from the upload into the code block. - Move the cursor outside of the code block markup before you add any additional text to your reply.
- Click the "Reply" button to post the output.
I apologize, I realized that the ArduinoOTA folder had been renamed by mistake, now I no longer see that type of error. Now when I load the sketch I see this uart driver error, what could it be due to?
22:58:10.340 -> 126915
22:58:10.899 -> 127464
22:58:11.450 -> 128014
22:58:12.006 -> 128563
22:58:19.142 -> SSID: Dani_Elisa
22:58:19.241 -> IP Address: 192.168.0.134
22:58:19.241 -> signal strength (RSSI):-69 dBm
22:58:24.871 -> E (202281) uart: uart_get_buffered_data_len(1342): uart driver error
22:58:27.319 -> E (204713) uart: uart_get_buffered_data_len(1342): uart driver error
22:58:28.560 -> 549
22:58:29.082 -> 1098
22:58:29.635 -> 1647
22:58:30.189 -> 2196
Downloaded IDE 2.3.4 today and could successfully download the sketch!
Connecting to board ... done
Uploading sketch ... done
Flashing sketch ... done
OK
Sketch uploaded successfully