Issue
139 February 2002
What
Good is IrD, Eh?
Part
2: Wireless Communication
byJeff
Bachiochi
Jeff has kicked off
a series of articles investigating the lower level of
IrDA protocols. This month, he explains what each protocol
layer offers in the way of services and opportunities.
Start
IrLAP/IrLMP IrLAP?IrPHY
Frames Who Am I/Who Are You
IrComm Short
Stories
Continuing Education
Sources
& PDF
Once upon a
time, I looked at the layering of protocol stacks as being
unnecessarily complicated. Why divide a simple communication
task into so many separately defined tasks? Although I
don’t consider myself to be anymore than an adequate software
programmer, I can appreciate dividing a programming task
into smaller more manageable routines. Generally it isn’t
necessary to go back and rewrite a working routine just
because another part of the application has been modified
(unless it is directly effected by the change). This idea
of reusable code can be applied to protocols, as well.
It is most easily seen at the bottom level, the physical
interface.
 |
| Figure 1—This
is the layer stack between your application and the
infrared transceiver components, which make up the
IrDA protocol architecture. The service layers define
how data is passed between layers. |
Figure 1 should
be familiar from last month, when I started discussing
using the IrDA standard for infrared data communications.
The IrDA stack is built on the firm IrPHY foundation layer.
Advances in technology (improved hardware) can be implemented
without requiring changes in any of the upper protocol
layers. As shown last month, the IrPHY layer defines what
constitutes good communication via infrared transmission
and reception, but does not define how that is accomplished
with any specific hardware.
With the physical
layer (IrPHY) previously defined, the link access layer
deals directly with the IrPHY layer and handles the bottom
level communications tasks. The IrLAP layer provides services
to the IrLMP layer. These services include,link start-up/
shutdown, address discovery, address conflict resolution,
connection establishment, sniff open, information exchange,
connection reset, and disconnection. The IrDA standard
defines these service primitives and parameters, but not
how the IrLAP must implement them.
The IrLMP layer
consists of the link management information access and
link management multiplexer. The IAP maintains an information
base of IR devices within range and their capabilities.
The MUX provides services to both the IAP and the transport
entities. An application must deal with one of the transport
protocols, such as IrCOMM. This transport layer takes
care of defining the emulated connection, which includes
how the port handshaking will be implemented along with
the data. An intermediate TINY-TP layer is used to break
outgoing data and control into chunks, reassemble incoming
data and control, and keep track of multiple transports
that may be trying to use the IrDA connection simultaneously.
Of the three
mandatory IrDA layers, the IrLAP layer may have the most
important job. This layer is responsible for taking the
requests for and confirming the results of a service from
the IrLMP layer. It automatically discovers and establishes
connections to those devices within range. Let’s look
closer.