@@ -157,25 +157,27 @@ void CWifi::config(IPAddress local_ip, IPAddress dns_server, IPAddress gateway,
157
157
158
158
/* -------------------------------------------------------------------------- */
159
159
void CWifi::setDNS (IPAddress dns_server1) {
160
- /* -------------------------------------------------------------------------- */
160
+ /* -------------------------------------------------------------------------- */
161
161
IPAddress dns (0 ,0 ,0 ,0 );
162
162
return _config (localIP (), gatewayIP (), subnetMask (),dns_server1,dns);
163
163
}
164
164
165
165
/* -------------------------------------------------------------------------- */
166
166
void CWifi::setDNS (IPAddress dns_server1, IPAddress dns_server2) {
167
- /* -------------------------------------------------------------------------- */
167
+ /* -------------------------------------------------------------------------- */
168
168
return _config (localIP (), gatewayIP (), subnetMask (),dns_server1,dns_server2);
169
169
}
170
170
171
171
/* -------------------------------------------------------------------------- */
172
172
void CWifi::setHostname (const char * name) {
173
- /* -------------------------------------------------------------------------- */
173
+ /* -------------------------------------------------------------------------- */
174
+ string res = " " ;
175
+ modem.write (string (DO_NOT_CHECK_CMD),res, " %s%s\r\n " , CMD_WRITE (_BEGINSOFTAP), name);
174
176
}
175
177
176
178
/* -------------------------------------------------------------------------- */
177
179
int CWifi::disconnect () {
178
- /* -------------------------------------------------------------------------- */
180
+ /* -------------------------------------------------------------------------- */
179
181
string res = " " ;
180
182
modem.begin ();
181
183
0 commit comments