Green light flashing using pda.bell.ca APN and cellular_credentials_set

Hey everyone,

I just got a particle electron and I’m using a 3rd party SIM. The problem is that it is stuck in flashing green mode.

I’m in Canada, provider is Bell Mobility.

APN: pda.bell.ca

Followed the setup.particle.io process -> flashed with the custom firmware. Particle successfully connects and registers it. It flashes a very fast cyan at the end (I believe that means it works). When I power cycle and upload my code, it gets stuck in the flashing green mode.

As you can see I have the “cellular_credentials_set” line at the top.

My CLI command:

particle compile electron serial-test.ino --saveTo serial-test2-firmware.bin && particle flash --serial serial-test2-firmware.bin

Below is the code I have:

 #include "cellular_hal.h"
STARTUP(cellular_credentials_set("pda.bell.ca", "", "", NULL));

void setup()
{

  pinMode(D7, OUTPUT);
  digitalWrite(D7, HIGH);

  Serial.begin();

}


void loop()
{

  if(Cellular.ready()){
    Serial.println("Connected to cell network");
    if(Particle.connected())
    {
      Particle.publish("Connected to cell network!");
    }
  }
  else
  {
    Serial.println("Not connected to cell network");

  }

  if(Particle.connected())
  {
    while(1){
      Particle.publish("ledstatus","ON");
      Serial.println("Turn on LED");
      digitalWrite(D7, HIGH);
      delay(1000);
      Particle.publish("ledstatus","OFF");
      Serial.println("Turn off LED");
      digitalWrite(D7,LOW);
      delay(1000);
      Particle.process();

    }
  }
  else
    Particle.connect();

}

What should I do?

I had a similar situation because a sim pin was defined…

You should not keep calling Particle.connect() that frequently.
Change that bit for something like

  ...
  else 
  {
    Particle.connect();
    waitUntil(Particle.connected);
  }

Hey neurotrade could you clarify what you mean by a defined sim pin?

@ScruffR Ok I can remove it.

I got it to work last week by doing a firmware upgrade:

particle update

However it doesn’t work this week…

If you buy a sim card there is normaly a sim pin number defined.

Bud if id allready worked last week with the same sim card the sim pin can’t be the problem.

I’d always recommend to flash via DFU Mode and

particle flash --usb <your.bin>

rather than via --serial since the success message even appears when the code didn’t stick.

1 Like

Hi I’m sorry I forgot to reply.

The problem was I changed the bin filename in my compile command and not in the flash command string; so it kept uploading old code… lol silly mistake.

Here is my working command string for reference. It compiles the code, uploads to the device using @ScruffR’s suggestion and opens a PuTTY terminal for some Serial comms.

particle compile electron ModbusTempSender --saveTo ModbusTempSender/BUILD/debug/firmware.bin && particle flash --usb ModbusTempSender/BUILD/debug/firmware.bin && SLEEP 2 && ModbusTempSender/putty.exe -load "ModbusTempSender"
1 Like