© 2000 Ubicom, Inc. All rights reserved. - 17 - www.ubicom.com SX IrDA Virtual Peripheral Implementation AN16 event  which  once  the  frame  has  been  confirmed  will
result in a LAP link disconnect.
Any received LMP command other that a “connect” or a
“disconnect” will be ignored.
3.4.3   LMP IrComm API The LMP API provides the IrComm API to the application
layer and is described in the Application layer section of
this document.
3.4.4   LMP Implementation Notes The IrLMP layer uses reliable I-frames and as the infor-
mation  passed  to/from  the  LAP  layer  is  unreliable  until
confirmed, the LMP implementation must be capable of
rejecting  or  re-transmitting  data.  The  LMP  layer  imple-
mentation  must  be  able  to  retransmit  a  frame  after  a
frame  has  been  received  thus  all  transmit  and  receive
resisters  must  be  separate.  Normally  if  the  transmitted
data is not-acknowledged then the reply will be a S frame
thus  no  data  would  have  been  sent,  however  it  is  still
possible   to   receive   data   followed   by   a   transmit   not-
acknowledge if a frame is lost.
For solid bi-directional data flow the events will occur in
the following order:
lap2lmp Tx  Start lap2lmp Tx  Data * n lap2lmp Rx Data * n lap2lmp Tx  Valid/Error lap2lmp Rx Valid/Error lap2lmp Tx  Start etc. For  reception,  all  I-frame  data  bytes  are  passes  to  the
LMP layer. The first two bytes will be the DLSAP and the
SLSAP,   followed   by   the   higher-layer   data   (up   to   62
bytes).
For  transmission,  the  DLSAP  and  SLSAP  bytes  will  be
transmitted  by  the  payload  layer.  This  allows  the  LMP
layer to use a single TxState value for each of the possi-
ble   types   of   transmission   thus   if   a   retransmission   is
requested  then  the  state  will  remain  unchanged.  When
the  LAP  layer  gives  permission  to  send  a  frame  the
DLSAP and SLSAP bytes are copied into the appropriate
payload  registers  for  transmission.  All  data  requested
from the LAP layer will consist of the higher-layer data.
Also  note  that  if  a  transmitted  frame  is  requested  to  be
repeated  then  the  DLSAP  and  SLSAP  registers  in  the
payload layer will have been lost and so are transferred
again.
The LAP layer will send a  RxError and/or a  TxError
message if required before sending a  DisconnectIn-
dication thus the LMP layer does not need to do any
special   processing   on   a   DisconnectIndicaton   to
inform the application layer.
3.4.5   Information Access Service The IAS provides the required GetValueByClass service
with no optional services.
The IAS holds two classes:
•    “Device” class
•    “IrDA:IrCOMM” class 3.4.5.1  IAS Device Class The IAS Device class holds two attributes:
•    “DeviceName” which returns the user string “SX IrDA
      IrComm Demonstration”
•    “IrLMPSupport” which returns IrDA version 1 with no
additional IAS services and no additional MUX services
supported (This attribute is not requested by a Win95
connection and so has not been completely tested).
3.4.5.2  IAS IrComm Class The IAS IrComm class holds two attributes:
•    “Parameters” which returns that 3-wire raw serial or
      parallel is supported (no port name is sent).
•    “IrDA:IrLMP:LsapSel” which returns the LSAP of the Ir-
Comm service = 5 (This number is arbitrary, between 1
and 6F).
3.4.6   IAS Implementation Notes The incoming strings (classname and attribute) are made
up of a one byte length followed by length bytes of case-
sensitive text. All the strings that the IrDA Virtual Periph-
eral needs to check for are of different lengths and so the
IrDA Virtual Peripheral uses the length byte to determine
which string to test for. If the string does not match then a
error  reply  will  be  generated  with  an  appropriate  error
number indicating the cause of the error.
3. 5 APPLICATION LAYER 3.5.1   IrComm The  IrComm  interface  provides  a  reliable  bi-directional
virtual COM/LPT interface. The IrComm interface can be
considered to be that of a UART with a cable connecting
it to the UART of the other station.
The  IrDA  Virtual  Peripheral  does  not  buffer  frames  and
so the API is not quite this ideal. All data sent must be
able to be resent and all data received must be able to be
discarded  if  requested.  Up  to  62  bytes  of  data  can  be
sent/received before being confirmed.