Hi there,
I have recently bought a couple of Argons and Xenons to use in mesh networks but none of them seem to work.
I cannot properly OTA flash any of the devices. I have started with one of the Argons, whenever I try to OTA flash it, the onboard RGB LED turns solid magenta and remains that way for around a minute, then going dark. It then seems to reboot after staying dark for a couple of minutes.
Occasionally the flash is successful and after the board reboots, the application starts running and the device sends an event to the cloud stating that the flash was successful. But usually, the flash fails and when the device reboots, the previous application runs and a failed event is sent to the cloud.
I started looking for similar issues on the forum and found a couple, I tried re-installing the binaries for the OS, I tried reinstalling 1.1.0 first but the issue was still there. I then tried 1.1.1 and 1.3.0 rc1 all of which had the same behaviour. I flashed all the binaries including the bootloader which I flashed through serial and then using a jTag.
I have also tried including SYSTEM_THREAD(ENABLED)
in the applications I was trying to flash with no success. I have also tried un-claiming and claiming the device again with no success.
I figured it might be something with the device, I contacted support and support managed to reproduce the error using the code I have provided (the one I used for testing it), which is below. The error was fixed when they flashed a different code though it does not fix when I try to flash something else.
void setup()
{
Serial.begin(9600);
while(!Serial) {};
Serial.println("");
Serial.println("");
}
void loop()
{
Serial.println("hello world");
delay(1000);
}
I though it might be the while loop in setup but other applications without a while loop don’t work wither.
So I claimed another argon which acted the same, I tried the Xenons and all of them have the same behaviour. I can flash all of them using USB in DFU mode and Serial in the CLI. It is essential to flash the devices using OTA as they are meant for operation on the field.
There must be something I am doing wrong, can you OTA flash the devices when an application is running or does the device have to be in a particular mode when flashing? I have been using the code below for testing the devices recently. I have also tried OTA flashing blank sketches and it still did not work.
SYSTEM_THREAD(ENABLED);
void setup()
{
pinMode(7, OUTPUT);
}
void loop()
{
digitalWrite(7, HIGH);
delay(1000);
digitalWrite(7, LOW);
delay(1000);
}
Thank you.