2025-09-05 7:48 AM - last edited on 2025-09-08 2:34 AM by TarikAb
Hello,
I use the ST67W611M1 module in station mode with activated DHCP client. For a generic configuration of my software I want to use the Wifi_GetHostAddr() function to acquire the IP for a given host name.
The problem is, that the DHCP client only uses the third DNS Server provided by the Wifi APs DHCP server (see attached picture). The first and second one are always 208.67.222.222 and 8.8.8.8 no matter what I configure. And the DHCP must offer at least three DNS servers. Otherwise the last one would be 0.0.0.0. Sure, I could just setup three DNS servers, but this is a very ugly solution.
W6X_WIFI_DHCP is 1. W6X_WIFI_DNS_MANUAL is 0. I tried two different DHCP servers.
Is this a firmware bug of the ST67W611M1? Has anyone the same problem?
Kind regards
Jannis
Solved! Go to Solution.
2025-09-11 9:46 AM
Hello J-N,
Thank you for pointing out this issue.
After investigation it seems the call to the function W61_WiFi_SetDnsAddress() function in the W6X_WiFi_Init() function is the source of the issue. It is mandatory to remove this call to retrieve your local DNS server's IP automatically.
Even if the state, in W61_WiFi_SetDnsAddress() function, is set to automatic (=0), the default values will be set and not overridden during the DHCP process.
Carefull : Once the DNS IP is set manually, those values will be hardcoded until the device is reset to its default configuration.
This can be done with the W6X_SetModuleDefault() function.
Kind regards
Louis
2025-09-08 2:31 AM
I have some news. The first DNS server are acquired like a miracle after the wifi module was running for a while (a few minutes) even when just one DNS server is offered by the DHCP server:
AT< +CW:CONNECTED
AT< +CW:GOTIP
~ few seconds
AT> AT+CIPDNS?
AT+CIPDNS?
+CIPDNS:0,"208.67.222.222","8.8.8.8","0.0.0.0"
OK
~ few minutes
AT> AT+CIPDNS?
AT+CIPDNS?
+CIPDNS:0,"192.168.12.254","8.8.8.8","0.0.0.0"
OK
@st:Please fix this. This issue makes the wifi module unusable for local LAN environments with local DNS servers (like my case).
2025-09-11 4:16 AM
Hi J-N,
We reproduced the issue and will come back to you re the fix.
Regards,
2025-09-11 9:46 AM
Hello J-N,
Thank you for pointing out this issue.
After investigation it seems the call to the function W61_WiFi_SetDnsAddress() function in the W6X_WiFi_Init() function is the source of the issue. It is mandatory to remove this call to retrieve your local DNS server's IP automatically.
Even if the state, in W61_WiFi_SetDnsAddress() function, is set to automatic (=0), the default values will be set and not overridden during the DHCP process.
Carefull : Once the DNS IP is set manually, those values will be hardcoded until the device is reset to its default configuration.
This can be done with the W6X_SetModuleDefault() function.
Kind regards
Louis
2025-09-15 2:00 AM
Hi Louis,
thanks for your support and the hint. I commented out the relevant lines and the module used the DNS server immediately. I even didn't have to reset the device memory. For the moment I commented out these lines in the repository ...\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-ST67W61\1.0.0\Middlewares\ST\ST67W6X_Network_Driver\Core:
/* Set the default DNS IP addresses */
//ret = TranslateErrorStatus(W61_WiFi_SetDnsAddress(p_DrvObj, &Dnsmanual, Dnsaddr1, Dnsaddr2, Dnsaddr3));
//if (ret != W6X_STATUS_OK)
//{
//goto _err;
//}
Regards
Jannis