Just got an EtherMega 2560, and am trying to create a system of displaying data gathered from an IIS Server on a 7 inch LCD TFT panel.
So far, everything's going well, until now.
If I put a simple hostname such as
char server[] = "s1";
it will not connect. If I put
char server[] = "www.google.com.au";
that will connect and display the delivered information (in subsequent code) and finally, if I put
IPAddress server(192,168,0,2);
that will connect to my local server and process the data as delivered by the IIS Server.
This project I'm putting together will run only on a customer LAN - no Internet needed.
Is there a glitch with Ethernet.h? I am by no means an experienced (or qualified) programmer - just a hack, and I'm far better at understanding VB syntax, than C+. Any assistance will be greatly appreciated.
The Mega is getting it's IP config by DHCP, and is showing correctly the DNS server IP adddress, default gateway, etc.
On my home network, it happens to share the name FQDN as my "public" DNS record. Also, I run a full Active Directory domain, with DHCP server, DNS server, wpad.dat auto hander-outerer and other domain type stuff.
Well, I'll be jiggered! You're right! I just put in char server[]="s1.full.domain.name.au" and it worked! Stupid Windows networks threw me off with NETBIOS lookup ability. eg "ping s1" works.
Good to know. I'm sure I'll be posting another embarrasingly simple question in the comings days...
On many versions of Windows, there is an entry in your network settings to assign a domain so you can use just the host. It will automatically append the domain to the host if it doesn't match a FQDN format.
For example. you can use the host name "myhost" on a web browser if you have the default domain in your network settings "mydomain.com". It will take the host and append the domain, making it "myhost.mydomain.com" before resolving the url.