Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By martinayotte
#52138 BTW, to convert String to char * easily, there are methods provided :
Code: Select allString routername = "Testing123";
wifi_station_set_hostname(routername.c_str());

I'm using the same method in my sketches, and it is working on my side.
So, maybe the problem is on the router side, maybe it have cache an kept the old name used before.
Try to power recycle the router to see if it help.
User avatar
By rudy
#52171
martinayotte wrote:BTW, to convert String to char * easily, there are methods provided :
Code: Select allString routername = "Testing123";
wifi_station_set_hostname(routername.c_str());


I tried that but I got this error

error: invalid conversion from 'const char*' to 'char*' [-fpermissive]