Argon doesn't take WiFi credentials

Hi

Do you have any update when maybe the
SYSTEM_THREAD and SYSTEM_MODE(SEMI_AUTOMATIC) issues in 0.8.0 rc27 will be resolved

See below the feeback from my dev team
We have tested following sketch on Particle Argon.
This code is working on Particle Photon/P1 now.

SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(SEMI_AUTOMATIC); // In order to avoid blocking while device connects to cloud when device boots 

......

void setup()
{

......

	// Start thread block to connect to particle cloud within SYSTEM_THREAD
	{
	 	SINGLE_THREADED_BLOCK() { 
			Particle.connect();
	 	}
	}

......

}

......


void loop()
{
......

}

After flashing this code, my argon was not connecting to cloud (by blinking of LED as White color)

So, I had flashed system firmware in DFU mode as your instruction after erase all firmware on argon module by clicking setup/reset button

particle flash --usb system-part1-0.8.0-rc.27-argon.bin -v
particle flash --serial argon-ncp-firmware-0.0.5-ota.bin -v
particle serial wifi

So, it could connect to cloud once.

After reboot, argon enters into setup mode automatically without clicking setup mode button.
Every time, I am executing “particle serial wifi” command via CLI.

I had tried to reflash bootloader, too.
particle flash --usb bootloader-0.8.0-rc.27-argon.bin -v
But same issue on my argon.

I guess you mean breathing white, right? Like shown here https://docs.particle.io/tutorials/device-os/led/photon/#wi-fi-off
This is the expected behaviour when using SEMI_AUTOMATIC mode.

And if it is in fact that then you should call WiFi.on() prior the Particle.connect() call.
While this shouldn't normally be required and will hopefully be fixed, it never harms actually having it there.

This is the respective issue filed a while ago.
https://github.com/particle-iot/firmware/issues/1631
Since the only response there seems to be countering my arguments for the "legacy" behaviour to be re-implemented, any support for my proposal to "fix" it would be welcome.

However, you can also always try Safe Mode to update OTA.

That would suggest there are no valid WiFi credentials stored. In order to store WiFi creds the WiFi module should be on too, but if your application doesn't power it on you could go into Safe Listening Mode.

BTW, reflashing the bootloader (which only works via --serial) wouldn't change anything in that respect.

2 Likes

Can you give me detailed instruction how can I restore WiFi credential in current situation?

So, I had erased all user code and flashed system firmware again.

But it is still entering WiFi setup mode(blinking as Blue) after rebooting

Can you be more specific how you did that?

You could follow the instructions provided in this post

After that, you should be able to run particle serial wifi (avoid any autodetect features offered tho') in order to provide new WiFi settings that should allow your device to connect to your local WiFi.

I had followed your mentioned steps.

In DFU Mode (blinking yellow)

particle flash --usb system-part1-0.8.0-rc.27-argon.bin -v
particle flash --usb tinker-serial1-debugging-0.8.0-rc.27-argon.bin -v
In Listening Mode (blinking blue)

particle flash --serial bootloader-0.8.0-rc.27-argon.bin -v
particle flash --serial argon-ncp-firmware-0.0.5-ota.bin -v

After that, particle serial wifi

But after I had set WiFi credential, if I reboot device, device is entered into WiFi setup mode again.

I am not sure what I missed yet.

And also I can’t pair current argon on mobile app in current situation.

Can you post the output of particle serial inspect?

And if you could repeat the whole setup procedure to capture and post the output of the individual steps too?


I had uploaded screenshots
Can you review what I am missing now?

Have you got the WiFi antenna plugged in?
Can you try entering Safe Mode?
Does this change anything?

Yeah, Of course, I had attached WiFi antenna

I could not enter into Safe mode

If I hold two buttons and then release reset button

When led is blinking as Magenta, if I release mode button,

It blinks as blue automatically.

I had tried several times

In that case I just have to defer to @rickkas7 or you can file a support ticket.

I have removed your last screenshot for privacy reasons.

Yeah, I’d like you to help I can resolve current problem.

So, I have to wait for your contact?

Yup, since I’m not an Particle employee, my possibilities are limited :wink:

Thank you :slight_smile:

Are you sure the Wi-Fi credentials didn’t set? If you’ve cleared the credentials using the button combination or the device is brand new, it will stay in setup mode until you’ve successfully completed the mobile set up process. Just setting the Wi-Fi credentials is not sufficient to get out of setup mode (listening mode, blinking dark blue).

You can also clear the setup bit using the following code.

#include "dct.h"

SYSTEM_MODE(SEMI_AUTOMATIC);

void setup() {
	// This clears the setup done flag on brand new devices so it won't stay in listening mode
	const uint8_t val = 0x01;
    dct_write_app_data(&val, DCT_SETUP_DONE_OFFSET, 1);
}

It should also be possible to clear the setup flag using dfu-util, but I don’t have the command handy.

1 Like

You should remove the device from that black foam. Use a proper breadboard. The foam is conductive to reduce ESD during shipping. As others have found out the hard way, running the device in the foam can cause unexpected and erratic behavior.

2 Likes

I have flashed your mentioned code
#include “dct.h”

SYSTEM_MODE(SEMI_AUTOMATIC);

void setup() {
// This clears the setup done flag on brand new devices so it won’t stay in listening mode
const uint8_t val = 0x01;
dct_write_app_data(&val, DCT_SETUP_DONE_OFFSET, 1);
}

So, It was breathing with white color.

After that I was going to pair within particle app, I triggered setup mode by holding mode button.

But I am failing to part on mobile app yet.

I am testing on Iphone and Particle app has installed Dec 27th