View previous topic :: View next topic |
Author |
Message |
wireless
Joined: 02 Nov 2003 Posts: 16 Location: London England
|
Help on DNS |
Posted: Mon May 25, 2009 2:35 pm |
|
|
Two simple questions about DNSResolve.
1. Where does the stack get the DNS server address from?
2. Do I need "http://www" in front of the host name I am trying to resolve.
Can anybody post a simple example of resolving a host name to an IP address. I have tried using the smtp_mail example but am having no luck.
Thanks in anticipation. |
|
|
vijay s
Joined: 20 Oct 2007 Posts: 17 Location: coimbatore,india
|
|
Posted: Mon May 25, 2009 10:19 pm |
|
|
You have to specify your DNS Server IP address in TCP/IP Stack. When you enter any Domain name in browser, it sends the domain name to DNS Server, it resolves the corresponding IP.
Of course, you have to enter http://www in browser.
What is the stack you using CCS or Microchip? _________________ with regards
vijay s |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
|
Posted: Mon May 25, 2009 11:58 pm |
|
|
vijay s wrote: | you have to specify your DNS Server IP address in TCP/IP Stack. |
The above is true if you do not use DHCP. If you use DHCP then this information is provided by the DHCP server. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
wireless
Joined: 02 Nov 2003 Posts: 16 Location: London England
|
Help on DNS |
Posted: Tue May 26, 2009 1:53 am |
|
|
Thanks Vijay and Andrew for your replies.
I am using DHCP, the CCS TCP/IP stack with CCS PCH C Compiler, Version 4.058 and a PIC18F67J60. The software is all working fine if I specify the IP address of the server to which I am connecting. It also has a HTTP server to set up all the parameters which also works OK.
The DNSResolve returns with an error 04 which is the DNS_GET_RESULT state. From this I assume that it has sent the UDP packet but failed to get a reply from the DNS server.
I will try and do some more debugging later today.
Regards
Terry |
|
|
|