Hello,
my Arduino Ethernet Rev.3 works as a Ethernet Client and Web Server simultaneously - so far that all works great.
It obtains an IP address from the Networks DHCP server and then uses this for the webserver in order to show some Analog inputs on the local website.
The trouble I encounter is, I can only view the website if the IP address is known. I would love to have it more user friendly and type the hostname into the browser address line. I have had a view through various forum sites but unlikely i haven't been able to find a solution.
Currently i do the following in the header:
shouldnt that be enough?
I have noticed that if i search manually with Angry Ip Scan the result shows an alive host at the IP but the name states the name of the windows host that has received this ip the last time from the DHCP server.
At some point i want to code a VB Application that can discover all my devices in the network after pressing a serach button.
Do ya'll see an alternative to that other then looking for a hostname that starts with Projectand then a serial to distingish between the devices
Maybe I don't understand your problem but from what I got, I'd suggest to use fixed IP numbers and just enter them into your hosts file (yes, even Windows has one).
I don't know what "Angry IP Scan" does (you didn't provide a link to it), so my guess is, that it uses some Windows-only stuff to show a name and that will not work with the Arduino.
Hi pylon,
thank you for your answer you are absolutely correct a fixed IP would work but i wouldn't like to have to gather for each site where i want to install my arduino a IP Address and then configure it. This is why i need it to be working with DHCP.
And this does work, the trouble is that i can not identify the hostname and wouldnt know the IP it was given by the DHCP unless i connect a LCD or serial to it. (Which i also dont want)
Angry IP Scan will scan a range of the network and return if the Computer respond to the ping and returns the hostname
In the attached picture it should show Project001 as a host but it gives the hostname of our old printer that used to have this IP assigned. If i use the old hostname of the printer in the address bar of the browser it directs me to my arduino but that is not state of the art.
I would want my clients to be able to look at the back of the housing and type the name into the address line of the browser and be connected to the website.
Angry IP Scan will scan a range of the network and return if the Computer respond to the ping and returns the hostname
What exactly does "hostname" mean in this sentence? The DNS hostname? If yes, the used DHCP server must know about each device that connects and always give the same IP address to that device (which is almost the same as fixed addresses but no need to configure the Arduino), additionally an in-house DNS must exist that is responsible for the reverse lookup.
Theoretically your "hostname" may be the name offered to the DHCP server when requesting an IP. But in this case you must have a special DHCP server that allows to query these strings, this is not part of the DHCP protocol and therefor not standardized.
Your problem can be resolved by DDNS or MDNS. The first is a DNS service where the Arduino may register itself after acquiring an IP address while the later is often known as "Bonjour" (that's how Apple calls it), which already has a minimalistic implementation for the Arduino (http://gkaindl.com/software/arduino-ethernet/bonjour).
spylive:
Please, Is there the same library to shield rev2 or ethernet_v2 library that allows to set the hostname?
Why not use the default? It will be WIZnet followed by the last three octets of the mac address. If you use DEAD BEEF FEED as the mac, the host would be "WIZnetEFFEED".
SurferTim:
Why not use the default? It will be WIZnet followed by the last three octets of the mac address. If you use DEAD BEEF FEED as the mac, the host would be "WIZnetEFFEED".