Signal strength wifi


#1

Hello community.
as part of a small project requiring a strong signal.
For a NODEMCU how to insert the function RSSI.
I tried without success.
this part of code that does not work!

// # define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#include <CayenneMQTTESP8266.h>

// WiFi network info.
char ssid [] = "............";
char wifiPassword [] = ".....................";

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username [] = "..............";
char password [] = "....................";
char clientID [] = "................";

#define VIRTUAL_CHANNEL 0 // RSSI
long rssi = WiFi.RSSI ();

void setup ()
{
   Serial.begin (9600);
   Cayenne.begin (username, password, clientID, ssid, wifiPassword);
}
void loop ()
{
   Cayenne.loop ();
  {

CAYENNE_OUT (0)
{
   Cayenne.virtualWrite (0, RSSI, "RSSI", "dbm"); delay (2000);
}

thank you in advance.


#2

@zanni.robert you can try this code excluding the oled code https://github.com/wifijt/SSID_RSSI_BSS_OLED


#3

Bonjour shramiksalgaonkar.
I will try to clean the code.
THANK YOU
Robert