Argon won't retain WiFi Creds (was "Argon CLI Setup and Claim")

I have a new, unclaimed argon.

It would NOT setup through the mobile app. It connected once (after 10X tries), downloaded new firmware, but then I could not get it to reconnect to the app.

I used the CLI to set the Wifi, and so now it’s connected to Wifi, but it’s not claimed in my account.

particle setup asks if I want to use my account, then exits. Particle Identify lists the device.

Also, when I use particle serial wifi it lists no SSIDs (but I can still set one myself and get a light blue pulse)

What to do?

EDIT: Also, after it’s connected to Wifi via serial, if I reboot it instantly goes into listening mode- that is, it doesn’t remember wifi. Is that correct?

particle setup does not yet work for Gen3 devices.

With the device breathing cyan (or magenta), try

particle device add <Device ID>

or in Web IDE you can go to the Devices page and click on ADD NEW DEVICE. The result is identical.

I’m not sure why the SSIDs are not being shown, unless the router(s) that is/are around you have their SSIDs masked.

BTW CLI was just updated, so if it didn’t auto-update for you, enter

particle update-cli

1 Like

@jed let us know if this fixed your issue!

Thanks for the info…

  1. updated CLI
  2. particle identify gave me the device ID
  3. Claimed through the IDE (I was confusing that with the devices tab on the console, where there is no “New Device” button!)
  4. Used particle serial wifi to set Wifi name (still won’t list any SSIDs when scanning, and there are literally a hundred near me, I am in the city)
  5. The device connected over Wifi, and I was able to see and initiate a code flash. (Device OS: 0.8.0-rc.27)

HOWEVER: during he flash it restarted and reverted to listening mode

I just CLI’d the wifi again, and it’s connected.

HA! Just checked the console, it’s running 0.9.0 now.

Restart device… instantly to listening mode.

CLI WIFI again… connected… and it’s running code

Made a change to code to use D7 for testing… and flashed…

back to listening mode

CLI WIFI -> breathing and running code… I can call a fxn.

But it will not remember Wifi.

Do I have to call a serial command to make the Wiwi perpetual?

Otherwise, I think something may be off with this device.

EDIT: Calling WiFi.hasCredentials yields TRUE

EDIT2: I placed WiFi.setCredentials(“My_Router”, “mypasswordishuge”); in the setup, it does not help.

FYI, the device enters listening mode almost instantly after a reset. It flashes white and then blinks blue within 1/4 second.

I have a difficult photon device claiming, but I do not know if it will help you.

(※ [SOLVED] Photon Device claiming failure)

Just to be all clear… the problem appears to be that it won’t retain the WiFi creds after a RESET. Just blinks white and goes straight into Listen Mode (blink deep blue)

Have you explicitly stated that you don’t want to run the Argon in a mesh (aka standalone) or is it meant to create a mesh network?
If the latter but you haven’t actually finished the mesh setup the device should go back into Listening/Setup Mode

To prevent that you either setup the device via the mobile app again (no need to unclaim, just add the same device a second time) or flash and run this once

#include "Particle.h"
#include "dct.h"

SYSTEM_MODE(SEMI_AUTOMATIC);

void setup() {
    const uint8_t val = 0x01;
    dct_write_app_data(&val, DCT_SETUP_DONE_OFFSET, 1);
    WiFi.on();
    WiFi.connect();
    Particle.connect();
}

Thank you. I’ll try setup again, but I was only able to get it to connect to the device once, and after updating the OS to the previous version (previous to 0.9.0) it would no longer connect to it.

I take it that, as part of the setup process, certain flags are set on the firmware/OS that prioritize mesh/wifi?

Have you got the latest modile app too?

Running the code seems to have worked.

Note: I tried a couple more times to connect to it via the app (current Android), but it did not work. Was it attempting to connect via BT or Wifi? Would I need an antenna on the BT (~24" apart from phone)?

Lastly, I have been playing with these a bit for the last couple years- had a couple original devices, then a couple photons and an electron, finally messing with Gen3. But I haven’t really dug in too far- so I don’t really have a great comprehension of the overall design.

Is there documentation that outlines the OS, and possibly the workings of the particle cloud system? I am interested in knowing a bit more than the black box, like possibly knowing about all those DCT values, etc.

I have a couple clients for which these might come in handy as individual problem solvers, but I have a few more questions before I feel like I could implement them. No biggie if you’re not the right person to ask, I’ll eventually figure it out.

Thanks!

The mobile app setup will connect via BT for Gen3. No antenna needed normally.

The DCT layout is currently not documented for Gen3 but you can have a look at how it looks on the Photon here
https://docs.particle.io/datasheets/wi-fi/photon-datasheet/#dct-layout

You can look in the open source repo to find the respective info not yet documented.

That’s a broad question. There is documented what’s important for programming the device without digging into the system too deep but other questions are best asked explicitly. That may also provide some clue for @rickkas7 (technical docu writer - amongs other things) what may be interesting to address in the docs.