Thank you.
Here is the code that I can successfully upload via USB and is therefore the receiving code when attempting the OTA upload:
#include "thingProperties.h"
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection,false);
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
pinMode(LED_BUILTIN, OUTPUT);
test = 0;
}
void loop() {
digitalWrite(LED_BUILTIN,HIGH);
ArduinoCloud.update();
digitalWrite(LED_BUILTIN,LOW);
delay(100);
test++;
}
The Thing has one integer variable "test" that is read-only and updates every 10 seconds.
Here is the output from the OTA attempt:
Over-The-Air upload available, compiling...
/usr/local/bin/arduino-cli compile --fqbn arduino:samd:nano_33_iot --build-cache-path /tmp --output-dir /tmp/3473073800/build --build-path /tmp/arduino-build-3F4A1CCB84645D2FFAAB2A952E78B786 --library /mnt/create-efs/webide/03/e1/03e1a6aeac7bb5900020bf52a73c0d25:rodgilmour/libraries_v2/Adafruit SSD1306 /tmp/3473073800/WDT_Test_apr12a
[info] Sketch uses 95828 bytes (36%) of program storage space. Maximum is 262144 bytes.
[info] Global variables use 5980 bytes (18%) of dynamic memory, leaving 26788 bytes for local variables. Maximum is 32768 bytes.
/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
/home/builder/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/../lib/gcc/arm-none-eabi/7.2.1/../../../../arm-none-eabi/bin/ld: warning: changing start of section .bss by 4 bytes
Over-The-Air upload request created successfully
Over-The-Air upload pending...
Initializing Over-The-Air update...
Downloading binary file...
Over-The-Air upload pending...
Initializing Over-The-Air update...
The flow is predictable and proceeds at a normal rate until it hits "Initializing Over-The-Air update...". It may freeze there or it may proceed to "Downloading binary file..." and freeze there. After a few minutes of being frozen, it might retry, as was captured above.
As you can see in the code, LED_BUILTIN is flashing to show calls to ArduinoCloud.update(). The LED becomes steady-on when "Initializing Over-The-Air update..." is reported so the Nano seems to be aware of the request.
If left long enough (say 10 minutes), it will sometimes give this output:
Board error received - OtaDownloadFail
It can be quite difficult to break out of this mode when frozen. It will stay pending even if I close the browser and open it again. Usually I can escape if I reset the Nano, wait a couple of minutes while it retries, then reset the Nano again. At this point I will usually get this output:
SHA256 mismatch - Wrong firmware detected after restart
I don't know if this is relevant, but two things occured around the time this started:
- I reset my account password
- I was testing Google Home integration.
Thanks for your help,
Rod