Hi, have you looked at the API wiced_hostname_lookup() if that is what you need?
I don't think that is what we need. When the DHCP lease is acquired, I wanted to also get the DNS server. However, after looking at the source, I realized that WICED puts the gateway address as the first DNS server and then Google next. This might work for most cases, but for corporate networks will cause issues. The only solution for the end user will be to set the device up with Static IP so we can capture the DNS server they would like to set.
DHCP servers can optionally provide a DNS server however not all DHCP servers do so which is why WICED the gateway and one of the Google DNS servers automatically into the DNS server list.
What version of the SDK are you running?
We are running 2.4.0.
I should have also asked what network stack.
All the network stacks support extracting any DNS server information out of the DHCP response and adding them into the DNS server list.
You can look in wiced_ip_up() found in Wiced/Network/<network stack>/wiced/wiced_network.c
If you can take a sniffer trace of the DHCP handshake and upload it I can take a look.
Actually the first DNS Server getting for the NetXDuo Stack is not working. It give you an error 151 which seems to be a error in the parsing. So the only working DNS is 184.108.40.206 from Google. In some company network this won't work. Can you help improve this ? I am using SDK 3.1.2 with NetXDuo and threadX.
thanks for your help.
Confirm hcz's issue on SDK 3.1.2 with NetX_Duo,
But NetX work well !
NetX partially works until more than 1 DNS server set.
Can folks from Broadcom chime in whether NX_DHCP_PARSE_ERROR occurs for all cases of NetX_Duo 5.7?
As a followup question, is there any plans to upgrade to a newer version of ThreadX, NetX, etc.?
The binary NetX_Duo.ARM_CM3.release.a differs between
- 3.1.0 and 3.1.1
- 3.1.1 and 3.1.2
There's not much information about these changes, except for the changelog for 3.0.0
Replacing the 3.1.2 binary with 3.1.1 will fix this issue, with the risk of introducing other issues - proceed at your own risk.
We have the same problem while extracting DNS server information from the DHCP response. We use the SDK 3.1.2 with NetX_Duo.
As you sad, replacing the 3.1.2 "NetX_Duo.ARM_CM3" binaries with the 3.1.1 fixed this issue but we're afraid of the risk of introducing other issues.
Is there anyone who works with the 3.1.1 and encounters any problem? I also think that Broadcom folks' comment on this issue is crucial.