Hardware Reference
In-Depth Information
The final document is the
stylesheet. Save this as
mystyle.css, then copy this and the two
preceding files to the SD card. Don't
put them in a folder, but in the main
directory (the root) of the SD card.
Style It
.main {
background-color: #fefefe;
color: #0a1840;
font-family: "Lucida Grande", Verdana, Arial, sans-serif;
}
.header {
background-color: #0a173E;
color: #f1fffe;
font-family: sans-serif, "Lucida Grande", Verdana, Arial;
}
Feel free to change the colors and
fonts for this document—they're
purely cosmetic.
Once you have these files on the SD
card, reinsert it into the Ethernet
module, and then try to view them in
a browser. You should get something
like Figure 10-10. Your current version
won't have values for the temperature,
thermostat setting, and status, but
read on.
Making Your Server Public
Since your Ethernet module is running as a server, you
need it to be publicly visible on the Internet if you plan
to access it from outside your own network. If you can
assign the module to a fixed address on your network, that
helps, but if you're setting it up at home, that address is
not likely to be visible outside your home network. You'll
need to set up port forwarding on your router, as explained
in the sidebar, “Making a Private IP Device Visible to the
Internet,” in Chapter 4. Using port forwarding, you can
give devices that are attached to your home router a face
on the public Internet. They will only appear as numeric
addresses, because they don't have names assigned to
them. However, that may be enough.
Dynamic DNS
If you definitely need a named URL for your module, you
can use a Dynamic DNS (DDNS) host, such as www.
dyndns.com . A DDNS host is simply a DNS host that
continually updates the DNS record of your domain. Your
router or device becomes a client, and when it connects
to the DDNS host, it requests that the domain name you
choose, such as yourserver.com , should point to the
number from which the client is connecting. For example,
your Ethernet module (local IP address 192.168.1.20)
makes a DDNS request to dyndns.com . Because it goes
through your router, which has IP address 63.118.45.189,
dyndns.com links yourserver.com to 63.118.45.189.
The numeric address is referred to as the CNAME , or
Canonical Name record , of the name address. So when
someone browses to yourserver.com , he's pointed to
63.118.45.189. And if you set up your router to have
port forwarding turned on, pointing its public port 80 at
192.168.1.20 port 80, your Ethernet module appears to the
public Internet as yourserver.com .
There are two solutions to giving your devices names you
can remember through port forwarding . The simplest
way is to embed the address of the module in a page on
your public web page—you'll never need to remember
the numeric address. For example, if your router's public
address is 63.118.45.189, set up port forwarding so that
port 80 of the router points to port 80 of the Ethernet
module. Then restart your router. When you have a
connection again, open a browser and go to http://
63.118.45.189 , and you should have access to the module.
Put this link in a web page on a hosted web server with a
real hostname, and you're all set.
Dynamic DNS hosting does not have to be expensive. For
a single domain that ends with a name the DDNS host
owns, like fuzzipantsovich.dyndns.tv , it can be free. For
custom names, or multiple names, it's usually a reason-
able monthly fee that gives you a way to provide named
hostnames for devices on your home network.
X
The second solution is Dynamic DNS .
 
Search WWH ::




Custom Search