ESP32 compiler not locating library file: ESP-WiFiSettings

Platform: Ubuntu Linux 20.04 LTS running IDE 1.8.19

Compiler cannot locate "ESP-WiFiSettings.h" even though it is present in the library. I included a screenshot of library:

type  #include <SPI.h>
    #include <ESP-WiFiSettings.h>
    #include <math.h>

    int LED_BUILTIN = 2;                   //  Blink function
    
    char wifissid[] = "xxxxxxxxxxx";   //  your network SSID (name)
    char wifipass[] = "xxxxxxxxxxx";    // your WPA network password

    char DEVID1[] = "xxxxxxxxxxxxxxxxx";        //   token/key

     // Debug mode     !!!!!!!!!!!!!!!!!!!
    boolean DEBUG = true;

    char serverName[] = "api.pushingbox.com";
    
    const int B = 4275;               // B value of the thermistor;  +- 275 = .6 C (1.0 F)
    const uint32_t R0 = 100000;            // R0 = 100k; int type uint32_t required (unsigned 32 bit)
    const int pinTempSensor_1 = A0;     // Grove - Temperature Sensor connect to A0  
    const int tmp_adj_1 = 4;                      // sensor 1 calibration adjustment

    float sp_temp_1;
    float sp_temp_1F;
  
    float Hi_Tmp_Alm = 195.00;                               // Hi Temp Alarm setpoint
    float Low_Tmp_Alm = 1.00;                              // Low  "    "      "
   
    int keyIndex = 0;      //  WiFi Communication Parameter
    
    int status = WL_IDLE_STATUS;
    
    WiFiServer server(80);
  
    boolean temp_alarm = false;                   
    boolean temp_alarm_state = false;
    boolean lastConnected = false;
              
    WiFiClient client;
                   
   void setup()or paste code here
typArduino: 1.8.19 (Linux), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Core 1, Core 1, None"
........

DARDUINO_USB_CDC_ON_BOOT=0 @/tmp/arduino_build_611882/build_opt.h -I/home/ed/.arduino15/packages/esp32/hardware/esp32/2.0.2/cores/esp32 -I/home/ed/.arduino15/packages/esp32/hardware/esp32/2.0.2/variants/esp32 -I/home/ed/.arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/SPI/src /tmp/arduino_build_611882/sketch/Pump_House__Monitor_ver2.ino.cpp -o /dev/null
Alternatives for ESP-WiFiSettings.h: []Pump_House__Monitor_ver2:6:14: fatal error: ESP-WiFiSettings.h: No such file or directory
     #include <ESP-WiFiSettings.h>
              ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

ResolveLibrary(ESP-WiFiSettings.h)
  -> candidates: []
Using library SPI at version 2.0.0 in folder: /home/ed/.arduino15/packages/esp32/hardware/esp32/2.0.2/libraries/SPI 
exit status 1
ESP-WiFiSettings.h: No such file or directory
e or paste code here

In which Library do you see the missing file?

Have you looked in the libraries folder and found the file?
Have you selected the right board and port?

A search of .arduino15 for ESP-WiFiSettings.h was a bust. But it shows installed?

Hi @edthewino. Even though many Arduino libraries do contain a header file that matches the library name, there is nothing that guarantees this, so you should not assume it.

Instead, you should check the example sketches for the library that are located under the File > Examples > ESP-WiFiSettings menu in the Arduino IDE in order to learn the correct way to use the library. Once you do that, you will see that the header file name is WiFiSettings.h

A search of .arduino15 folder did not find the ESP-WiFiSettings.h file. Although the Library Manager says it is installed.

I am using the ESP32 Dev Module board selection, but have tried others. Sketches will download to the board so the port is ok.

That is useful information to know but how would I determine WiFisettings.h is the needed library. Are we supposed to examine the folders? I was going by the description provided for the file in the library manager where it indicated it was used with the ESP32.

By studying the example sketches the library author provided to demonstrate the proper usage.

https://github.com/Juerd/ESP-WiFiSettings

Bingo! Thank you ZX80. I will add that link.

Your username is interesting. My first computers in the early 80s were based off the 8085 and 8088 (Heath/Zenith kit) and the Timex Sinclair was my first. I think it was a Z80. Clunky keyboard and 8k RAM IIRC. All we had was the BBS / bullentin boards back then. Things have changed....lol.

1 Like

I found this useful when searching for files in obscure places

The arduino IDE doesnt always put things where I would expect - so search your whole drive. Ultrasearch is FAST.

...probably not NTFS...

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.