Skip to content

Commit ae115fa

Browse files
committed
mac address
Former-commit-id: 97f1778
1 parent 2883e55 commit ae115fa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

libraries/WiFiS3/src/WiFi.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,13 @@ uint8_t CWifi::status() {
454454
/* -------------------------------------------------------------------------- */
455455
int CWifi::hostByName(const char* aHostname, IPAddress& aResult) {
456456
/* -------------------------------------------------------------------------- */
457-
return 0;
457+
modem.begin();
458+
string res = "";
459+
if(modem.write(string(PROMPT(_GETHOSTBYNAME)),res, "%s%s\r\n" , CMD_WRITE(_GETHOSTBYNAME), aHostname)) {
460+
aResult.fromString(res.c_str());
461+
return 1;
462+
}
463+
return 0;
458464
}
459465

460466

0 commit comments

Comments
 (0)