Power rssi value


#1

hello

what is the value of power rssi ?
-71 dBm is this high or not
thanlks


#2

That is good.
See this: https://electricimp.com/docs/api/imp/rssi/

The rssi method is deprecated, but it does show the signal strength.

To view Imp boot info when it starts, put the code below at the end of your imp device:
(You can add many other things to the info as well) …

// Boot device information functions
function bootMessage() {
local netData = imp.net.info();
if ("active" in netData) {
    // We have an active network connection
    local ip = netData.ipv4.address;
    local type = netData.interface[netData.active].type;
    local strength = netData.interface[netData.active].rssi;
    server.log("The imp has IP address " + ip + " and is connected via " + type);
    local bars=0;
       if(strength < -82){
            bars=1;
        }
       if(strength < -77){
            bars=2;
        }
       if(strength < -72){
            bars=3;
        }
       if(strength < -67){
            bars=4;
        }
        if(strength < 0){
            bars=5;
        }
    server.log("Signal Strength: " + bars + " Bars");
    if (netData.interface.len() > 1) {
        // The imp has more than one possible network interface
        // so note the second, disconnected one
        local altType = "";
        if (netData.active == 0) {
            altType = netData.interface[1].type;
        } else {
            altType = netData.interface[0].type;
        }
        
        server.log("(It can also connect via " + altType + ")");
    }
} else {
    server.log("The imp is not connected");
}
}

// Present device information on boot
bootMessage();