Go Down

Topic: dnsLookup() method needed to upload data to cosm (Read 460 times) previous topic - next topic

altis

Is  dnsLookup() method needed to upload data to cosm?? On running the code for dnsLookup() am getting failed replies as below
Quote
Client Demo
Setting up DHCP
My IP: 192.168.1.102
Netmask: 255.255.255.0
GW IP: 192.168.1.1
DNS IP: 208.67.222.222
DNS failed
SRV IP:   0.0.0.0

I ran the code from the page http://www.lucadentella.it/en/2012/02/19/enc28j60-e-arduino-3/
In some forums i read about DDNS enabling in the router..Is it really needed ?? my router doesn't have DDNS. is it possible to make the code work without enabling DDNS??? My ultimate aim is to upload some data to cosm..somebody pls guide me on this..Am using Enc28j60 ethernet shield..

PaulS

Quote
Is  dnsLookup() method needed to upload data to cosm??

Have you read the sticky at the top of this forum?

Proper punctuation and spelling will go a long way here. That means ONE punctuation mark at the end of sentences, and capital letters at the beginning.

If you want to post in the Programming section, posting your code is NOT optional.

Quote
somebody pls guide me on this..

OK. Please is not spelled pls.

What is dnsLookup() looking up?

majenko

Ultimately, no dnsLookup() is not required for any web transaction, whoever it is you're posting to.

dnsLookup() resolves a web name into an IP address.  If you already have the IP address you can skip the dnsLookup(), but you will have to ensure that you have the right Host: entry in the request header to ensure that the correct Virtual Host is selected on the remote server.  This is most often put in by using the hostname portion of the URL, so if you just use an IP address in there you may end up requesting the wrong website.  If you are manually crafting the HTTP request header yourself, then it won't be a problem as you can specify the correct hostname in the Host: header.

SurferTim

#3
Mar 18, 2013, 12:02 pm Last Edit: Mar 18, 2013, 12:05 pm by SurferTim Reason: 1
I use a dns lookup to reduce the time required to process a transaction. Here is the code I use for getting the ip of a NTP server. It will work with about any domain name you want to resolve to an ip.
http://arduino.cc/forum/index.php/topic,137789.msg1037288.html#msg1037288

edit: Oops, my bad. I did not see this. My code won't work  :(
Quote
Am using Enc28j60 ethernet shield..

Go Up