- Sun Apr 10, 2016 3:57 am
#45209
Solved!
With this cut-down version of the code:
Code: Select all#include <ESP8266WiFi.h>
extern "C" {
#include "user_interface.h"
}
char hostname[] = "Alarm";
WiFiServer server(80);
void setup() {
wifi_station_set_hostname(hostname);
}
void loop() {
}
I was getting an error, because I was re-defining "hostname", which is already defined somewhere else in another file. I changed this to "myhostname" and now it compiles. I should have read the original error message more carefully, instead of assuming I was passing the parameter by the wrong mechanism.
I can now see the device "Alarm" listed on my router's Wireless Clients page.