Imp.rssi()

I had been doing this to display RSSI on my LCD for a while, and it stopped working at some point…
screen.set1(format("2:%.2fF %ddBm",probe2temp, imp.rssi()));
I get 0dBm now.

I had a funny experience as well. By restarting code, the imp didn’t want to
execute. It was solved by recycling power.
I don’t know if it is related.

Try adding a small time delay or log something to the server prior to reading the RSSI. I recall also getting a reading of zero a while back and I think I was trying to read it before it had a chance to figure out how strong the wireless signal is. I was using deep sleep, and reading the RSSI shortly after wakup, so it had only been booted for a couple seconds.

It returns zero if Wifi is currently disconnected, which will be the case after deep sleep unless something in the code has explicitly reconnected (such as server.log).

In this diagram, imp.rssi() is zero whenever the imp is in the ACTIVE-OFFLINE state: http://electricimp.com/docs/resources/wifistatediagram/

Peter

Oh wow. I am an IDIOT. :slight_smile: Thanks Peter.