We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
I am using RL-ARM's TCPnet and am having an issue with the DNS client in TCPnet when I disabled DHCP at run time. What happens is the first domain name that I attempt to resolve into an IP address always fails immediately with get_host_by_name() returning error "DNS_ERROR_UDPSEND". If I attempt to resolve the domain name again, it succeeds, but takes 0.5-2seconds. Any subsequent attempts will succeed in under 100ms.
I see in a comment of Keil's that "DNS_ERROR_UDPSEND" means that there was a UDP Send frame error, and Keil's product manual indicates that "the UDP socket cannot send packets" (http://www.keil.com/support/man/docs/rlarm/rlarm_get_host_by_name.htm)
What is interesting is that if I instead use DHCP (as opposed to a static IP address), the problem disappears and all domain names resolve in under 100ms. Unfortunately, in some instants our product needs to use static IP addresses.
Now, I am turning DHCP off at runtime through the dhcp_disable() function -- as outlined in Keil's product manual (http://www.keil.com/support/man/docs/rlarm/rlarm_tn_runtimecfg.htm)
Here is roughly what my initialization code looks like:
init_TcpNet(); //10ms TCPnet tick task with highest priority --timer_tick() TCPnetTimerTaskID = os_tsk_create(tick_timer,6); if (!DHCP) { dhcp_disable(); memcpy (&localm[NETIF_ETH], &next_ip_config, sizeof(next_ip_config) ); }
FYI: I am running RL-ARM V4.01 and this is on an LPC2468 MCU
Any thoughts on this would be greatly appreciated. Thanks!