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

IrLAP Fast Connect

Version 1.0

3.5Message Profile Rules for Responders

A message profile defined by a fixed initiator may send a number of commands and allow a number of responses. A responder is not required to respond to all commands nor utilize all responses. Responders that only respond to a 1-slot XID command with an XID response are legal. However, responding to the other commands and utilizing the other responses will usually result in establishing an IrLAP connection faster. Responders must follow the rules given below.

1.A responder must begin its response within 10ms of receiving the command frame.

2.If responding at 9600 bps with an IrLAP frame, the responder must send 10 XBOFs at he beginning of the response as required in the IrLAP specification version 1.1.

3.If responding at 115.2 kbps with an IrLAP frame, the responder must not send any XBOFs but must begin its response with a single BOF (0xC0)

4.When listening at 115.2 kbps the responder should following the auto-detect procedure described in section 5 “Auto-detect of 9600 bps and 115.2 kbps”.

4 Precise Description of Fast Connect Procedure

4.1State Chart

Current

Event

Action(s)

Next

State

 

 

State

NDM

Fast-Connect-Request(Pi)

send Discovery-XID-Cmd: one

QUERYF

(entry

 

ProfileI = Pi

 

state)

 

start-slot-timer

 

 

 

log := { }

 

 

Set-Fast-Connect-

Change Speed to ProfileI listen speed

 

 

if mode = True then

NDM

 

Mode(mode,Pr)

ProfileR = Pr

 

 

 

FastConMode = True

 

 

 

Change Speed to ProfileR listen

 

 

 

speed

 

 

 

else

 

 

 

FastConMode = False

 

 

Recv ProfileR allowed

Change Speed to 9600 bps

 

 

Change Speed to ProfileR speed

NRM(S)

 

Packet

Negotiate-Connection-Parameters(def)

 

 

FastConMode = True

Initialize-Connection-State

 

 

^ ProfileR response = UA

send u:ua:rsp:F

 

 

 

Apply-Connection-Parameters

 

 

Recv ProfileR allowed

start-WD-time

 

 

Change Speed to ProfileR speed

REPLYF

 

Packet

Send Discovery-XID-Rsp

 

 

FastConMode = True

Start-query-timer

 

 

^ ProfileR response =

Change Speed to ProfileR listen speed

 

 

XID

 

 

 

Recv ProfileR allowed

Change Speed to ProfileR speed

SSETUPF

 

Packet

Generate-Random-ConnectionAdr(ca)

 

 

FastConMode = True

send u:snrm:cmd:P:ca:NA

 

 

^ ProfileR response =

start-P-timer

 

 

SNRM

Change Speed to ProfileR listen speed

 

10

IrLAP Fast Connect

 

 

 

Version 1.0

 

Recv ProfileR allowed

 

Perform non-IrLAP protocol response

 

State for

 

 

 

 

 

 

 

Packet

 

 

 

non-

 

 

 

FastConMode = True

 

 

 

IrLAP

 

 

 

^ ProfileR response =

 

 

 

protocol

 

 

 

non-IrDA packet

 

 

 

 

 

 

 

Recv x:x:x:x

 

Follow normal NDM state machines

 

See other

 

 

 

FastConMode = False

 

 

 

NDM

 

 

 

 

 

 

 

state

 

 

 

 

 

 

 

machins

 

 

QUERYF

slot-timer-expired

 

if ProfileI(state) = send XID9600 then

 

QUERYF

 

 

 

 

 

Change Speed to 9600bps

 

 

 

 

 

 

 

send Discovery-XID-Cmd: one

 

 

 

 

 

 

 

log := { }

 

 

 

 

 

 

 

else

 

 

 

 

 

 

 

Change Speed to ProfileI speed

 

 

 

 

 

 

 

send ProfileI frame

 

 

 

 

 

 

 

ProfileI(nextState)

 

 

 

 

 

 

 

start-slot-timer

 

 

 

 

 

 

 

Change speed to ProfileI listen speed

 

 

 

 

 

Last-slot-timer-expired

 

 

 

 

 

 

 

 

Discovery-Indication(log)

 

SETUPF

 

 

 

 

Send SNRM (sa from log)

 

 

 

 

 

 

 

start-F-timer

 

 

 

 

 

RecvDiscovery-XID-

 

Change Speed to 9600bps

 

QUERYF

 

 

 

Rsp:sa,info at 9600bps

 

send End-Discovery-XID-Cmd

 

 

 

 

 

 

 

start-last-slot-timer

 

 

 

 

 

 

 

log := log { <sa,info> }

 

 

 

 

 

 

 

 

 

 

 

 

 

Recv ProfileI UA

 

stop-slot-timer

 

NRM(P)

 

 

Response

 

Initialize-Connection-State

 

 

 

 

 

 

 

Negotiate-Connection-Parameters(def)

 

 

 

 

 

 

 

Apply-Connection-Parameters

 

 

 

 

 

 

 

Fast-Connect-Confirm

 

 

 

 

 

 

 

send s:rr:cmd:P

 

 

 

 

 

 

 

start-F-timer

 

 

 

 

 

Recv ProfileI XID

 

Change Speed to profile speed

 

SETUPF

 

 

 

Response(sa)

 

Send SNRM (sa)

 

 

 

 

 

 

 

Change speed to ProfileI listen speed

 

 

 

 

 

 

 

start-F-timer

 

 

 

 

 

Recv ProfileI SNRM

 

Fast-Connect-Indication

 

NRM(S)

 

 

 

Command

 

Negotiate-Connection-Parameters

 

 

 

 

 

 

 

Initialize-Connection-State

 

 

 

 

 

 

 

Change Speed to profile speed

 

 

 

 

 

 

 

send u:ua:rsp:F

 

 

 

 

 

 

 

Apply-Connection-Parameters

 

 

 

 

 

 

 

start-WD-timer

 

 

 

 

 

Recv ProfileI non-IrLAP

 

Perform non-IrLAP protocol

 

State for

 

 

 

Response

 

initialization

 

non-

 

 

 

 

 

 

 

IrLAP

 

 

 

 

 

 

 

protocol

 

 

 

Recv x:x:x:x

 

Empty

 

QUERYF

 

 

REPLYF

Recv End-Discovery-XID-

 

stop-query-timer

 

REPLYF

 

 

 

Cmd

 

Discovery-Indication(remote)

 

 

 

 

 

 

 

start-query-timer

 

 

 

 

11

IrLAP Fast Connect

 

Version 1.0

 

 

 

 

 

 

Recv u:snrm:cmd:P:c:d

Fast-Connect-Indication

NRM(S)

 

 

Negotiate-Connection-Parameters

 

 

 

 

Initialize-Connection-State

 

 

 

 

Change Speed to ProfileR speed

 

 

 

 

send u:ua:rsp:F

 

 

 

 

Apply-Connection-Parameters

 

 

 

 

start-WD-timer

 

 

 

query-timer-expired

Empty

NDM

 

 

Recv x:x:x:x

Empty

REPLY

 

SSETUPF

P-timer-expired

Disconnect-Indication

NDM

 

 

recv u:ua:rsp:F

stop-P-timer

NRM(P)

 

 

 

Initialize-Connection-State

 

 

 

 

Negotiate-Connection-Parameters

 

 

 

 

Apply-Connection-Parameters

 

 

 

 

Fast-Connect-Confirm

 

 

 

 

send s:rr:cmd:P

 

 

 

 

start-P-timer

 

 

 

recv x:x:x:x

Empty

SSETUP

 

SETUPF

F-timer-expired

Disconnect-Indication

NDM

 

 

recv u:ua:rsp:F

stop-F-timer

NRM(P)

 

 

 

Initialize-Connection-State

 

 

 

 

Negotiate-Connection-Parameters

 

 

 

 

Apply-Connection-Parameters

 

 

 

 

Fast-Connect-Confirm

 

 

 

 

send s:rr:cmd:P

 

 

 

 

start-F-timer

 

 

 

recv x:x:x:x

Empty

SETUPF

 

4.2State Definitions

NDM. The station is in the normal disconnected mode. It can initiate or respond to local and remote requests to connect with a remote peer layer, it can initiate or respond to local and remote discovery and address resolution procedure requests.

QUERYF. The local layer is currently executing the discovery procedure. It has transmitted a 1-slot discovery XID command frame and is waiting for a response that matches its message profile.

REPLYF. A 1-slot XID discovery command frame has been received from a remote peer layer. An XID response has been sent. The local layer is waiting for a SNRM frame. If it receives an the final XID command frame indicating the end of discovery it will send an indication to the upper layer.

SSETUPF. The local layer has transmitted a SNRM command frame to a remote peer layer that earlier issued a sniff-XID-response frame and is awaiting a reply.

SETUPF. The local layer has transmitted a SNRM command frame to a remote peer layer and is awaiting a reply.

NRM(P). The station is in the normal response (connected) mode playing the primary role.

NRM(S). The station is in the normal response (connected) mode playing the secondary role.

State for non-IrLAP protocol. The station supports both IrDA and non-IrDA protocols and is branching to the non-IrDA state machine.

12

IrLAP Fast Connect

Version 1.0

4.3Event Descriptions

Fast-Connect-Request(Pi). The service user has requested a fast connect procedure be initiated using the Initiator Profile Pi. The Pi profile specifies the command message sequence, allowed responses and the transmit/listen speeds.

Set-Fast-Connect-Mode(mode,Pr). The service user has requested that the IrLAP layer change the NDM state machine. If mode is true then enter into a fast connect listen mode using profile Pr. The Responder Profile (Pr) specifies the command messages to listen for, the allowed response(s), the listen/respond speed, and the number of times to retry failed response attempts before responding to the required XID message at 9600bps. If mode is false then use the standard NDM state machine.

Recv ProfileR allowed Packet. A packet that matches the allowed commands as specified in the responder (Pr) profile has been received.

FastConMode = True. The IrLAP layer is currently in fast connect listen mode (using the Fast Connect state machine).

ProfileR response = UA. The Responder Profile specifies that the response is an UA frame.

ProfileR response = XID. The Responder Profile specifies that the response is an XID frame.

ProfileR response = SNRM. The Responder Profile specifies that the response is a SNRM frame.

ProfileR response = non-IrDA packet. The Responder Profile specifies that the response is a non-IrDA packet.

Recv x:x:x:x Indicates the event “receive any frame addressed to this station that has not been specifically enumerated for this state”.

FastConMode = False The variable FastConMode is equal to False which means use the standard IrLAP NDM state machines.

slot-timer-expired The slot timer has expired.

Last-slot-timer-expired The timer used to time the final XID in a standard 1-slot discovery has expired. This event indicates that the final XID has been sent so a SNRM can then be sent.

RecvDiscovery-XID-Rsp:sa,info at 9600bps An XID response to the 1-slot XID command has been received at 9600 bps. This is the normal response to a 1-slot discovery and indicates to the initiator that it should send the final XID and then a SNRM at 9600 bps.

Recv ProfileI UA Response Received an UA response frame at a valid speed as allowed by the Initiator profile.

Recv ProfileI XID Response(sa) Received a XID response frame at a valid speed as allowed by the Initiator profile.

Recv ProfileI SNRM Command Received a SNRM command frame at a valid speed as allowed by the Initiator profile.

Recv ProfileI non-IrLAP Response Received a non-IrLAP packet at a valid speed as allowed by the Initiator profile.

Recv End-Discovery-XID-Cmd Received the final XID command frame of a 1-slot discovery.

13

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