Hardware Reference
In-Depth Information
I'll cover various media-oriented head units in Chapter 3, although most of those shown could be re-created with
a Linux machine running the appropriate software. However, the power usage, noise, and cost will generally be larger
than a custom-built embedded device, even though many of those devices may be running Linux themselves! To
connect the units, however, you need to know how to set up a network.
Networking Primer
To best utilize the devices here, you will need to configure a Linux machine as a suitable server. Most computer
science topics will begin their networking section by describing the OSI seven-layer model of networking . . . I won't!
Instead, you'll learn only the necessary, practical steps of providing and configuring a suitable home network for
automation.
N Each Linux example here, and throughout the topic, is based around Debian and the packages within it.
This is not advocacy on my part, merely practicality, because it's what I use. Some distributions may place the files in
slightly different places or have slightly different names, but the principles are always the same, and the equivalents are
easy to find.
Note
Concepts
A home network is a way for each computer in the house to share a set of common resources such as printers,
scanners, and storage space. In this sense, it's very much like an office network. Where the home differs is in the level
of technology and, consequently, the expertise needed to run it. One of the main bugbears in office IT systems is the
issue of security. With a home network, the relationships between the people using it are very much different, and
social mores are brought to bear.
The standard network configuration has two parts—internal and external. The internal part is a network that
connects all the house computers together, along with their peripherals, and makes them invisible to the outside
world. These devices may be networked together through cables or wireless.
The external network is everything else! The big, wide Internet is generally unavailable the computers at home; it
is available only by connecting to an ISP through a modem, broadband connection, 3G card, or similar device.
To connect these two sides of the network together, you need a router. Sometimes the router is a small box that
comes as part of your DSL/cable/broadband package and automatically separates the internal and external traffic.
Sometimes you'll need to buy one. They have one RJ-45 socket carrying the external network traffic, into which you
plug the network cable from the broadband modem, and one or more outputs to the internal network.
Alternatively, you can use a PC with two network cards—one configured to talk to the external network and one
for the internal. If you have a 3G card, then this acts like your externally configured network card.
With the router existing in both internal and external networks, it is able to automatically keep both sets of traffic
separate and block any data or software you don't want moving between the two. Most routers are configured, by
default, to allow all outgoing traffic but block all incoming traffic, except those on specific ports. The port is the route
by which traffic protocols flow and is dereferenced by a number. All web pages, for example, are requested on port 80.
So if your router is blocking incoming traffic on port 80, you won't be able to access your internal web server from
outside your home's internal network.
Depending on the number of machines on your network, you might also need a switch that provides additional
network sockets, into which you can plug more computers. Although it is unlikely that many people will fill eight
sockets with computers, it is not uncommon to have non-computer devices that also use Ethernet to transmit data,
thereby exhausting the available sockets.
 
Search WWH ::




Custom Search