© 2000 Ubicom, Inc. All rights reserved.
- 22 -
www.ubicom.com
AN16
SX IrDA Virtual Peripheral Implementation
4.
2
SX TO SX COMMUNICATION
4.2.1 SX to SX Application Description
The SX 2 SX sample application allows SX devices to
initiate XID discovery and send unreliable broadcast data
packets. The SX is controlled by commands received
from the debug port as follows:
d will start the discovery process
c will broadcast the value of port c (raw byte).
s will broadcast a hello string.
The SX will respond to the command with a ^ on the
debug port if it has accepted the request or a! if it has
refused the request. A request will be refused if IR com-
munication has been detected in the past 500 ms (as
required by the IrDA IrLAP specification to prevent colli-
sions).
Note that this connectionless protocol does not require
the LMP layer and could be implemented with much sim-
plified LAP and payload layers freeing up over half the
code space.
4.2.2 Requirements
Two SX boards (at least) each with a serial connection
to a PC through the debug ports.
Note:The serial cable should be a straight-through cable
with at least TX, RX, and GND connections.
4.2.3 Operation
Open a terminal program on the appropriate physical
COM port at 115200,n,8,1, no handshaking on each of
the computers.
Power up the SX boards. Power is indicated by the
PWR LED.
Press d on one computer to request that the discovery
process be initiated. The SX should respond with a ^
followed by the text names of all the IrDA devices in
range. If a ! is returned then other IR communication
has been detected so the request cannot be accepted.
Observe the LEDs during the discovery process. The
initiating SXs TX indication LED should be flickering for
about one second and any responses should be seen
with the RX indication LED. The response will occur at
different intervals through the transmission process
each time as a different random reply slot will have
been chosen by the responder.
Press c on one computer to request that the contents
of port c be broadcast. The SX should respond with a
^ and all other SX devices in range should display the
received byte. If a ! is returned then other IR commu-
nication has been detected so the request cannot be
accepted.