Electron entering listening mode when not able to connect

Nope, still:

particle identify

Your device id is undefined
Your system firmware version is undefined

But hey! Jumping to "listening mode" stopped! So now

particle identify

does not work.

It does not block me, but I would like to understand why it does not work (it definitely worked on my other US version of Electron). Also I would like to know why suddenly "jump to listening mode" is not happening.

Regards

Maybe try a differen USB cable and port.
If you are using Windows try to remove the COM drivers for the device and let Windows re-apply the USB Serial drivers.

Nope - no change when swapping the USB port. And that is ok, because DFU works (can load user apps), serial communication works (user code can Serial.print() ). So, USB is ok.

Interesting that I could not find that error message "Your device id is undefined"

particle-cli

sources (GitHub - particle-iot/particle-cli: Command Line Interface for Particle Cloud and devices).

Where does it come from?

False alarm - found it in the CLI sources:

commands/SerialCommand.js:317: console.log('Your device id is', chalk.bold.cyan(data.id));
commands/SerialCommand.js:326: console.log('Your device id is', chalk.bold.cyan(data));

No idea, and as said earlier, it shouldn't happen.

But some more things you can try.
You can put your device into Listenin Mode again and post the output of particle serial inspect

If you feel adventerous you could go an download the system binaries for 0.8.0-rc.2 from here
and flash these via DFU Mode

particle flash --usb system-part1-0.8.0-rc.2-electron.bin
particle flash --usb system-part2-0.8.0-rc.2-electron.bin
particle flash --usb system-part3-0.8.0-rc.2-electron.bin

and then in Listening Mode flash the bootloader from here

particle flash --serial bootloader-0.8.0-rc.1-electron.bin
1 Like

The most common reason for an undefined device ID is that the firmware on the device is interfering with the listening mode commands. If you have SYSTEM_THREAD(ENABLED) your code will run at the same time as listening mode, and if, for example, you’re constantly writing out data by USB serial, you could interfere with the output from listening mode. Blocking loop can also cause problems.

The easiest workaround is to go into safe listening mode. Go into safe mode by holding down RESET and MODE, release RESET and hold mode until the status LED blinks magenta, then release MODE. Wait until the status LED breathes magenta, then hold down MODE until the status LED blinks dark blue (listening mode).

Of you can flash tinker to your device in DFU mode (blinking yellow).

4 Likes

Ok, finaly:

Your system firmware version is 0.6.4

What I did was flashing tinker instead of my user application. So, @rickkas7 was right - it had to do with the traffic over USB (my code does send some debug input).

Important is (at least I did not know that) that particle identify works only in "listening mode". In the application running mode (breathing white) it will say that the version is undefined.

Thank you @rickkas7 and @ScruffR for taking time and helping me with the issue.

1 Like

Next time I have an issue (where the system firmware is a suspect) - I will definitely give a try to release candidate 0.8.0 as you suggested, before posting here.

Once again - thanks for helping me!

1 Like

Hello everyone! I am experiencing problems on connecting an electron to the cloud. To explain better, I had 2 electrons and both of them were offline since 1 year. I powered up the first one with the SIM card of the second (my error, I did not check numbers).
Immediately I have seen in the particle dashboard that the electron and the SIM card went online, but the strange thing was that I was not able to call functions on the electron from the particle cloud. So I decided to connect it via USB and use the CLI to “particle update” and flash a new user firmware, just changing the name of the particle functions. The firmware are only a couple of lines of code, no system mode changes or thread enabled,(just a loop with particle.publish every 5 seconds)
Doing so, the electron is no more able to connect to the cloud: it remains breathing white, and after about 25/30 seconds it goes to breathing blue. Then, after 30 seconds, it starts blinking blue. Then after 2/5 minutes, again breathing blue.

I tried doing so:

DFU mode
"particle update"
(firmwares updates, but still the problem)

“particle flash --usb tinker”
(loads firmware but problems remains)

Not able to call “particle identify”, because I cannot enter in safe mode as the electron is disconnected.

“particle device doctor”
(followed procedure, when done, electron is not able to connect).

“particle keys server”
"particle doctor " (electron ID got from cloud dashboard)

tried with changing sim with the other electron.

Nothing happens, the electron does not want to connect with the cloud…

Tried all these steps again with a personal very simple firmware or tinker but problem still here.

I also tried to push quickly the mode button to check how many signal blinks are available, but nothing happens as Electron is not breathing cyan but white…

Do anyone have a solution? I do not think it is a hardware problem, is there a way to check it?

What version does particle identify (in Listening Mode) report now?

Can you also post the output of particle serial inspect?

Hello, thanks for the reply. Yesterday night I tried and tried everything (obviously also switching off and on the electron), and before going to bed quite hungry I checked twice and nothing was working: particle identify was reporting ! serial: Serial timed out. Today, when I went back home from work, I’ve powered the electron and in a few seconds it connected to the cloud. Actually I did nothing. When I put it in listening mode, everything works, firmware is 0.6.4 (correct) and particle serial inspect gives:

Platform: 10 - Electron
Modules
  Bootloader module #0 - version 11, main location, 16384 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 110, main location, 131072 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #3 - version 110
  System module #2 - version 110, main location, 131072 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 110
  System module #3 - version 110, main location, 131072 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  User module #1 - version 3, main location, 131072 bytes max size
    UUID: 6B38...F8
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 10
  User module #1 - version 3, factory location, 131072 bytes max size
    UUID: 6B38...F8
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 10

Well, I am a bit surprised…
So, after checking this commands with the particle cli, I hit the reset button and the electron connected again to the cloud.

I just waited 5 minutes doing nothing else. I hit the reset button again to see if it magically was working fine and everithing went ad the night before: This is the terminal, just called particle identify, the electron cannot enter in listening mode, it just stay white breathing, after 2 minutes breathing Blue, after 30 seconds blinking blue:
I am not sure this is the real listening mode…

MG-iMac:~ Marco$ particle identify

! serial: Serial timed out
MG-iMac:~ Marco$ particle serial inspect

! serial: SyntaxError: Unexpected end of JSON input
MG-iMac:~ Marco$

I finally wrote a user firmware with SYSTEM_MODE(MANUAL); and SYSTEM_THREAD(ENABLED);

Then in the loop: Cellular.listen();

Then, from CLI, calling Particle serial inspect, the response is:

serial: SyntaxError: Unexpected end of JSON input

particle identify gives:

Your device id is undefined
Unable to determine system firmware version

Any idea?

Can you try with a serial terminal program and sending the letter v - this should return the firmware version too.
If you want to use functions that require the cellular module with SYSTEM_MODE(MANUAL) you should call Cellular.on() as first step.

Hello, this is the code I flashed inside the electron:

// Test Program
SYSTEM_MODE(MANUAL);

// Enable Threads
SYSTEM_THREAD(ENABLED);

// A FuelGauge named 'fuel' for checking on the battery state
FuelGauge fuel;

void setup() {

  Serial.begin(9600);
  delay(5000);
  Serial.printlnf("Electron initialation done.");
}

void loop() {

  Serial.printlnf("System version: %s", System.version().c_str());

  uint32_t freemem = System.freeMemory();
  Serial.print("free memory: ");
  Serial.println(freemem);

  Serial.println("V Bat:" + String::format("%.2f",fuel.getVCell()) + ", SoC: " + String::format("%.2f",fuel.getSoC()));
  delay(5000);

  //Cellular.listen();

  Cellular.on();
  Cellular.connect();

  if (Cellular.ready()) {
    Serial.println("Cellular Ready");
  }

  CellularSignal sig = Cellular.RSSI();
  Serial.println(sig.rssi);
  Serial.println(sig.qual);
  Serial.println(sig);

  CellularBand band_avail;
  if (Cellular.getBandSelect(band_avail)) {
    Serial.print("Available bands: ");
    for (int x=0; x<band_avail.count; x++) {
        Serial.printf("%d", band_avail.band[x]);
        if (x+1 < band_avail.count) Serial.printf(",");
    }
    Serial.println();
  } else {
    Serial.printlnf("Bands available not retrieved from the modem!");
  }

  if (Particle.connected() == false) {
    Serial.println("Connecting to particle cloud");
    Particle.connect();
  }

}

The serial monitor shows:

Electron initialation done.
System version: 0.6.4
free memory: 98760
V Bat:4.08, SoC: 94.97
0
0
0,0
Bands available not retrieved from the modem!
Connecting to particle cloud

So the system firmware is the 0.6.4
By the way, the serial monitor output stops until the electron start blinking blue.

After the Cellular.connect() call you may want to add a waitUntil(Cellular.ready) or waitFor(Cellular.ready, 60000) call to ensure the connection is established before you proceed and only execute Cellular.on()/Cellular.connect() in case Cellular.ready() != true.

OK, I changed the code:

if (Cellular.ready()) {
    Serial.println("Cellular is already Ready!");
  } else {
    Serial.println("Turning ON Cellular and connecting...");
    Cellular.on();
    Cellular.connect();
  }

  waitFor(Cellular.ready, 60000);

  if (Cellular.ready()) {
    Serial.println("Cellular Ready");
  } else {
    Serial.println("Cellular NOT Ready");
  }

the serial output is:

    Electron initialation done.
    System version: 0.6.4
    free memory: 98760
    V Bat:4.08, SoC: 94.97
    Turning ON Cellular and connecting...
    Cellular NOT Ready
    0
    0
    0,0
    Bands available not retrieved from the modem!

Then the electron enters in Breathing dark blue, and after 30 seconds, blinking dark blue…
After all, I am seriously thinking there is a HW problem with the cellular module… It is strange because this electron has always been indoor and it has been used only a couple of days before…

Obviously your device can’t connect to the cellular network in the allowed 60 seconds.
You could try to increas that to 5 minutes (300000ms).

But maybe it’s a problem with the SIM card.
First go to https://console.particle.io/sims to check your SIM is actually active.
If so, it might be an issue with the contact.
For that you can take it out, give the metal bracket on the SIM holder a gentle push to exhert more pressure on the SIM and try again.
If this doesn’t help, you can try to gently pull up the the metal prongs that should make contact with the SIM pads.

Yep, tried everything but the electron is still never flashing green (so not trying to connect to the cellular network).
The sim is active and correctly working if I put it on another electron…

To get some extra info on the reason for the issue, you could flash the code provided here and post the output

If this doesn’t reaveal anything you may need to file a support ticket

Well, finally I run the special code for debugging and the serial monitor, after the first check, said:
No reply from Modem ... Sim not inserted.

Even if the sim is inserted correctly and all pins are ok, it seems the cellular modules does not detect the sim. So, as an hardware fault, it is very likely that I will not be able to use this electron any more, except for offline tasks. I am a bit desolate :sob: but this is the real life…
Thanks for the help, anyway I learned how to find this kind of problems.:wink:

3 Likes