Boron booting up with solid green LED

Hello,

I tried to post in the troubleshooting forum but am unable to create a new topic there.

We are using a Boron as a modem in a larger data acquisition system. The Boron receives data from another device over a serial connection, uploads it, and returns a timestamp to the other device. Complete code is below.

We have a lipo battery plugged into the Boron and are also giving it regulated 5V on the USB power pin.

The system worked correctly while testing for much of two months, but has failed after field deployment (as always :sweat_smile:). Now, upon powering up, the status LED immediately goes to solid green and stays there.

Am I correct in thinking that this is likely a hardware failure? My current plan is to replace the Boron with another one, on the hunch that the board got damaged in transit. The unit is in a fairly remote location, and so we ideally need to solve this problem without a bunch of trips there and back. I appreciate any insight or comments…

Thanks,
Daniel

#include "Particle.h"

SYSTEM_THREAD(ENABLED);
String data = "";

void setup() {
    Serial1.begin(9600);
    Serial.begin(9600);
    waitFor(Time.isValid, 60000);
}

void loop() {
    while(Serial1.available() > 0){
        char r = Serial1.read();
        
        data += r;
        
        if(r == '\n'){
            Serial.print(data);
            Particle.publish("sensors", data, PRIVATE);
            data = "";
            
            if(Time.isValid()){
                Serial1.println(Time.timeStr());
                Serial.println(Time.timeStr());
            }
        }
    }
}

Hi Daniel -

Sorry for the confusion about the troubleshooting category- it’s a legacy category that is primarily read-only now since most of the troubleshooting questions are a better fit for other categories. We’ve considered hiding the category but there are a lot of useful posts in it so have kept it up. I’ve added a pinned post there to help clarify things and avoid future confusion.

Now, onto the real problem! Usually when the led is a solid color that indicates a bug. Solid green means that it encountered the issue while having difficulty with connecting to the cloud. Has your code changed at all since it last worked? The loop looks like it may be blocked from returning. Take a look at the docs and try following the steps for blocked loops.

It could also mean damaged hardware, as you suspect. Can you DM me the device ID so I could check out the vitals?

Thanks,
Colleen

Hello,

Thanks for the reply! The code hasn’t changed since testing.

I was under the impression that with system threading turned on blocking in the loop shouldn’t be a problem for network communications - am I misunderstanding perhaps?

I’m sorry, I’m having trouble finding the button to send a DM on your profile; would you mind sending me a note and I’ll reply with the ID? Thanks again for replying so quickly, I really appreciate it.

My guess is, in that remote location, the device is not connecting to the cloud (for whatever reason) and your firmware essentially locks up (solid green), as @Colleen mentioned:
https://docs.particle.io/tutorials/device-os/led/boron/

If you are not connecting to the cloud then your Time.isValid will also be false, forever.

You should check for a proper cloud connection before Particle.publish() or you will block.
https://docs.particle.io/reference/device-os/firmware/#particle-publish-
If the cloud connection is turned on and trying to connect to the cloud unsuccessfully, Particle.publish() may block for up to 20 seconds (normal conditions) to 10 minutes (unusual conditions). Checking Particle.connected() can before calling Particle.publish() can help prevent this.

Try something like this:

if (Particle.connected()) {
  Particle.publish("sensors", data, PRIVATE);
  delay(1000);
}

I changed your code a bit to attempt to retry connection to the cloud. I have not tested this. But, this should be food for thought, at the least:

#include "Particle.h"

SYSTEM_MODE(SEMI_AUTOMATIC);//add this line and change code below accordingly          
SYSTEM_THREAD(ENABLED);
String data = "";

void setup() {
    Serial1.begin(9600);
    Serial.begin(9600);
    //waitFor(Time.isValid, 60000); commented out
}

void loop() {//will NOT be connected to cloud first time thru loop()
    if (Particle.connected()) {// Time should now be valid
      while(Serial1.available() > 0){
          char r = Serial1.read();
          
          data += r;
          
          if(r == '\n'){
              Serial.print(data);
              Particle.publish("sensors", data, PRIVATE);
              delay(1000);//added this delay after publish
              data = "";
              
              if(Time.isValid()){
                  Serial1.println(Time.timeStr());
                  Serial.println(Time.timeStr());
              }
          }
      }
    } else {
      Particle.connect();
      waitFor(Particle.connected, 660000); // wait up to 11 minutes for Cellular to come back
      //https://community.particle.io/t/intermittent-connection-timeouts-looking-for-advice/61471/3
    }
}
1 Like

Thanks for the suggestions, robc! We’ve brought the system back to the lab and will be troubleshooting this week. If it turns out that connectivity is the issue I’ll see if that change helps.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.