请问修改模块在路由器里显示名字的api

JackLee889
Posts: 6
Joined: Thu Aug 27, 2015 2:16 pm

请问修改模块在路由器里显示名字的api

Postby JackLee889 » Thu Aug 27, 2015 2:20 pm

请问修还模块在路由器里显示名字的api是哪个?我现在显示的是ESP8266.谢谢

danshi126
Posts: 35
Joined: Sat Mar 21, 2015 8:40 am

Re: 请问修改模块在路由器里显示名字的api

Postby danshi126 » Sat Aug 29, 2015 4:16 pm

兄弟,SDK里有相应的代码,多看看代码吧

以下是SDK里Copy出来的

struct softap_config config;
char password[33];
char macaddr[6];

wifi_softap_get_config(&config);
wifi_get_macaddr(SOFTAP_IF, macaddr);

os_memset(config.password, 0, sizeof(config.password));
os_sprintf(password, MACSTR "_%s", MAC2STR(macaddr), PASSWORD);
os_memcpy(config.password, password, os_strlen(password));
config.authmode = AUTH_WPA_WPA2_PSK;

wifi_softap_set_config(&config);

JackLee889
Posts: 6
Joined: Thu Aug 27, 2015 2:16 pm

Re: 请问修改模块在路由器里显示名字的api

Postby JackLee889 » Sat Aug 29, 2015 7:39 pm

可能是我表达不清楚,不是softap 模式,是station模式在路由器中显示的名字。

thuwrx10
Posts: 10
Joined: Wed Aug 19, 2015 3:59 pm

Re: 请问修改模块在路由器里显示名字的api

Postby thuwrx10 » Tue Sep 01, 2015 7:43 pm

bool wifi_station_set_hostname(char* hostname)
2C-ESP8266编程手册1.3.0中文版第53页。
多看文档。

Who is online

Users browsing this forum: No registered users and 85 guests