Electron Can't get listening mode anymore

I need to run not connected to the cloud so I was testing threaded and mode. I added the following two lines to the top of “Blink an LED” and flashed it over the serial line.
SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(SEMI_AUTOMATIC);

Now when I power on the device it flashes the “Cellular Off”, but when I press and hold the mode button it switches to “Cellular Module not connected” instead of “Listening Mode”. So it fails when I try to update using the serial connection.

Running firmware 0.6.0 (also how do I update to 0.6.4, the firmware manager link is just 6.0?)

Have you got most recent CLI installed?
If so just use particle update in DFU Mode

Other ways to switch into Listening Mode

  • enter Safe Mode and then use SETUP/MODE to enter LM
  • add a feature to your code that calls Cellular.listen()
  • remove the SIM (a subsequent connection attempt - e.g. via Safe Mode - would enter LM)
  • set the baudrate of the serial port from your PC to 28800 (in Windows via mode COMx 28800)

To address your original issue, you may need to call Cellular.on() to power up the cellular module before entering LM.

1 Like

Yes I have CLI installed, that is how I am flashing over serial. When you say udate in DFU mode is that for the firmware update? I can’t find any good instructions on using DFU mode just vague references.

I tried your methods to enter Listening Mode and couldn’t get any to work. Is there a way to wipe the code from button presses?
> enter Safe Mode and then use SETUP/MODE to enter LM

Can’t get into save mode, can only move from “Cellular Off” to “Listening Mode”
> add a feature to your code that calls Cellular.listen()

Would love to, but can’t add Cellualr.Listen() if I can’t flash the chip.
> remove the SIM (a subsequent connection attempt - e.g. via Safe Mode - would enter LM)

Removed the chip but couldn’t get it to go into safe mode or anything else.
> set the baudrate of the serial port from your PC to 28800 (in Windows via mode COMx 28800)

Ran “mode COM6 28800” and changed the baud rate. ran “particle flash --serial xx.bin” but is failed and no listening mode was triggered.

Obviously hidden too got at this location
https://docs.particle.io/guide/getting-started/modes/photon/#dfu-mode-device-firmware-upgrade-
https://docs.particle.io/reference/cli/#flashing-a-known-app

I guess so, when one considers that I quoted that question of yours just before providing the respective answer

How did you try? Post a video of the process.
While you are at it, also post a video of trying to get into LM via SETUP.

DFU Mode also allows to flash user application firmware via particle flash --usb <firmware.bin>

Failed to flash my code in DFU mode. After flashing yellow I ran “particle flash --usb xx.bin”. Error - “I was unable to detect any devices in DFU mode…”

I did get it to go into Safe Mode this time, I just didn’t wait long enough. Yea! I can progress now.

Upgrading the Firmware
The “particle firmware manager” is awesome, just wish I could assign the firmware to use.

Yes, there are good instructions on putting it in DFL mode, but no step instructions on updating firmware using DFL in https://docs.particle.io/reference/cli/. Or do I use dfu-util. Neither lists the following:

To Update the firmware

  1. Go here ??? for the latest compiled firmware files.
  2. Put your device in DFL mode.
  3. In the (CLI or dfu-util.exe) run ??? to push new firmware to the device.

I guess you are missing DFU drivers then.

You could use the CLI Windows Installer
https://binaries.particle.io/cli/installer/windows/ParticleCLISetup.exe

Or via zadig
http://zadig.akeo.ie/

To update the system firmware you’d use the command I provided before

particle update

(documented here https://docs.particle.io/reference/cli/#particle-update)

And to update the user firmware the other one I provided

particle flash --usb <firmware.bin>

(documented here https://docs.particle.io/reference/cli/#particle-flash - reading the whole chapter will help understanding the command)

In this part you get a step-by-step instruction to build and flash your code via CLI
https://docs.particle.io/reference/cli/#compiling-remotely-and-flashing-locally
If you only need some steps (e.g. compiling) you just use the ones you need.

I installed everything using ParticleCLISetup.exe before, but reinstalled the USB drivers again to no avail. So I tried the Zadig instructions from here https://docs.particle.io/faq/particle-tools/installing-dfu-util/core/#installation-windows.
Zadig fails to see the device even though it shows up in the device manager. (see Pic)

Under “Options” in the menu bar you need to tick “List All Devices” and then select the correct device in the dropdown list.

It’s also safer to use an USB 2.0 port and avoid USB 3.0 if you can.
Also make sure the device is blinking yellow at the time.
If this still fails try swapping the USB cable.

Thanks that worked great!

1 Like