After a bit of a trip, I'm back to my main goal - to disable the DHCP offer option using the ESP8266 SDK command
wifi_softap_set_dhcps_offer_option
After modifying the example mentioned above, I now have the following Sketch
/*
/* Create a WiFi access point and provide a web server on it. */
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include "user_interface.h"
/* Set these to your desired credentials. */
const char *ssid = "ESPap";
const char *password = "thereisnospoon";
ESP8266WebServer server(80);
/* Just a little test message. Go to http://192.168.4.1 in a web browser
* connected to this access point to see it.
*/
void handleRoot() {
server.send(200, "text/html", "<h1>You are connected</h1>");
}
void setup() {
delay(1000);
Serial.begin(115200);
Serial.println();
Serial.print("Configuring access point...");
/* You can remove the password parameter if you want the AP to be open. */
WiFi.softAP(ssid, password);
IPAddress myIP = WiFi.softAPIP();
wifi_softap_set_dhcps_offer_option(OFFER_ROUTER,0);
Serial.print("AP IP address: ");
Serial.println(myIP);
server.on("/", handleRoot);
server.begin();
Serial.println("HTTP server started");
}
void loop() {
server.handleClient();
}
But when I try to upload it, I am met with the error:
WiFiAccessPoint.cpp.o: In function `handleRoot()':
/Users/cypher/WiFiAccessPoint.ino:48: undefined reference to `wifi_softap_set_dhcps_offer_option(unsigned char, void*)'
WiFiAccessPoint.cpp.o: In function `setup':
/Users/cypher/WiFiAccessPoint.ino:50: undefined reference to `wifi_softap_set_dhcps_offer_option(unsigned char, void*)'
collect2: error: ld returned 1 exit status
Error compiling.
Does this mean this command is not available through the Arduino IDE, or am I going about this the wrong way? After some reasearch I would have thought that adding the "user_interface.h" include statement would have made the function usable. I have dug through ESP8266WebServer.h, WiFiClient.h, and ESP8266WiFi.h but can't seem to find an easy to use function that is the same as the SDK command I want to use.
Any tips would be greatly appreciated!