Hello, I am trying to use the ArduinoOTA library to upload sketches to an Arduino Nano IoT 33 but the ota failes to uplaod with this error:
Sketch uses 42344 bytes (16%) of program storage space. Maximum is 262144 bytes.
Global variables use 5820 bytes (17%) of dynamic memory, leaving 26948 bytes for local variables. Maximum is 32768 bytes.
Failed uploading: uploading error: signal: killed
This happens even when using the example sketch (WiFi101_OTA). I can see that it connects to the internet and it is visible in the ide as a network port but when I try to upload, it gives the error.
I am using version 1.0.9 of the ArduinoOTA library and version 1.8.13 of the arduino samd boards.
Hi @audr24. In order to gather more information that might help us to troubleshoot your problem, I'm going to ask you to post the full output from an upload attempt when in verbose mode.
NOTE: These instructions will not solve the problem. They are only intended to gather more information which might provide a clue that eventually leads to a solution.
Please do this:
Select File > Preferences from the Arduino IDE menus.
Uncheck the checkbox next to "Show verbose output during: ☑ compilation".
Check the checkbox next to "Show verbose output during: ☐ upload".
Click the OK button.
Attempt an upload, as you did before.
After the upload fails, you'll see a button on the right side of the orange bar in the Arduino IDE: Copy error messages. Click that button.
This copies the full output to the clipboard.
Open a forum reply here by clicking the Reply button.
Click the </> 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 Ctrl+V.
This will paste the error output from the upload into the code block.
Move the cursor outside of the code tags before you add any additional text to your reply.
Sketch uses 25644 bytes (9%) of program storage space. Maximum is 262144 bytes.
Global variables use 4484 bytes (13%) of dynamic memory, leaving 28284 bytes for local variables. Maximum is 32768 bytes.
"/Users/aodren/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.2.1/bin/arduinoOTA" -address "10.0.0.173" -port 65280 -username arduino -password "password" -sketch "/private/var/folders/n0/0b8nnfbs6kb78h_x84kkvx880000gn/T/arduino-sketch-CEF25782828076643D35E0F681A494B5/WiFi101_OTA.ino.bin" -upload /sketch -b
Failed uploading: uploading error: signal: killed
edit:
this is the example sketch used
/*
This example connects to an WPA encrypted WiFi network.
Then it prints the MAC address of the Wifi shield,
the IP address obtained, and other network details.
It then polls for sketch updates over WiFi, sketches
can be updated by selecting a network port from within
the Arduino IDE: Tools -> Port -> Network Ports ...
Circuit:
* WiFi shield attached
created 13 July 2010
by dlf (Metodo2 srl)
modified 31 May 2012
by Tom Igoe
modified 16 January 2017
by Sandeep Mistry
*/
#include <SPI.h>
#include <WiFiNINA.h>
#include <ArduinoOTA.h>
#include "arduino_secrets.h"
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
/////// Wifi Settings ///////
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // your network password
int status = WL_IDLE_STATUS;
void setup() {
//Initialize serial:
Serial.begin(9600);
// check for the presence of the shield:
if (WiFi.status() == WL_NO_SHIELD) {
Serial.println("WiFi shield not present");
// don't continue:
while (true);
}
// attempt to connect to Wifi network:
while ( status != WL_CONNECTED) {
Serial.print("Attempting to connect to SSID: ");
Serial.println(ssid);
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
status = WiFi.begin(ssid, pass);
}
// start the WiFi OTA library with internal (flash) based storage
ArduinoOTA.begin(WiFi.localIP(), "Arduino", "password", InternalStorage);
// you're connected now, so print out the status:
printWifiStatus();
}
void loop() {
// check for WiFi OTA updates
ArduinoOTA.poll();
// add your normal loop code below ...
}
void printWifiStatus() {
// print the SSID of the network you're attached to:
Serial.print("SSID: ");
Serial.println(WiFi.SSID());
// print your WiFi shield's IP address:
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);
// print the received signal strength:
long rssi = WiFi.RSSI();
Serial.print("signal strength (RSSI):");
Serial.print(rssi);
Serial.println(" dBm");
}
Unfortunately the verbose output didn't provide much more information. I am suspicious there might be a problem with the execution of the arduinoOTA uploader tool (note there is both an Arduino library and an uploader tool with the same name). Please try this:
Attempt another upload with the verbose output still turned on.
Wait for the upload to fail.
Select the full arduinoOTA command you see in the black console panel at the bottom of the Arduino IDE window.
In the output you shared above, the command is:
But it maybe slightly different after you try the upload again, so it is necessary to repeat the process.
Press ⌘+C.
This will copy the text of the selected command to the clipboard.
Open your Applications folder in Finder.
Open the Utilities folder.
Double-click on "Terminal".
Press ⌘+V.
This will paste the copied command into the terminal window.
Press Enter
Wait for the process to finish.
Press ⌘+A.
This will select all the text in the Terminal window.
Press ⌘+C.
Open a forum reply here by clicking the Reply button.
Click the </> icon on the post composer toolbar.
This will add the forum's code block markup (```) to your reply to make sure the output is correctly formatted.
Press ⌘+V.
This will paste the output 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.
Please let me know if you have any questions or problems while following those instructions.
{arduinoota.extraflags} at the end is your problem.
platform.txt in SAMD 1.8.13 has arduinoota.extraflags=
do you have some platform.local.txt in the SAMD package?
The ArduinoOTA section of the platform.txt is exactly the same for me. What's weird is that I tried with two arduino nano iot 33s and it didnt work with either of them, but when I did it with an esp32 it worked fine.
Ok, I still don't know why its not working on my computer but I have a old laptop running debian server and I can upload over the network using arduino-cli on there, so I will use that instead.
I figured out what the issue was, there's a problem with the ArduinoOTA install and replacing the one used by the IDE by one recompiled from the github repo fixed whatever it was.