1

i am using esp32 for getting the rssi values from esp 32 using Arduino IDE.

MY CODE

#include "WiFi.h"

void setup() {
  Serial.begin(115200);

  // Set WiFi to station mode and disconnect from an AP if it was previously connected
  WiFi.mode(WIFI_STA);
  WiFi.disconnect();
  delay(100);

  Serial.println("Setup done");
}

void loop() {
  Serial.println("scan start");

  // WiFi.scanNetworks will return the number of networks found
  int n = WiFi.scanNetworks();
  Serial.println("scan done");
  if (n == 0) {
      Serial.println("no networks found");
  } else {
    Serial.print(n);
    Serial.println(" networks found");
    for (int i = 0; i < n; ++i) {
      // Print SSID and RSSI for each network found
      Serial.print(i + 1);
      Serial.print(": ");
      Serial.print(WiFi.SSID(i));
      Serial.print(" (");
      Serial.print(WiFi.RSSI(i));
      Serial.print(")");
      Serial.println((WiFi.encryptionType(i) == WIFI_AUTH_OPEN)?" ":"*");
      delay(10);
    }
  }
  Serial.println("");

  // Wait a bit before scanning again
  delay(5000);
}

PROBLEM I want to export the values of RSSI from the serial monitor into excel. I have used PLX DAQ ( I found this as a frequent solution on the internet) but this does not work in my case it gives an error that port is unavailable or check your port. (I have checked COM it was correct) I tried using excel data streamer using the same Arduino script but nothing appear on the sheet. the data columns were empty do I have to change the script? if yes what change? the excel sheet should have three columns TIMESTAMP,SSID(WIFI NAME), RSSI.

THANKS IN ADVANCE.

3
  • reduce your code to only print "hello world" to the serial monitor – jsotola Apr 21 at 19:36
  • I want to export the values ... is not a description of a problem .... the excel sheet should have ... is not a description of the problem either .... port is unavailable is a description of the problem .... focus on that ... forget about excel until the comm port is available – jsotola Apr 21 at 20:03
  • Just to check: You made sure to close the Serial Monitor before trying to connect the other program to the com port, right? – chrisl Apr 21 at 22:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.