Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
IrLAP fast connect appnote V1.0.pdf
Скачиваний:
18
Добавлен:
23.08.2013
Размер:
416.97 Кб
Скачать

Infrared Data Association

IrLAP Fast Connect (Application Note)

Version 1.0

November 27,2002

IrLAP Fast Connect

Version 1.0

Contributors:

Glade Diviney (Extended Systems, Inc.)

David W. Suvak

Lichen Wang (Actisys Corporation)

Editor:

David W. Suvak

Document Status

Version 0.1: This version is a draft proposal.

Version 0.2: Fixed errors in auto-detect.

Version 0.3: Added note to auto-detect.

Version 0.4: Fixed heading problem.

Version 1.0: Changed version number

2

IrLAP Fast Connect

Version 1.0

INFRARED DATA ASSOCIATION (IrDA) - NOTICE TO THE TRADE -

SUMMARY:

Following is the notice of conditions and understandings upon which this document is made available to members and non-members of the Infrared Data Association.

Availability of Publications, Updates and Notices

Full Copyright Claims Must be Honored

Controlled Distribution Privileges for IrDA Members Only

Trademarks of IrDA - Prohibitions and Authorized Use

No Representation of Third Party Rights

Limitation of Liability

Disclaimer of Warranty

Product Testing for IrDA Specification Conformance

IrDA PUBLICATIONS and UPDATES:

IrDA publications, including notifications, updates, and revisions, are accessed electronically by IrDA members in good standing during the course of each year as a benefit of annual IrDA membership. Electronic copies are available to the public on the IrDA web site located at irda.org. Requests for publications, membership applications or more information should be addressed to: Infrared Data Association, P.O. Box 3883, Walnut Creek, California, U.S.A. 94598; or e-mail address: info@irda.org; or by calling (925) 943-6546 or faxing requests to (925) 9435600.

COPYRIGHT:

1.Prohibitions: IrDA claims copyright in all IrDA publications. Any unauthorized reproduction, distribution, display or modification, in whole or in part, is strictly prohibited.

2.Authorized Use: Any authorized use of IrDA publications (in whole or in part) is under NONEXCLUSIVE USE LICENSE ONLY. No rights to sublicense, assign or transfer the license are granted and any attempt to do so is void.

TRADEMARKS:

1.Prohibitions: IrDA claims exclusive rights in its trade names, trademarks, service marks, collective membership marks and feature trademark marks (hereinafter collectively "trademarks"), including but not limited to the following trademarks: INFRARED DATA ASSOCIATION (wordmark alone and with IR logo), IrDA (acronym mark alone and with IR logo), IR logo and MEMBER IrDA (wordmark alone and with IR logo). Any unauthorized use of IrDA trademarks is strictly prohibited.

2.Authorized Use: Any authorized use of an IrDA collective membership mark or feature trademark is by NONEXCLUSIVE USE LICENSE ONLY. No rights to sublicense, assign or transfer the license are granted and any attempt to do so is void.

NO REPRESENTATION of THIRD PARTY RIGHTS:

3

IrLAP Fast Connect

Version 1.0

IrDA makes no representation or warranty whatsoever with regard to IrDA member or third party ownership, licensing or infringement/non-infringement of intellectual property rights. Each recipient of IrDA publications, whether or not an IrDA member, should seek the independent advice of legal counsel with regard to any possible violation of third party rights arising out of the use, attempted use, reproduction, distribution or public display of IrDA publications.

IrDA assumes no obligation or responsibility whatsoever to advise its members or non-members who receive or are about to receive IrDA publications of the chance of infringement or violation of any right of an IrDA member or third party arising out of the use, attempted use, reproduction, distribution or display of IrDA publications.

LIMITATION of LIABILITY:

BY ANY ACTUAL OR ATTEMPTED USE, REPRODUCTION, DISTRIBUTION OR PUBLIC DISPLAY OF ANY IrDA PUBLICATION, ANY PARTICIPANT IN SUCH REAL OR ATTEMPTED ACTS, WHETHER OR NOT A MEMBER OF IrDA, AGREES TO ASSUME ANY AND ALL RISK ASSOCIATED WITH SUCH ACTS, INCLUDING BUT NOT LIMITED TO LOST PROFITS, LOST SAVINGS, OR OTHER CONSEQUENTIAL, SPECIAL, INCIDENTAL OR PUNITIVE DAMAGES. IrDA SHALL HAVE NO LIABILITY WHATSOEVER FOR SUCH ACTS NOR FOR THE CONTENT, ACCURACY OR LEVEL OF ISSUE OF AN IrDA PUBLICATION.

DISCLAIMER of WARRANTY:

All IrDA publications are provided "AS IS" and without warranty of any kind. IrDA (and each of its members, wholly and collectively, hereinafter "IrDA") EXPRESSLY DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND WARRANTY OF NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS.

IrDA DOES NOT WARRANT THAT ITS PUBLICATIONS WILL MEET YOUR REQUIREMENTS OR THAT ANY USE OF A PUBLICATION WILL BE UN-INTERRUPTED OR ERROR FREE, OR THAT DEFECTS WILL BE CORRECTED. FURTHERMORE, IrDA DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING USE OR THE RESULTS OR THE USE OF IrDA PUBLICATIONS IN TERMS OF THEIR CORRECTNESS, ACCURACY, RELIABILITY, OR OTHERWISE. NO ORAL OR WRITTEN PUBLICATION OR ADVICE OF A REPRESENTATIVE (OR MEMBER) OF IrDA SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE SCOPE OF THIS WARRANTY.

LIMITED MEDIA WARRANTY:

IrDA warrants ONLY the media upon which any publication is recorded to be free from defects in materials and workmanship under normal use for a period of ninety (90) days from the date of distribution as evidenced by the distribution records of IrDA. IrDA's entire liability and recipient's exclusive remedy will be replacement of the media not meeting this limited warranty and which is returned to IrDA. IrDA shall have no responsibility to replace media damaged by accident, abuse or misapplication. ANY IMPLIED WARRANTIES ON THE MEDIA, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE LIMITED IN DURATION TO NINETY (90) DAYS FROM THE DATE OF DELIVERY. THIS WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS, AND YOU MAY ALSO HAVE OTHER RIGHTS WHICH VARY FROM PLACE TO PLACE.

COMPLIANCE and GENERAL:

Membership in IrDA or use of IrDA publications does NOT constitute IrDA compliance. It is the sole responsibility of each manufacturer, whether or not an IrDA member, to obtain product compliance in accordance with IrDA Specifications.

4

IrLAP Fast Connect

Version 1.0

All rights, prohibitions of right, agreements and terms and conditions regarding use of IrDA publications and IrDA rules for compliance of products are governed by the laws and regulations of the United States. However, each manufacturer is solely responsible for compliance with the import/export laws of the countries in which they conduct business. The information contained in this document is provided as is and is subject to change without notice.

5

IrLAP Fast Connect Version 1.0

Table of Contents

1

Introduction ............................................................................................................................................

7

2

Fast Connect Services.............................................................................................................................

7

3

Basic Algorithm......................................................................................................................................

7

 

3.1

1-Slot Discovery.............................................................................................................................

8

 

3.2

Simple Message Profile ..................................................................................................................

8

 

3.3

Message Profile Rules for Fixed Initiators .....................................................................................

8

 

3.4

Default parameters for operation at 115.2 kbps..............................................................................

9

 

3.5

Message Profile Rules for Responders .........................................................................................

10

4

Precise Description of Fast Connect Procedure....................................................................................

10

 

4.1

State Chart ....................................................................................................................................

10

 

4.2

State Definitions ...........................................................................................................................

12

 

4.3

Event Descriptions........................................................................................................................

13

 

4.4

Action Descriptions ......................................................................................................................

14

5

Auto-detect of 9600 bps and 115.2 kbps ..............................................................................................

16

6

IrLAP Fast Connect

Version 1.0

1 Introduction

The purpose of the IrLAP Fast Connect procedure is to provide a faster method of establishing an IrLAP connection in certain scenarios. The current method of establishing an IrLAP connection involves performing a device discovery procedure to discovery the 32-bit device address of another IrDA device then performing an IrLAP connect procedure. Current IrLAP media access rules require that an initiator must not hear any IR traffic for a period greater than 500ms before it can initiate a procedure such as device discovery. With the current rules it can take an initiator approximately 1 second from the time the user starts an operation to the point where the initiating device can start the IrLAP connect procedure. Some of the new IrDA applications being proposed (IrFM Express Pay and Vouchers) want the whole operation to complete within 1 second so the current IrLAP procedures are not adequate.

This document describes a new faster method for discovering a device and establishing an IrLAP connection. This new procedure is not appropriate for all scenarios and use cases. It is intended for scenarios where the initiating device occupies a fixed location (fixed-point device). An example is a tollbooth on a road. Because the initiator’s location is fixed, its IR interference space is also fixed. Under new rules accepted by the IrDA Architecture Council fixed-point devices are allowed to “own” the IR space and are not bound by the 500ms media access rule.

2 Fast Connect Services

IrLAP_FAST_CONNECT.request(Intiator Profile)

IrLAP_FAST_CONNECT.setMode(mode, Responder Profile)

IrLAP_FAST_CONNECT.indication(Source-Device-Adr, Connection-Handle)

IrLAP_FAST_CONNECT.confirm(Destination-Device-Adr, Connection-Handle)

Description: The request primitive is used to request that a fast IrLAP connection be established to the first station which responds to any of the command messages (frames) specified in the Initiator Profile. The Initiator Profile specifies the sequence of commands to send including the timing between commands, the acceptable responses and the baud rate at which to send the command and then listen for the response. The setMode primitive is used by a responder to switch from the normal NDM state machines to the Fast Connect state machine. Fast Connect uses many of the same frames used in standard IrLAP discovery and connect procedures so it is necessary to explicitly change to a Fast Connect state machine. The mode flag is used to switch between the standard NDM and Fast Connect state machines. The Responder Profile specifies the acceptable commands to which the responder will respond. It also specifies the response messages for each command, the baud rates at which to listen/respond and the number of times to retry a failed response before responding to the required XID command. The indication primitive indicates an IrLAP connection has been completed and provides the Device Address, Source-Device-Adr, of the station acting as the primary. The confirm primitive is returned on successful establishment of the connection and provides the Device Address, Destination-Device-Adr of the station acting as the secondary. After this, all primitives refer to the established connection by the Connection-Handle.

3 Basic Algorithm

The basic algorithm for the fixed initiating device is to send a continuous stream of messages, which involves sending a message and then listening a short period for a response. If the beginning of a response is heard, the fixed initiating device waits for the response to complete and then handles the response. If no response is heard during the listen period another message is sent. The purpose of the continuous stream of messages is to quickly find and connect to another device.

7

IrLAP Fast Connect

Version 1.0

The continuous stream of messages is based on a message profile. The message profile specifies which commands are sent, the order in which they are sent, the length of the listen period, the valid response for each command, and the speeds in which to send the commands and listen for the responses. The fast connect specification does not dictate a message profile but instead proposes a framework in which message profiles can be created. Different message profiles are appropriate for different “fast connect” scenarios.

Another aspect of a fast connect scenario is that only one device is assumed to be in proximity of the fixed initiator at any given moment. This means the initiator can send messages that assume only one device in the IR space. For example, the initiator can perform a 1-slot discovery instead of a 6-slot discovery or can send a broadcast SNRM and skip discovery altogether. For even faster performance the fixed initiator can send messages at speeds other than 9600 bps. For example, it could send broadcast SNRM frames at 115.2kbps. It is even possible to send non-IrDA messages periodically to connect to IR devices that do not follow the IrDA protocols.

In order to connect to existing IrDA devices a fixed initiator must perform an operation that works for devices that adhere to the IrLAP Specification version 1.1. This means the fixed initiator must perform the device discovery procedure periodically. The simplest device discovery procedure is a 1-slot discovery. The IrLAP Fast Connect procedure requires that a fixed initiator perform a 1-slot discovery at 9600 bps at least once every 3 seconds. A message profile can require that the 1-slot discovery be performed more frequently.

3.11-Slot Discovery

A 1-slot device discovery procedure consists of the following sequence of events.

1.Initiator sends a 1-slot XID command.

2.Responder sends an XID response containing responder’s 32-bit device address and optional hint bits and device name.

3.Initiator sends final XID command with optional hint bits and device name.

The initiator is only required to send the final XID command if it receives a valid XID response.

According to the IrLAP specification the slot-timer used in the device discovery procedure must not be shorter than 25ms or longer than 85ms. A fixed initiator must adhere to this rule when performing device discovery.

3.2Simple Message Profile

The simplest message profile for a fixed initiator is to send a 1-slot XID command frame at 9600 bps followed by a 25ms listen period. The expected response is a standard XID response frame. If no response is heard another 1-slot XID command is sent. This sequence is repeated continuously until a valid XID response is received upon which the fixed initiator sends a final XID command frame followed by a SNRM frame to the 32-bit device address found in the XID response. Since a fixed initiator is required to perform device discovery periodically this simple message profile is the basis for all other message profiles.

3.3Message Profile Rules for Fixed Initiators

A fixed initiator can build on the simple message profile described earlier to include other messages and responses. All message profiles must follow the rules below.

1.The fixed initiator must send a 1-slot XID command packet at 9600 bps at least once every 3 seconds.

8

IrLAP Fast Connect

Version 1.0

2.The fixed initiator must send any one of the following at least once every 500ms: (a) IrDA Frame,

(b) SIP, or (c) non-IrDA packet. This must be done in order to show that the media is busy to listening devices.

3.The fixed initiator must be able to receive an XID response at 9600 bps and upon receipt of the response send the final XID command followed by a SNRM command to the device address found in the XID response. Both the final XID and the SNRM must be sent at 9600 bps.

4.The fixed initiator can listen for other responses to the 1-slot XID command including responses that can be sent at 115.2 kbps. It should follow the 9600bps/115.2kbps auto-detect procedure described in section 5 “Auto-detect of 9600 bps and 115.2 kbps”.

5.The list of valid responses is as follows: XID response, UA response and SNRM command. These can be sent at 9600 bps or 115.2 kbps. An XID response indicates that the fixed initiator should attempt an IrLAP connection by sending a SNRM at the baud rate used to send the XID response. A UA response indicates that an IrLAP connection is established. If the UA is a response to a SNRM then negotiation takes place as normal otherwise, negotiation uses default parameters for the fixed initiator and the parameters sent in the UA for the responder. If the response is a SNRM command then the fixed initiator must send a UA response and become the secondary in an IrLAP connection. Normal negotiation takes place.

6.When sending a final XID command and/or SNRM in response to an XID response the fixed initiator must begin sending the command within 10ms of receiving the XID response.

7.The fixed initiator is allowed to send other IrDA NDM commands besides 1-slot XID including Sniff XID frames, and SNRM frames to the broadcast address. These can be sent at 9600 bps or 115.2 kbps.

8.When sending IrDA NDM commands at 9600 bps the fixed initiator must include 10 extra BOFs (XBOFs) at the beginning of the command as specified in the IrLAP specification version 1.1.

9.When sending IrDA NDM commands at 115.2kbps the fixed initiator must not include any XBOFs but must begin the frame with a single BOF (0xC0).

10.The fixed initiator is allowed to send non-IrDA messages that can result in a non-IrDA connection.

11.The fixed initiator is allowed to receive responses to a non-IrDA message that results in an IrLAP connection. The list of possible responses is described in item 4.

12.IrLAP connections established without a SNRM/UA exchange must perform parameter negotiation using default parameters for the fixed initiator. The default parameters for 9600 bps are given in the IrLAP specification. The default parameters for operation at 115.2 kbps are given below.

3.4Default parameters for operation at 115.2 kbps

The following default parameters are used for the fixed initiator for IrLAP parameter negotiation when a UA response received to any command other than a SNRM.

Baud Rate: 9600bps and 115.2kbps (PV = 0x22)

Maximum Turn Around Time: 100ms (PV = 0x07)

Data Size: 512 bytes (PV = 0x0F)

Window Size: 1 (PV = 0x01)

Additional BOFs: 0 (PV = 0x80)

Minimum Turn Around Time: 1ms (PV = 0x04)

Link Disconnect/Threshold Time: 8 seconds (PV = 0x03)

9

Соседние файлы в предмете Электротехника