Stuck in listening mode Argon


#1

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?


#2

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.


#3

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?


#4

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);


#5

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.


#6

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.


#7

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.


#8

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?


#9

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?


#10

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.


#11

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) (

#12

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.


#13

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


#14

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?


#15

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: