© 2000 Ubicom, Inc. All rights reserved. - 10 - www.ubicom.com AN16 SX IrDA Virtual Peripheral Implementation tion  address  register  is  set  to  $FF  to  accept  broadcast
command   frames   and   reject   response   or   addressed
frames.  When  the  LAP  layer  is  initiating  discovery  (i.e.
the QUERY state) the connection address is set to $FE
to  accept  broadcast  response  frames  and  reject  com-
mand or addressed frames. When connected – normal-
response-mode  (NRM)  state  the  connection  address  is
set  to  the  given  connect  address  (from  the  connection
request   frame)   with   the   command   bit   set   therefore
accepting   addressed   command   frames   and   rejecting
broadcast, response, and incorrectly addressed frames.
The command byte determines the frame type. There are
three basic types of command – unnumbered (U), super-
visory (S), and information (I). U commands do not relate
to reliable data and are used for tasks such as discovery
and   link   connection/disconnection.   S   commands   are
used to acknowledge or reject received I frame data and
are also used to maintain the connection when there is
no data to be transferred. I frames are used to transfer
reliable  data  and  also  contain  an  acknowledgment  for
received I frame data encoded in the command byte.
The information field is command specific. For I frames it
contains the reliable data to be transferred, for U frames
it contains parameters relating to the command, and for S
frames it will be empty (0 bytes in length).
I  frame  numbering  for  acknowledgment/reject  is  based
on  a  3  bit  frame  number  to  protect  against  duplicate
frames.
Initial
BOFs
 BOF
($C0)
Address (1 byte) Command (1 byte)     Information
(up to 64 bytes)
    FCS
(2 bytes)
 EOF
($C1)
Figure 3-4.  LAP Frame Format Table 3-3.  Payload Frame Types Type Constant Command Type Description iFrame Information Information data frame. sRRFrame Supervisory Acknowledge I frame and receive-ready indication. sRNRFrame Supervisory Acknowledge I frame and receive-not-ready indication. sREJFrame Supervisory Reject I frame. sSREJFrame Supervisory Selective reject I frame. uUIFrame Unnumbered Unnumbered-information data frame. uDISCFrame Unnumbered Disconnect frame. uUARspFrame Unnumbered Response to a SNRM or DISC frame. uNRMFrame Unnumbered SNRM or RNRM – Open or close a connection. uTESTFrame Unnumbered Test frame. uFRMRRspFrame Unnumbered Frame reject response frame. uDMRspFrame Unnumbered Disconnected-mode indication response frame. uXIDCmdFrame Unnumbered Discovery command frame. uXIDRspFrame Unnumbered Discovery response frame.