Boron Cellular Signal

Hi,
I’m trying to pull the cellular signal information to show in my Android app. What is is the best approach to do this? I’m not looking to get the dBm information but just as it is console Poor, Fair, Good, etc.

If not possible to get the String value, would you guys be able to share the calculation behind these values? I hope this makes sense.

image

Getting the device vitals into your Android app would only be an indirect approach.
A more direct one would be to use Cellular.RSSI() and expose that reading directly by means of any of Particle.variable(), Particle.publish() or even Particle.function().

For the categorisation of the numeric values you could do a forum search.
I know there was an answer to a very similar question already :wink:

Got it. Thanks. I’ll keep looking.

I happened to find it

Perfect!

@ScruffR

Here is my code after some modification

void system_display_rssi() {
 
    int rssi = 0;
 
#if Wiring_WiFi == 1
    rssi = WiFi.RSSI();
#elif Wiring_Cellular == 1
    CellularSignal sig = Cellular.RSSI();
    rssi = sig.rssi;
#endif
    if (rssi < 0) {
    if  (rssi >= -57) {
        SG = 5 ;
    }else if(rssi > -68) {
        SG = 4;
    }else if (rssi > -80) {
        SG = 3;
    }else if (rssi > -92) {
        SG = 2;
    }else if (rssi > -104){
        SG = 1;
    }
}

It works fine on a Argon with code v1.3.0-rc.1 but a get a rssi value of 31 on Boron with v1.3.0-rc.1 code.

Any thoughts?

Is this a 2G/3G or an LTE Boron?

I know there were issues in the past, but they shouldn't be present in the more recent versions.
You could try this tho'

This is LTE Boron. Got it working. Thanks again.

As a reference for any one else I also found it here https://docs.particle.io/reference/device-os/firmware/boron/#cellularsignal-class

1 Like