@@ -256,6 +256,22 @@ int getTemperature(const uint8_t command[], uint8_t response[])
256256 return 9 ;
257257}
258258
259+ int getDNSconfig (const uint8_t command[], uint8_t response[])
260+ {
261+ uint32_t dnsip0 = WiFi.dnsIP ();
262+ uint32_t dnsip1 = WiFi.dnsIP (1 );
263+
264+ response[2 ] = 2 ; // number of parameters
265+
266+ response[3 ] = 4 ; // parameter 1 length
267+ memcpy (&response[4 ], &dnsip0, sizeof (dnsip0));
268+
269+ response[8 ] = 4 ; // parameter 2 length
270+ memcpy (&response[9 ], &dnsip1, sizeof (dnsip1));
271+
272+ return 14 ;
273+ }
274+
259275int getReasonCode (const uint8_t command[], uint8_t response[])
260276{
261277 uint8_t reasonCode = WiFi.reasonCode ();
@@ -2061,7 +2077,7 @@ const CommandHandlerType commandHandlers[] = {
20612077 NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL ,
20622078
20632079 // 0x10 -> 0x1f
2064- setNet, setPassPhrase, setKey, NULL , setIPconfig, setDNSconfig, setHostname, setPowerMode, setApNet, setApPassPhrase, setDebug, getTemperature, NULL , NULL , NULL , getReasonCode,
2080+ setNet, setPassPhrase, setKey, NULL , setIPconfig, setDNSconfig, setHostname, setPowerMode, setApNet, setApPassPhrase, setDebug, getTemperature, NULL , NULL , getDNSconfig , getReasonCode,
20652081
20662082 // 0x20 -> 0x2f
20672083 getConnStatus, getIPaddr, getMACaddr, getCurrSSID, getCurrBSSID, getCurrRSSI, getCurrEnct, scanNetworks, startServerTcp, getStateTcp, dataSentTcp, availDataTcp, getDataTcp, startClientTcp, stopClientTcp, getClientStateTcp,
0 commit comments