LED Flashing Fast Cyan on Electron w/AT&T SIM

I am not sure what this means. When I initially connect the Electron works fine. After a few minutes I lose connectivity and the Electron will start blinking fast cyan.

Also, sometimes I see it blinking fast green as well, and then back to flashing cyan.

What would this mean?

1 Like

I guess you haven’t set Particle.keepAlive() in your code to keep the connection open.

I have… KeepAlive is set to 20…

There might be other issues in your code that cause this.

Rapid cyan means that the connection to the cloud dropped out, which can be due to starving the system tasks of µC time.
Rapid green means that you even lost connection to the cell towers and these need to be reestablished.

Seeing your code might help locate possible causes for this behaviour.

Here is the code in the loop function:
The ReadTemperature will get executed about every 30 seconds

void loop() {
   nexLoop(nex_listen_list);
   Blynk.run();

   if (Particle.connected() == false) Particle.connect();

   //Read Temperature
   if(tempReadCounter == 0)
    {
      readTemperature();
      tempReadCounter = TEMP_READ_COUNTER_SET;
    }
    tempReadCounter --;
 }

This should rather be something like

  if (!Particle.connected())  {
    Particle.connect();
    waitFor(Particle.connected, 300000);
  }

Since Partilce.connect() isn't a blocking call you will keep knocking the ongoing connection process back to the beginning each time you come round in loop()

Also readTemperature() is not visible in your snippet, so it's impossible to tell whether this also contains problematic code.

2 Likes

I added your code from above and it seems to be working much better. I will run it overnight and see how it does over 24 hours, or so.

Can you explain the line waitFor(Particle.connected, 300000);

Thanks…

@tcontrada, that line will essentially block until Particle.connected() becomes true, ie you have cloud connection, or 300,000ms (5 minutes) elapses. The 5 minutes is the recommended time for waiting on an Electron to connect. Any shorter and it might not have time to finish the process. :wink:

1 Like

OK, seems like a long time, but thanks for the info!

Again, I will run a long test tonight and see how it goes.

I would see particle connect times range all over the place from almost instantly to min's before connecting. There is no rime or reason to it.

The Electron will automatically reset the Modem if it does not connect in 10 mins if I remember correctly.

The quickest reconnection times I have seen is pushing data to Ubidots via their UDP / MQTT library. As long as your sending the data within the 23 min ping times where no reconnection process needed then my Electron would wake up, send data to Ubidots, and then back to sleep in like 1 to 2 seconds. When Particle Publishing it would usually be longer and sometimes much much longer for some reason.

1 Like

@ScruffR that 20 = 20 mins?

@tcontrada once you have this up and running smoothly it would be nice to confirm that the a 20 min KeepAlive on the ATT IOT data plan is a solid keep alive number since it's really close to Particles 23 min KeepAlive Ping rates.

Particle.keepAlive() takes seconds, so I'd assume @tcontrada has set 20 and not 20 * 60 when he said that.

Yes, 20 seconds is what I have.

But now I have another question about the Particle cloud.
If I am only using the Blynk application and not sending any data to the Particle cloud, do I even need to connect to the particle cloud?

Thanks…

I don't think Blynk uses the Particle cloud as transport, so you should be good without it.
If you don't use any of the Particle features (including OTA updates) you can opt for SYSTEM_MODE(SEMI_AUTOMATIC) (or MANUAL) and only call Cellular.connect() and wait for Cellular.ready() but currently you need to keep this issue in mind

1 Like

I will have to experiment with your suggestion. But for now I only have one electron module which is tied up in a demo prototype that I don’t want to make too many mods.

I think we may order another Electron to try different things. Is there a way to order the Electron Without the IoT kit, just the module itself?

Thanks…

I don’t think the naked Electron is available for sale.
But you’d need the LiPo and an antenna anyway and you won’t save a lot on the breadboard, the cable and the few components of the Dev Kit.
So I’d just go for the Dev Kit.