Stuck in listening mode Argon

I have a problem with my Argon. I unclaimed it to connect my argon to a new wifi connection and qhen I did that it got stuck in listening mode. I can’t get it to turn green or to pit my Argon into safe mode. I can get it in DFU mode, but I am new and I don’t really know what I can do. I’ve tried the tinkers and the device doctor, but they are not yet avaible for the Argon. Has anyone solved this?

You don't need nor should you do that. You can "re-claim" an already "self-claimed" device.

Try particle serial wifi to provide new valid WiFi credentials to the device.

I’m having some similar issues with an Argon. The device seems to be stuck in listening mode, I can set new credentials using terminal but the device doesn’t connect to the network (flashing green). If I reset the device after setting credentials it goes back to listening mode (1hz blue).

When trying to setup the device in the app I get an error, “Device is in invalid state, please reset the device and start again.”

Safe mode, re-flashing firmware and tinker, power cycle, resetting all didn’t change anything. Dead Argon?

Hey @amulder

When configuring an Argon from a first time setup (or after a factory reset), there's actually a bit stored on the device that tells it whether or not to go into listening mode on startup. In the mobile app setup, this bit gets flipped. However, when adding credentials from the CLI, it is not--which can cause it to end up in the funky state you're seeing.

The easiest way to fix this would be go to through the mobile setup once--that should flip the bit.

One of our engineers figured out a code way to actually fix this without the mobile app--through means of flashing a user application. Simply add the following four lines to an application binary and flash it.

#include "Particle.h"
#include "dct.h"
then in setup do :
const uint8_t val = 0x01;
dct_write_app_data(&val, DCT_SETUP_DONE_OFFSET, 1);

2 Likes

Thanks for the quick response and info, but I’m not getting any further.

I flashed new firmware with the code you suggested, then tried going through the mobile setup and got the same error as before. I reset the device (should re-run that reset code) and tried the mobile setup again with the same results.

The mobile setup connects to the device, but hangs when the large checkmark appears.

I’d guess that the device isn’t getting to point of running the user code so those changes aren’t being applied. Not sure what to do next.

I think one thing missing in the code snippet above is SYSTEM_MODE(MANUAL) which should let your code run before it tries to connect.

You would want to run either the mobile setup or use the recommended code snippet. It is not necessary to use both.

It sounds like there may be a separate issue occurring with your device though in setup.

Ah, good catch. Oversight on my part. @amulder Try adding SYSTEM_MODE(MANUAL) to your code and powering on the device again. This should have it execute the code on startup.

1 Like

I added SYSTEM_MODE(MANUAL) to the code with no change. I’m unable to get through the mobile setup as mentioned above. Time to open a support ticket?

With that workaround you should be able to get out of Listening Mode (which is the goal of the topic title).
It’s not meant as remedy when having troubles with the device setup.

With the workaround application run once, you should be able to put your device in DFU Mode, run particle flash --usb tinker and then provide the WiFi credentials via Listening Mode and particle serial wifi (I’d avoid the automatic options and do things manually).

Did this help getting out of LM?

1 Like

As Scruff mentioned, the app will assist in getting out of forced setup mode. Mobile application setup is a different issue.

For the mobile setup issue--once the setup fails or gets stuck, I would back out to the Your Devices page in the app. In the upper right hand corner there is a button for providing mobile setup logs. Feel free to provide these here (or in a support ticket) and we can figure out why the device might be cooperating.

1 Like

Thanks for the advise although I’m still in the same place. I tried @ScruffR’s steps of flashing tinker and providing credentials with no luck. Tried entering details manually which works in terminal but then flashes green endlessly (left for 5 minutes) then tried using the scanning/automatic setup with the same result. Endless flashing and if I reset the device it goes back into listening mode.

I then tried mobile setup and got the same error, part of the log file pasted below.

12:55:45: (Particle.DeviceListViewController Info) Mesh setup started
12:55:45: (MeshSetupBluetoothConnectionManager Info) centralManagerDidUpdateState: Ready
12:55:45: (MeshSetupFlow Info) stepComplete

--------------------------------------------------------------------------------------------
currentStep = 0, currentCommand = GetTargetDeviceInfo
12:55:45: (MeshSetupFlow Info) bluetoothConnectionManagerStateChanged = Ready
12:55:45: (MeshSetupFlowUI Info) ViewControllers: [<Particle.MeshSetupFindStickerViewController: 0x105c11360>]
12:55:46: (MeshSetupFlowUI Info) sticker found by user
12:55:47: (MeshSetupFlowUI Info) ViewControllers: [<Particle.MeshSetupFindStickerViewController: 0x105c11360>, <Particle.MeshSetupScanStickerViewController: 0x10a013a00>]
12:55:52: (MeshSetupFlowUI Info) dataMatrix scanned: ARNHAB8512B63PH BRBKWJFLWUYMXED
12:55:52: (MeshSetupFlowUI Info) ViewControllers: [<Particle.MeshSetupFindStickerViewController: 0x105c11360>, <Particle.MeshSetupScanStickerViewController: 0x10a013a00>, <Particle.MeshSetupGetReadyViewController: 0x10a810800>]
12:55:53: (MeshSetupFlowUI Info) target device ready
12:55:53: (MeshSetupFlow Info) dataMatrix: MeshSetupDataMatrix(serialNumber: "ARNHAB8512B63PH", mobileSecret: "BRBKWJFLWUYMXED", type: Optional(Argon))
12:55:53: (MeshSetupFlow Info) self.targetDevice.type?.description = Optional("Argon")
12:55:53: (MeshSetupFlow Info) stepComplete

--------------------------------------------------------------------------------------------
currentStep = 1, currentCommand = ConnectToTargetDevice
12:55:53: (MeshSetupFlow Info) connecting to device: MeshSetupPeripheralCredentials(name: "Argon-2B63PH", mobileSecret: "BRBKWJFLWUYMXED")
12:55:53: (MeshSetupFlow Info) bluetoothConnectionManagerStateChanged = Scanning
12:55:53: (MeshSetupBluetoothConnectionManager Info) BluetoothConnectionManager -- scanForPeripherals with services 6FA90001-5C4E-48A8-94F4-8030546F36FC
12:55:53: (MeshSetupBluetoothConnectionManager Info) Restarting timeout
12:55:53: (MeshSetupFlowUI Info) flow setup entered state: TargetDeviceConnecting
12:55:53: (MeshSetupFlowUI Info) ViewControllers: [<Particle.MeshSetupFindStickerViewController: 0x105c11360>, <Particle.MeshSetupScanStickerViewController: 0x10a013a00>, <Particle.MeshSetupGetReadyViewController: 0x10a810800>, <Particle.MeshSetupPairingProcessViewController: 0x10b822000>]
12:55:54: (MeshSetupBluetoothConnectionManager Info) centralManager didDiscover peripheral Argon-2B63PH
12:55:54: (MeshSetupBluetoothConnectionManager Info) stop scan
12:55:54: (MeshSetupBluetoothConnectionManager Info) Restarting timeout
12:55:54: (MeshSetupFlow Info) bluetoothConnectionManagerStateChanged = PeripheralDiscovered
12:55:54: (MeshSetupBluetoothConnectionManager Info) Pairing to Argon-2B63PH...
12:55:54: (MeshSetupBluetoothConnectionManager Info) Paired to: Argon-2B63PH
12:55:54: (MeshSetupBluetoothConnectionManager Info) Restarting timeout
12:55:54: (MeshSetupFlowUI Info) flow setup entered state: TargetDeviceConnected
12:55:54: (MeshSetupFlow Info) bluetoothConnectionManagerStateChanged = Ready
12:55:54: (BluetoothConnection Info) Services discovered
12:55:54: (BluetoothConnection Info) Particle Mesh commissioning Service found
12:55:55: (BluetoothConnection Info) Characteristics discovered
12:55:55: (BluetoothConnection Info) Particle mesh TX Characteristic found
12:55:55: (BluetoothConnection Info) Particle mesh RX Characteristic found
12:55:55: (BluetoothConnection Info) Enabling notifications for 6FA90003-5C4E-48A8-94F4-8030546F36FC
12:55:55: (HandshakeManager Info) start handshake
12:55:55: (HandshakeManager Info) sendRoundOne
12:55:55: (BluetoothConnection Info) Sent data: 332 Bytes
12:55:55: (BluetoothConnection Info) Bytes received from: 6FA90003-5C4E-48A8-94F4-8030546F36FC, 244 Bytes
12:55:55: (BluetoothConnection Info) Bytes received from: 6FA90003-5C4E-48A8-94F4-8030546F36FC, 244 Bytes
12:55:55: (HandshakeManager Info) readRoundOne
12:55:55: (BluetoothConnection Info) Bytes received from: 6FA90003-5C4E-48A8-94F4-8030546F36FC, 14 Bytes
12:55:55: (HandshakeManager Info) readRoundTwo
12:55:55: (HandshakeManager Info) sendRoundTwo
12:55:55: (BluetoothConnection Info) Sent data: 167 Bytes
12:55:55: (HandshakeManager Info) sendConfirmation
12:55:55: (BluetoothConnection Info) Sent data: 34 Bytes
12:55:56: (BluetoothConnection Info) Bytes received from: 6FA90003-5C4E-48A8-94F4-8030546F36FC, 34 Bytes
12:55:56: (HandshakeManager Info) readConfirmation
12:55:56: (HandshakeManager Info) completed
12:55:56: (MeshSetupBluetoothConnectionManager Info) Bluetooth connection Argon-2B63PH became ready
12:55:56: (MeshSetupFlowUI Info) flow setup entered state: TargetDeviceReady
12:55:58: (MeshSetupFlow Info) stepComplete

--------------------------------------------------------------------------------------------
currentStep = 2, currentCommand = EnsureCorrectEthernetFeatureStatus
12:55:58: (MeshSetupTransceiverDelegate Info) Preparing message: 1, type: GetFeature
12:55:58: (MeshSetupTransceiverDelegate Info) Sending message: 1
12:55:58: (BluetoothConnection Info) Sent data: 18 Bytes
12:55:58: (BluetoothConnection Info) Bytes received from: 6FA90003-5C4E-48A8-94F4-8030546F36FC, 16 Bytes
12:55:58: (MeshSetupFlow Info) targetDevice.sendGetFeature: OK enabled: Optional(false)
12:55:58: (MeshSetupFlow Info) self.targetDevice.enableEthernetFeature = Optional(false)
12:55:58: (MeshSetupFlow Info) stepComplete

--------------------------------------------------------------------------------------------
currentStep = 3, currentCommand = EnsureLatestFirmware
12:55:58: (MeshSetupTransceiverDelegate Info) Preparing message: 2, type: GetSystemVersion
12:55:58: (MeshSetupTransceiverDelegate Info) Sending message: 2
12:55:58: (BluetoothConnection Info) Sent data: 16 Bytes
12:55:58: (BluetoothConnection Info) Bytes received from: 6FA90003-5C4E-48A8-94F4-8030546F36FC, 23 Bytes
12:55:58: (MeshSetupFlow Info) targetDevice.sendGetSystemVersion: OK, version: Optional("1.1.0")
12:55:58: (MeshSetupTransceiverDelegate Info) Preparing message: 3, type: GetSystemCapabilities
12:55:58: (MeshSetupTransceiverDelegate Info) Sending message: 3
12:55:58: (BluetoothConnection Info) Sent data: 16 Bytes
12:55:58: (BluetoothConnection Info) Bytes received from: 6FA90003-5C4E-48A8-94F4-8030546F36FC, 21 Bytes
12:55:58: (MeshSetupFlow Info) targetDevice.sendGetSystemCapabilities: OK, capability: Optional(1)
12:55:58: (MeshSetupTransceiverDelegate Info) Preparing message: 4, type: GetNcpFirmwareVersion
12:55:58: (MeshSetupTransceiverDelegate Info) Sending message: 4
12:55:58: (BluetoothConnection Info) Sent data: 16 Bytes
12:56:09: (BluetoothConnection Info) Bytes received from: 6FA90003-5C4E-48A8-94F4-8030546F36FC, 16 Bytes
12:56:09: (MeshSetupFlow Info) targetDevice.sendGetNcpFirmwareVersion: Invalid state, version: Optional(""), moduleVersion: Optional(0)
12:56:09: (MeshSetupBluetoothConnectionManager Info) Dropping all BLE connections...
12:56:09: (MeshSetupFlow Info) error: Device is in invalid state, please reset the device and start again., nsError: nil
12:56:09: (MeshSetupBluetoothConnectionManager Info) Disconnected from: Argon-2B63PH
12:56:13: (MeshSetupBluetoothConnectionManager Info) Dropping all BLE connections...
12:56:13: (Particle.DeviceListViewController Info) Load devices started
12:56:13: (ParticleCloud Info) GET /v1/devices
12:56:13: (ParticleCloud Info) /v1/devices (200)
12:56:13: (ParticleCloud Debug) (

Performing a full reset of the device will reset the flag back–causing it to go into listening mode. You’ll need to re-run the application above to set this flag again.

There appears to be something funky going on with the mobile application setup.

Have you attempted to follow the instructions for Mesh setup over USB? USB setup seems to be the most reliable alternative for when mobile setup is having difficulties.

This happened to me even after going through the app setup but the dct_write_app_data fix worked. Thanks.

1 Like

The mobile setup doesn’t work on two phones producing the same error. Both work while setting up different devices.

Following the USB setup instructions didn’t go well. I wasn’t able to flash the ncp firmware.

particle flash --serial /Users/*USER*/Downloads/argon-ncp-firmware-0.0.5-ota.bin 
! PROTIP: Hold the SETUP button on your device until it blinks blue!
? Press ENTER when your device is blinking BLUE 
sending file: /Users/*USER*/Downloads/argon-ncp-firmware-0.0.5-ota.bin
Error writing firmware: Transfer cancelled

Any more ideas to try?

Can't say I've ever had precedent for this one. However, to take a best guess: Considering the fact that neither phone worked for your device but they work for other devices and that CLI is failing as well, it seems to indicate an issue with that specific device. I'd ballpark either flash or write protection issues.

Feel free to file a support ticket referencing this post and providing the device ID. We'll be sure to get you taken are of. :slight_smile:

I seem to have this issue with the device I’ve been battling with related to the Music Maker app/library. I’ve tried upgrading, downgrading, crossgrading (ha!) and it’s likely a mess. However, it’s current reporting the firmware is 1.5.0 – likely the result of particle update. Every time I push reset, it goes into Listening mode and stays there. If I select the device in the Particle app and click on the gear and then WiFi, it pairs right away and then goes online. However, if I push the Reset button, it’s back into Listening mode. It seems it can’t remember its WiFi credentials.

I gotta say that I haven’t a clue as to how to do a “factory reset” on the device to get it back into a known state. Having said that, here’s the output from particle serial inspect:

Platform: 12 - Argon
Modules
  Bootloader module #0 - version 501, main location, 49152 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 1102
  System module #1 - version 1502, main location, 671744 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      Bootloader module #0 - version 501
      Radio stack module #0 - version 202
  User module #1 - version 5, main location, 131072 bytes max size
    UUID: 72B73BFAB5C902DBE9EC90A13958C90408C6FA4758B9F9C5CFB5100141C1C58B
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 326
  NCP module #0 - version 5, main location, 1536000 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  Radio stack module #0 - version 202, main location, 192512 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS

Since I started down this path with the Music Maker library/app, I’ve encountered the most frustration ever with a Particle device, this being the most recent issue. I have dozen’s of devices in the field running a dozen different apps and yet this sucker seems determined to do me in. I’m too stubborn to throw in the towel, but it’s exhausting me.

FWIW…I created a simple program based upon the above code (including the SYSTEM_MODE(MANUAL)), flashed it to the device and the issue of going into Listening Mode upon reset/power up has been resolved. Thanks for the earlier post!

I was delighted to find this post! I have been trying to help a student for weeks with this problem (it has been hard to diagnose remotely due to COVID). The Argon would go into listening mode every time it was flashed, and the Wifi credentials would need to be entered manually.

I thought it was laptop or Argon issues, but after swapping both of those, I tried the solution on this page and it worked. I think the problem was there was an issue with the setup process between the student’s phone and the Argon (happened with two different Argons).

I’m summarizing the fixes on this page into exactly what I did in case it helps anyone else.

Step 1: Get device breathing cyan so you can flash it

  • Put device into listening mode (dark blue)
  • Open CLI and run particle serial wifi
  • Enter Wifi credentials

Step 2: Flash code to reset device setup
Paste this code into a project and flash

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

SYSTEM_MODE(MANUAL);

void setup() {
  const uint8_t val = 0x01;
  dct_write_app_data(&val, DCT_SETUP_DONE_OFFSET, 1);
}
void loop () {}

Step 3: Re-flash Tinker

  • Put device into DFU mode (yellow)
  • Open CLI and run particle flash --usb tinker

Step 4: Setup Wifi Credentials

  • Put device into listening mode (dark blue)
  • Open CLI and run particle serial wifi
  • Enter Wifi credentials

Thanks @mstanley and @ScruffR!

1 Like

Since then there has also been an option added to CLI in order to set the “setup done” flag

particle usb setup-done

This way you won’t need to flash the code above.

3 Likes

Didn’t know about this new CLI command, USB. Love it!!!

1 Like