Electron entering listening mode when not able to connect

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

I have the same problem, my electron doesnĀ“t connect to the cellular tower and going to listening mode after 30 seconds mor or les, i donĀ“t know why this ocurred.