Medium access control protocol for wireless communication

Abstract: A method is provided for controlling access to a communication medium intended for sharing by a least two stations to enable peer-to-peer communications therebetween. It includes the steps of sensing the medium at a first station to determine if the medium is in use. The first station transmitting a connection request message intended for a second station if the first station senses that the medium is not in use. Receiving at the second station the connection request message. The second station transmitting a connection confirm message intended for reception at the first station for the purpose of establishing a reservation of the transmission medium for use by the first and second stations. Transmitting information as one or more date messages from the first station to the second station. The second station upon receiving the last of the data messages from the first station transmitting an acknowledgement message intended for reception by the first station. The first station upon receiving the acknowledgement message subsequently transmitting a disconnect request message to the second station. The second station upon receiving the disconnect request message subsequently transmitting a disconnect confirm message for reception by the first station for the purpose of ending the reservation of the medium.

Description: There are a number of techniques for communicating between independent data processing stations using well known medium such as infrared or radio frequency. In an article entitled "A New Channel Access Message For Packet Radio" which was published in the proceedings of the ARRL Ninth Computer Networking Conference, London, Ontario, Canada, September 22, 1990, ISDN0-87259-337-1 by Phil Karn, there is disclosed a channel access method for use by multiple packet radio stations on a shared simplex packet radio channel which permits different stations to initiate independent access to the channels and initiate conversations with other stations. The article proposes a technique for multiple access with collision avoidance to reduce the interference of stations with each other, however there is no disclosure of any message for providing fairness of access, to maximize the utilization of the medium by each station and reduce the waiting of each station for access to the medium; and there is no mechanism for making medium reservations between stations nor is there a mechanism for terminating conversations. U.S. Patent 5,231,634 issued July 27, 1993 and assigned to Proxim, Inc., discloses a medium access protocol for wireless LAN which requires a station intending to initiate communications to send reservation duration information in its request to the intended receiving station to reserve a fixed block of time for its proposed communications or conversation. This may pose some problems as there is no allowance provided for retries and if there is a problem in communications a new reservation is required which may necessitate delays because other stations may have initiated communications at the end of the reservation. U.S. Patent 4,661,902 issued April 28, 1987 and assigned to Apple Computer, Inc. discloses a local area network with carrier sense collision avoidance, however it does not disclose a means by which the stations not involved in the conversation acknowledge and obey a conversation reservation. The system disclosed is a hardwired system which does not address the problem with hidden terminal and can therefor depend wholly upon CSMA/CA which is Carrier Sense Multiple Access With Collision Avoidance. This reference shows the initiation of conversations by the transmission of a request to send message by the transmitting station and a clear to send message sent back to the transmitting station by the intended receiving station. The non-conversant stations performs a carrier sense to detect when the communication medium is free for their use. Thus they are free to try to initiate conversations during the conversations of other stations. Unlike a wired environment, in a wireless environment such as infrared or radio frequency not all stations are able to hear all the other stations. This is referred to as the hidden terminal. The problem with hidden terminal is that they need to be made aware of the reservation effected by a communicating pair of stations so that they do not interrupt the conversation and cause a collision. This problem occurs in wireless lans as it is possible for one or more station (or terminals) to be intermittently shielded from the others, for instance, by being moved or by the interposition of an obstruction. This is particularly important in a portable environment as a portable station such as a lap top or palm top are quite mobile and may move out of range. The foregoing and other problems are overcome by the method of the invention disclosed herein. In accordance with the present invention, there is now provided a method for controlling access to a communication medium intended for sharing by at least two stations to enable peer-to-peer communications therebetween, comprising the steps of: sensing the medium at a first station to determine if the medium is in use; the first station transmitting a connection request message intended for a second station if the first station senses that the medium is not in use; receiving at the second station the connection request message, the second station transmitting a connection confirm message intended for reception at the first station for the purpose of establishing a reservation of the transmission medium for use by the first and second stations; transmitting information as one or more data messages from the first station to the second station; the second station upon receiving the last of the data messages from the first station transmitting an acknowledgement message intended for reception by the first station; the first station upon receiving the acknowledgement message subsequently transmitting a disconnect request message to the second station; the second station upon receiving the disconnect request message subsequently transmitting a disconnect confirm message for reception by the first station for the purpose of ending the reservation of the medium. Viewing the present invention from another aspect, there is now provided communications control apparatus for controlling access by a first communication station to a communication medium intended for sharing by at least two stations for the purpose of enabling peer-to-peer communications therebetween, comprising: means for determining if the medium is being used; message generating means for generating messages for transmission by the first station for purposes of communicating information with another station; the message generating means being adapted to generate a connection request message for transmission to a second station if the routine for determining if the medium is being used determines that the medium is not in use; means for identifying a connection confirm message sent from the second station in response to the connection request message for the purpose of establishing a reservation of the transmission medium for use by the first and second stations for the purpose of communicating therebetween; means for generating data messages from information provided to the communications control means for the purpose of transmission to another station; means for identifying an acknowledgement message sent by the second station upon the second station detecting the last of the data messages from the first station; means for generating a disconnect request message in response to the identification of the acknowledgement message for transmission to the second station; means for identifying a disconnect confirm message, sent by the second station upon the second station detecting the disconnect request message, means responsive to the identification of the disconnect confirm message adapted to cause the first station to relinquish reservation of the medium to permit subsequent reservations to be obtained. The present invention advantageously provides a method of controlling peer-to-peer communications in networks where all stations or nodes are equally able to communicate with all other stations within range of their communications. The transmission medium to which this invention pertains may include infra red light, radio frequency, ultraviolet or other electrical magnetic media. In the peer-to-peer communications to which this invention relates the stations are typically, but not necessarily in a local area network and usually communicate on the same channel or frequency. In a preferred embodiment of the present invention there is provided a protocol for communication comprising: reserving the media; sending data; receiving data; preserving fair access to the media; and reconciling collisions and other error conditions. In a particularly preferred embodiment of the present invention there is provided the method for controlling access to communications medium shared by at least two stations to provide peer-to-peer communication there between. Communicating a message comprises the steps in which the intended initiating station senses the communication medium to determine if a communication medium is in use. If it finds that the communication medium is not in use it transmits a (CR) connection request message directed to a second station. The message comprises identification information of the first station. The receiving or second station, receives the connection request message and transmits a connection confirm (CC) message which is intended for receipt by the initiating station. The connection confirm message comprises identification of the second station and is intended to establish a reservation of the transmission medium for the communication of messages between the first and second station. Other, (eg. a third), stations may receive the connection request or the connection confirm message depending on whether they are fully connected or partially hidden. If they are close enough to the sending and receiving station fully connected they will receive both the connection request and connection confirm messages. Upon receipt of either of the connection request or connection confirm messages the third station transitions into a wait state of preselected time period during which the third station does not transmit messages on the medium until it detects the expiration of the reservation between the first and second stations by detecting a (DR) disconnect request message or disconnect confirm (DC) message from the stations. If the wait state expires before the third station detects a disconnect request or disconnect confirm message it will perform a carrier sense to determine if the medium is in use and if the medium is not in use return to an idle state or if the medium is in use will return to a wait state of a predetermined period. During the reservation or conversation between the first and second stations the first station will transmit one or more data messages (XFR) to the second station. This can include multiple transmissions and the second station will, upon receiving the last message, send an (XAK) acknowledgement message back to the first station including information identifying what data frames were received successfully. The first station upon receiving an acknowledgment from the second station that one or more of the messages were not successfully received will retransmit the unsuccessfully received data messages to the second station. The second station upon receiving the last of the retransmitted data messages will send a retry acknowledgment message to the first station including information identifying which data messages were received successfully. The first station receives the retried acknowledgement message. If the acknowledgement message indicates that they were still unsuccessful transmission then it will be necessary for the first station to retry sending the complete message at a later time; basically establishing another reservation. The implementation of the invention herein can be achieved by software (eg. routines or device drivers) or microcode at each station. Alternately hardwired circuitry can be employed to implement the invention herein. These techniques will be apparent to those skilled in the art to which this invention relates. A preferred embodiment of the present invention will now be described with reference to the accompanying drawings herein, in which: Figure 1 is a drawing of message frame contents used in communications using the invention herein; Figure 2 is a drawing showing reservation based conversation flow without retry; Figure 3 is a drawing showing reservation based conversation flow with retry; Figure 4 is a drawing showing nonparticipating station flow; Figure 5 is a drawing showing typical timing of network accessing; and Figure 6 is a drawing depicting typical communication networks that are partially overlayed and have partially hidden stations. DATA REFERENCES Data Packets Actual data to be transmitted. Segments Pieces of a Data Packet. The sum of all the segments will form the original Data Packet. Frames Encapsulated segments that are actually transmitted over the medium including Segments plus protocol frame fields. Fields Portions of frame having defined uses TRANSMISSION REFERENCES Broadcast A frame that is sent to all stations and processed by all stations. Addressed A frame that is addressed to a specific station and processed only by that station. Directed Broadcast A frame that is sent to all stations but only acted upon by the station to which it was directed. Referring to Figure 1, it can be seen that the present invention transmits messages or data in data packets typically known as frames. The use of frames for data transmission is well known. In the frames used, in accordance with the described embodiment of the invention herein, each of the message frames includes a commonly structured header having the following fields: The first field (DST) of the header comprises the Destination Station's address, which can be a broadcast, or a unique station address. The second field (SRC) comprises the initiating station's address. The third field (RSVD) is optional and may be reserved for other information. The fourth field (REV) is also optional and can be used, for instance, to identify the version of the communication protocol used. The fifth field (TYPE) identifies the type of frame, eg. CR, CC, etc. as described below. There are six basic communication message types which are used in practising the invention herein. These message types are listed and described below. Each one uses the common header described above. The Connection Request frame (CR) includes the following fields: SEG SIZE which identifies the maximum size of the data field within the XFR frame (described below) to be used within the requested conversation which is to follow. SEG CNT identifies which packet in a series of packets is being transmitted. MAX SEG identifies how many XFR frames will be transmitted by the initiating station during the requested conversation. REAL DST is the specific address for the targeted station with which a conversation is to be initiated. The Connection Confirm frame (CC) includes the same SEG SIZE, SEG CNT, AND MAX SET fields and information as the Connection Request frame does; however, the REAL DST frame contains the specific address of the initiating station. The Data Transfer frame (XFR) which is adapted to transfer the data or information from the initiating station to the receiving station includes the following fields: SEG CNT, MAX SEG, RSVD, and Data which have been defined previously in relation to the CR?CC frames and the header. The Transfer Acknowledgement frame (XAK) contains a number of fields (in this case 3) which are used to identify which XFR frames have been received successfully or not. The Disconnect Request frame (DR) includes a REAL DST field to identify the specific address for the targeted receiving station with which a conversation has been occurring; a number of fields (RSVD) for optional purpose; The Disconnect Confirm frame (CC) includes a REAL DST field containing the specific address of the initiating station. Table 1 provides definitions of the symbols used in the following drawings 2, 3, and 4. Figure 2 depicts initiation of communications between two stations in a communication network in accordance with one embodiments of the invention. Reservation of the medium, data transfer and termination of the reservation or communications between the first and second station will be described. Assuming for the purposes of this illustration that the transmission medium is unoccupied for the time being, station one which is identified as the transmitter in Figure 2 and station 2 which has been identified as the receiver in Figure 2 will both be in the idle state. To initiate a conversation, station 1 sends out a connection request on the medium directed to station 2 and then enters a wait state WCC awaiting confirmation of receipt of the connection request from station 2. Upon receipt of a connection confirm message CC from station 2, station 1 changes wait states, from WCC to the WXAK state. In order to transfer data, station 1 transmits an XFR frame (containing data as described above) directed to station 2 which receives it and sends back an acknowledgment XAK; which station 1 receives. Station 2 transitions into a wait state WDR awaiting a disconnect request DR. To terminate a communication reservation station 1 transmits a disconnect request DR which is received by station 2. Station 1 awaits a disconnect confirm DC from station 2. Upon receiving a disconnect confirm DC from station 2 station 1 returns to an idle state. Station 2 returns to an idle state upon transmitting the disconnect confirm DC message to station 1. Referring to Figure 3 which depicts the progression of a conversation from initiation to termination with retry from an incomplete message or data transmission, it can be seen that the initial reservation sequence and the first date transmission sequence are the same as depicted in Figure 2. However, the subsequent data transfer steps differ slightly, given the selective retransmission of XFR frames that were received incomplete, with errors or not received at all. The initiating station upon receiving an XAK frame from the receiving station containing non-zero MSK fields indicates one or more failed XFR frames enters a retransmission cycle RXFR in which it resends the XFR frames indicated by the MSK fields in the XAK frame. After receiving the last retransmitted frame (RXFR frames) the reservation of the medium is terminated in the same manner as described with respect to Figure 2. Figure 4 illustrates the possible transitions between states in the third station; not participating in the conversation between the aforementioned initiating (first station) and receiving stations (second station). The transition indicated is designed to assure that the third station will not interfere with a reservation being established and will be able to re-enter the contention period for use of transmission medium only after receiving reservation termination frames (DR, DC) or following the elapse of the appropriate safety timer (WTS-T1, WTS-T2, WTS-Tn). The random delays indicated in Figure 4 are intended to achieve fairness in medium access among contending stations following the termination a reservation. Referring to Figure 5 which show how one embodiment of the protocol of this invention achieves fairness in medium contention for all participating stations. Before entering contention for the medium every station waits for a random amount of time. As can be seen some stations may be partially hidden, or not hidden, from the transmissions of conversing stations 1, and 2. Station 1, 3, 4 and 5 will wait a random time, between zero and a maximum backoff time less interference gap time. Station 2 will wait a random time, between interframe gap time and maximum backoff time. These random intervals will equalize the opportunity amongst the stations to initiate conversations. The advantage that station 2 has is neutralized by imposing the randomization from a non zero base. The randomization of delay timer can be achieved in various ways. For instance, by programs or hardware of each station generating a random number that is used to derive a corresponding random time delay. The maximum time delay is chosen to minimize the chance of more than one station entering the contention period (contending with each other) at the same time and minimizing the amount of idle medium time between conversations. Occasionally, even in view of the randomizing techniques for obtaining fairness and avoiding more than one station attempting to initiate a conversation at the same time, a collision may occur when two stations send a connection request simultaneously. Stations within range of both initiating stations will be unable to process either connection request due to errors caused by the presence of the conflicting signals simultaneously on the medium, and will remain in their current states. Partially hidden stations receiving either one of the connection requests, while not being targeted by the requests, will transition into a wait state (see WTS timeout in Figure 4) in anticipation of an impending conversation. After a random delay these stations will time-out and transition to an idle state. The two initiating stations await receipt of connection confirm frames from their intended receiving stations in a wait state WCC which is shorter than WTS timeout of the non participating stations. When these states time out, each initiating station may then retry initiating a conversation. Further collisions will be avoided by the imposition of random delays in retransmitting. In the event that unforeseen error conditions occur in which one or more stations determine that frames being received do not conform to the expected protocol sequences, it may be advantageous to require such stations to perform a stabilization procedure in which it transitions to, or remains at idle, but is restricted from contending for the medium until a stabilization period, for instance 2WTS timeout periods. The same stabilization procedure may also prove advantageous for newcomers to a network. The following section of the description of a preferred embodiment of the invention herein uses state tables to describe the processes carried out by stations employing the protocol of the invention. The following definition are used. STATED IDLE, {idle, not participating, free to contend} WCC, {wait for Connect confirm} WTS, {waiting for a specified number of time slots to expire} WDR, {waiting for a disconnect request} WDC, {waiting for a disconnect confirm} WXAK, {waiting for an xak mac frame} WRXAK {waiting for an xak in recovery state} WXFR, {currently own the medium for reception} WRXFR, {waiting for xfr in recovery state} WPC, {waiting for a poll confirm} FRAME TYPES cr {connect request (directed broadcast)} cc {connect confirm (directed broadcast)} xfr {data transfer (addressed)} xak {data transfer acknowledge (addressed)} dr {disconnect request (directed broadcast)} dc {disconnect confirm (directed broadcast)} Each cell in a state table designates (a) the next state to be reached in response to an occurrence of an event, given the stations initial state, and (b) the steps (transitions) (which are noted in "( )", eg. "(1)") required to move from the station's initial state to the next state (which is noted in letters (eg. WXFR). Where more than one state name is listed in a cell (eg. WCC, WDC) this implies alternative possibilities. Where no state name appears in a cell and a "-" appears before the transition number (eg. "-(7)") this denotes that no change in state will occur in response to the event. The state table will use the (!) to designate a directed broadcast frame received that was addressed for another node. If the (!) is not present then it will indicate the directed broadcast was addressed for the receiving node. Reservation State Table For Any Station ITEM INITIAL STATE IDLE WCC WTS WDR WDC Send Data Packet WCC -(23) -(23) -(23) -(23) IDLE(22) Timeout -(7) WCC IDLE(25) IDLE(40) IDLE(41) WDC(18) CR (directed) WXFR(1) -(2) -(2) -(2) -(2) CR! (directed) WTS(5) -(2) -(2) -(2) -(2) CC (directed) -(7) WXAK (8) -(7) -(7) -(7) CC! (directed) WTS(5) WTS (28) -(2) WTS (5) WTS (5) XFR (addressed) -(7) -(7) -(7) -(7) -(7) XAK (addressed) -(7) -(7) -(7) -(7) -(7) DR (directed) -(2) -(2) -(7) WTS (44) -(7) DR! (directed) WTS (31) -(2) WTS (31) -(7) -(2) DC (directed) -(2) -(7) -(7) -(7) IDLE(43) DC! (directed) -(2) -(2) IDLE(43) -(7) -(7) Data Transfer State Table EVENT INITIAL STATE WXAK WRXAK WPC WXFR WRXFR Send Data Packet -(23) -(23) -(23) -(23) -(23) Timeout CR (directed) WPC(20) -(2) WDC(49) -(2) WDC(26) -(2) WRXFR(21) -(4) WDR(27) -(2) CR! (directed) -(2) -(2) -(2) -(2) -(2) CC (directed) -(7) -(7) -(7) -(7) -(7) CC! (directed) -(7) -(7) -(7) WTS (5) -(7) XFR (addressed) -(7) -(7) -(7) WXFR WRXFR WRXFR WDR (29) WDR (9) XAK (addressed) WRXAK WDC(30) -(2) -(7) -(7) WDC(10) DR (directed) -(7) -(7) -(7) -(7) -(7) DR! (directed) -(7) -(7) -(7) -(7) -(7) DC (directed) -(7) -(7) -(7) -(7) -(7) DC! (directed) -(7) -(7) -(7) -(7) -(7) TRANSITION DESCRIPTIONS In the transition descriptions follow, some global state variables are used. They are defined as follows: TIME DEFINITIONS The following list of timer definitions will be useful in understanding the relationship between states in both the reservation and the data transfer state tables, suggesting means of calculating appropriate values. The following is a list of transmissions used in the following tables. TRANSITION 1 TRANSITION 2 ignore action/event. TRANSITION 3 TRANSITION 4 TRANSITION 5 TRANSITION 7 An invalid event/action has occurred, this situation should only happen if the protocol is implemented incorrectly. Log the type of error by recording the event/state. TRANSITION 8 TRANSITION 9 TRANSITION 10 TRANSITION 18 TRANSITION 20 TRANSITION 21 TRANSITION 22 TRANSITION 23 Queue the Mac tx request next state (same) TRANSITION 25 TRANSITION 26 TRANSITION 27 TRANSITION 28 TRANSITION 29 TRANSITION 30 TRANSITION 31 TRANSITION 40 TRANSITION 41 TRANSITION 42 TRANSITION 43 TRANSITION 44 TRANSITION 46 TRANSITION 48 TRANSITION 49 EXAMPLES OF CONVERSATIONS USING THE PREFERRED EMBODIMENT OF THE INVENTION This section provides a temporal view of how some common conversations would progress through the defined state tables. The list of examples is not meant to be exhaustive, but to be representative of typical conversations. The scenarios in this section assume that CR, CC, DR and DE frames are directed broadcast frames. All other frames, xfr, and xak, are addressed and are not processed by a station unless the destination address matches the station's address. Figure 6 shows the network and station relationships used in the scenario examples and Table 4 gives a brief explanation on how to read the scenario tables and what the fields in the columns mean. Example Table: Definition of table nomenclature used in following tables. STATION X STATION Y NEXT FRAME/ACTION State Queue State Queue Station X: Current State Where the state includes a subscript character, the subscript indicates the station from which the frame is expected. As an example, WXFR Y means X is expecting to receive a WXFR frame from Y. (T-n) Next Transition to perform given the Station X's current state and its next frame in the queue. Based on transition definitions in protocol specification. Station X: FIFO queue of received frames. All frames are shown in 4 character codes. As an example XcrY is a cr frame sent from X and addressed to Y. Station Y: Current State Where the state includes a subscript character, the subscript indicates the station from which the frame is expected. As an example, WXFR X means Y is expecting to receive a WXFR frame from X. (T-n) Next transition to perform given the Station Y's current state and its next frame in the queue. Based on transition definitions in protocol specification. Station Y: FIFO queue of received frames. All frames are shown in 4 character codes. As an example XcrY is a cr frame sent from X and addressed to Y. Next Frame/Action: Input stimuli for current state. Frame being transmitted or action occurring. SINGLE NETWORK RACE CONDITIONS Single Network Race Condition #1a. Station X sends to Station Y at the same time Station I sends to Station J. Station X Station Y Station I Station J Next Frame/Action State Queue State Queue State Queue State Queue Idle - Idle - Idle - Idle - WCC - Idle - Idle - Idle - XcrY WCC - Idle (T-1) XcrY WCC (T-2) XcrY Idle (T-5) XcrY IcrJ WCC (T-2) IcrJ WXFR X (T-2) IcrJ WCC - WTS (T-2) IcrJ YccX WCC (T-8) YccX WCFR X - WCC (T-28) YccX WTS (T-2) YccX XxfrY WXAK Y - WXFR X (T-9) XxfrY WTS - WTS - YXakX bf=0 WXAK Y (T-10) YxakX WDR X - WTS - WTS - XdrY WDC Y WDR X (T-44) XdrY WTS (T-31) XdrY WTS (T-31) XdrY YdcX WDC Y (T-43) YdcX WTS - WTS (T-43) YdcX WTS (T-43) YdcX Y-TS timer Idle - Idle - Idle - Idle - Single Network Race Condition #1b. Station X sends to Station Y at the same time Station I sends to Station J. Station X Station Y Station I Station J Next Frame/Action State Queue State Queue State Queue State Queue Idle - Idle - Idle - Idle - WCC - Idle - Idle - Idle - XcrY WCC - Idle (T-1) XcrY Idle (T-5) XcrY Idle (T-5) XcrY I-Rx Interrupt WCC (T-2) WXFR X (T-2) IcrJ WTS - WTS YccX At this point the race condition is resolved and the conversation will end normally. Single Network Race Condition #2. Station X sends to Station Y at the same time Station Y sends to X. Station X Station Y Station Station_ Next Frame/Action State Queue State Queue State Queue State Queue Idle - Idle - WCC - Idle - XcrY WCC - WCC (T-2) XcrY YcrX WCC (T-2) YcrX WCC - WCC - WCC - At this point both stations stay in WCC mode until the WCC_t timeout occurs. Then they will backoff off for different random time periods before resending their cr's. The node with the shorter backoff will get the medium for transmission. Single Network Race Condition #3. Station X sends to Station Y at the same time Station I sends to Y. Station X Station Y Station I Station_ Next Frame/Action State Queue State Queue State Queue State Queue Idle - Idle - Idle - WCC - Idle - Idle - XcrY WCC - Idle (T-1) XcrY WCC (T-2) XcrY IcrY WCC (T-2) IcrY WXFR X (T-2) IcrY WCC - YccX WCC (T-8) YccX WXFR X - WCC (T-5) YccX WXAK Y - WXFR X - WTS - XxfrY At this point the contention has been resolved and the session between X and Y will continue through xfr's and xak to completion. Station I's WTS_t timer will pop and it will move into an Idle state. Single Network Race Condition #4. Station X sends to Station Y at the same time Station Y sends to I. Station X Station Y Station I Station_ Next Frame/Action State Queue State Queue State Queue State Queue Idle - Idle - Idle - WCC - Idle - Idle - XcrY WCC - WCC (T-2) XcrY Idle (T-5) XcrY YcrI WCC (T-2) YcrI WCC - WTS (T-2) YcrI WCC - WCC - WTS - X-WCC_t Timeout WDC - WCC - WTS - XdrY Whole bunch of interleaved XdrY and YdrI requests up to MAX_RETRIES WDC - WCC (T-2) XdrY WTS (T-31) Y-WCC_t Timeout WDC - WDC - WTS - YdrI WDC (T-2) YdrI WDC WTS (T-2) YdrI X-WDC_t Timeout I-WTS_t Timeout WDC (T-41) - WDC - WTS (T-25) - Y-WDC_t Timeout Idle - WDC (T-41) - Idle - Idle - Idle - Idle - Single Network Race Condition #5. Station Y sends to Station I at the same time Station X sends to Y. Station X Station Y Station I Station_ Next Frame/Action state Queue State Queue State Queue State Queue Idle - Idle - Idle - Idle - WCC - Idle - YcrI WCC (T-2) YcrI WCC - Idle (T-1) YcrI XcrY WCC - WCC (T-2) XcrY WXFR Y (T-2) XcrY IccY WCC (T-28) IccY WCC (T-8) IccY WXFR Y - WTS - WXAK I - WXFR Y - YxfrI At this point the contention has been resolved and the session between Y and I will continue normally to completion. HIDDEN STATION RACE CONDITIONS Hidden Station Race Condition #1. Station Y receives cr's from Station X and Z (where X and Z are hidden from each other). Station X Station Y Station Z Station_ Next Frame/Action State Queue State Queue State Queue State Queue Idle - Idle - Idle - WCC - Idle - Idle - XcrY WCC - Idle (T-1) XcrY WCC - ZcrY WCC - WXFR X (T-4) ZcrY WCC - YccX WCC (T-8) YccX WXFR X WCC (T-28) YccX WXAK Y - WXFR X - WTS - At this point the contention has been resolved and the session between X and Y will continue through xfr's and xak to completion. Station Z will eventually hear the YdeX or its WTS_t timer will pop. In either case it will move into an Idle state. Hidden Station Race Condition #2. Station Y sends CR to Z and X sends CR to Y (where X and Z are hidden from each other and YcrZ wins the race condition). Station X Station Y Station Z Station_ Next Frame/Action State Queue State Queue State Queue State Queue Idle - Idle - Idle - Idle - WCC - Idle - YcrZ WCC (T-2) YcrZ WCC - Idle (T-1) YcrZ XcrY WCC - WCC (T-2) XcrY WXFR Y - ZccY WCC - WCC (T-8) ZccY WXFR Y - WCC - WXAK Z - WXFR Y - YxfrZ WCC (T-18) - WXAK Z - WXFR Y (T-9) YxfrZ WCC_t Timeout XcrY WCC WCC - WXAK Z (T-2) XcrY XcrY WXFR Y (T-9) YxfrZ YXfrZ ZxakY bf=0 WCC - WXAK Z (T-10) ZxakY WDR - YdrZ WCC YdrZ WDC - WDR(44) YdrZ WCC - WDC - WTS - ZdcY WCC - WDC ZdcY WTS - WCC - IDLE - IDLE - Hidden Station Race Condition #3. Station X sends cr to Station Y just as Station Z sends cr to Station J (where X and Z are hidden from each other). Station X Station Y Station Z Station J Next Frame/Action State Queue State Queue State Queue State Queue Idle - Idle - Idle - Idle - WCC - WCC - Idle - Idle - XcrY WCC Idle (T-1) XcrY WCC (T-2) XcrY Idle (T-5) XcrY ZcrJ WCC - WXFR X (T-2) ZcrJ WCC - WTS (T-2) ZcrJ YccX WCC (T-8) YccX WXFR X - WCC (T-5) - WTS (T-2) YccX WXAK Y - WXFR X - WTS - WTS - At this point the contention has been resolved and the session between X and Y will continue through xfr's and xak to completion. Station Z's and Station J's WTS_t timer will pop and they will move into an Idle state. Hidden Station Race Condition #4 Station Y sends to Station X at the same time Station J sends to Station Z. Station X Station Y Station Z Station J Next Frame/Action State Queue State Queue State Queue State Queue Idle - Idle - Idle - Idle - Idle - WCC - Idle - Idle - YcrX Idle (T-1) YcrX WCC - Idle (T-5) YcrX WCC (T-2) YcrX JcrZ WXFR Y (T-2) JcrZ WCC (T-2) JcrZ WTS (T-2) JcrZ WCC - XccY WXFR Y - WCC (T-8) XccY WTS (T-2) XccY WCC (T-28) XccY WXFR Y - WXAK - WTS - WTS - YxfrX WXFR Y (T-9) YxfrX WXAK - WTS - WTS - XxakY WDR Y - WDC X (T-10) XxakY WTS - WTS - YdrX WDR Y (T-44) YdrX WDC X - WTS (T-31) YdrX WTS (T-31) YdrX XdcY WTS - WDC X (T-43) XdcY WTS - WTS (T-43) XdcY X,Z,J WTS_t Timeout Idle - Idle - Idle - Idle - HIDDEN STATION COLLISION CONDITIONS Hidden Station Collision Condition #1. Station X sends cr to Station Y at the same time Station Y sends cr to Station Z (where X and Z are hidden from each other). Station X Station Y Station Z Station J Next Frame/Action State Queue State Queue State Queue State Queue Idle - Idle - Idle - Idle - WCC - WCC - Idle - Idle - XcrY YcrZ WCC * WCC * Idle (T-1) YcrZ Idle WCC - WCC - WXFR Y - Idle - ZccY WCC - WCC (T-8) ZccY WXFR Y - Idle (T-5) ZccY WCC (T-18) - WXAK Z - WXFR Y - WTS - WCC_t Timeout Xcr Y WCC - WXAK Z (T-2) XcrY WXFR Y - WTS (T-2) XcrY YxfrZ WCC - WXAK Z - WXFR Y (T-9) YxfrZ WTS - ZxakY WCC - WXAK Z ZxakY Idle - WTS - WCC - Idle - Idle - WTS - WTS_t Timeout WCC - Idle - Idle - Idle - WCC - Idle - Idle - Idle - Hidden Station Collision Condition #2. Station J sends cr to Station Z at the same time Station X sends cr to Station Y (where X and Z are hidden from each other). Station X Station Y Station Z Station J Next Frame/Action State Queue State Queue State Queue State Queue Idle - Idle - Idle - Idle - WCC - Idle - Idle - WCC - JcrZ XcrY WCC JcrZ Idle JcrZ XcrY Idle JcrZ WCC XcrY WTS - WTS - WXFR - WTS - ZccJ WTS - WTS ZccJ WXFR - WTS ZccJ WTS - WTS - WXFR - WTS - Idle - Idle - Idle - Idle - WTS_t Timeout WXFR_t Timeout Hidden Station Collision Condition #3. Station X sends cr to Station Y at the same time Station J sends cr to Station Z (where X and Z are hidden from each other). Station X Station Y Station Z Station J Next Frame/Action State Queue State Queue State Queue State Queue Idle - Idle - Idle - Idle - WCC - Idle - Idle - WCC - XcrY JcrZ WCC JcrZ Idle XcrY JcrZ Idle JcrZ WCC XcrY WTS - WXFR - WXFR - WTS - YccX ZccJ WTS YccX WXFR ZccJ WXFR YccX WTS YccX ZccJ WTS - WTS - WTS - WTS - Idle - Idle - Idle - Idle - WTS_t Timeout

Claims: A method for controlling access to a communication medium intended for sharing by at least two stations to enable peer-to-peer communications therebetween, comprising the steps of: sensing the medium at a first station to determine if the medium is in use; the first station transmitting a connection request message (CR) intended for a second station if the first station senses that the medium is not in use; receiving at the second station the connection request message (CR), the second station, upon receipt of the connection request message, transmitting a connection confirm message (CC) intended for reception at the first station for the purpose of establishing a reservation of the transmission medium for use by the first and second stations; and, transmitting, upon receipt of the connection confirm message (CC), information as one or more data messages (XFR) from the first station to the second station; the method being characterized by: the second station upon receiving the last of the data messages from the first station transmitting an acknowledgement message (XACK) intended for reception by the first station; the first station upon receiving the acknowledgement message (XACK) subsequently transmitting a disconnect request message (DR) to the second station; and, the second station upon receiving the disconnect request message (DR) subsequently transmitting a disconnect confirm message (DC) for reception by the first station for the purpose of ending the reservation of the medium. A method as claimed in claim 1 wherein a third station adapted to participate in peer-to-peer communications in the communication medium upon receiving the connection request message (CR) or the connection confirm message (CC) enters into a wait state of preselected time period in which the third station is restrained from transmitting messages (XFR) on the medium. A method as claimed in claim 2 wherein the third station remains in the wait state unless it detects termination of the reservation of the first and second stations before the wait state expires. A method as claimed in claim 2 wherein the third station remains in the wait state unless it detects either the disconnect request message (DR) or the disconnect confirm message (DC) or until the wait state expires. A method as claimed in claim 3 wherein the third station remains in the wait state unless it detects either the disconnect request message (DR) or the disconnect confirm message (DC) or until the wait state expires. A method as claimed in any of claims 2 through 5 wherein the third station enters an idle state from the wait state upon receiving either of the disconnect request message (DR) or the disconnect confirm message (DC). A method as claimed in any of claims 2 through 5 wherein the third station upon the expiry of the wait state senses whether the medium is in use; such that if the third station detects that the medium is in use enters a further wait state of a predetermined period; or, if the third station detects that the medium is not in use enters an idle state in which it is free to receive or initiate communications with other stations. A method as claimed in claim 1 wherein the information can be subdivided and sent as a group of sequential data messages (XFR) by the first station, each of the data messages (XFR) including sequence information identifying the portion of the group to which the data messages (XFR) relate to. A method as claimed in claim 8 wherein the sequence information includes identification of the total number of messages (XFR) being sent in the group. A method as claimed in claims 8 or 9 wherein the second station is adapted to use the sequence information to identify the last message (XFR) in the group of messages. A method as claimed in claims 1, 8, 9, or 10 wherein the acknowledgement message (XACK) sent by the second station to the first station includes information identifying successfully received data messages (XFR). A method as claimed in claim 11 wherein the first station upon receiving the acknowledgement message (XACK) retransmits to the second station data messages (RXFR) not previously received successfully by the second station. A method as claimed in claim 12 wherein the second station upon receiving the last of the retransmitted data messages (RXFR) sends a retry acknowledgement message (RXACK) to the first station which may include information identifying successfully received data messages. A method as claimed in claim 13 wherein the steps of retransmitting unsuccessfully received data messages (RXFR) are repeated until all messages are received successfully. A method as claimed in claim 13 wherein the first station transmits a disconnect request message (DR) to the second station upon receiving the retry acknowledgement message (RXACK). A method as claimed in claim 14 wherein the first station transmits a disconnect request message (DR) to the second station upon receiving the last of the retry acknowledgement messages (RXACK) from the second station. A method as claimed in claim 15 or 16 wherein the second station transmits a disconnect confirm message (DC) for receipt by the first station for the purpose of ending reservation of the medium. A method as claimed in claim 1 in which each station accessing the communications medium enters a state in which it is free to contend for a reservation of the medium upon termination of a reservation by the first and second stations. A method as claimed in claim 18 in which stations capable of communicating with each other using the medium wait preselected periods of waiting time before entering a state in which they are free to contend for a reservation of the medium. A method as claimed in claim 19 in which the periods of waiting time that each the machine waits are selected to equalize the possibility of each to contend for reservation of the medium. A method as claimed in claim 20 in which the waiting periods of time are selected to terminate substantially at the same time and a random delay is imposed on each station before each is permitted to contend for a reservation of the medium. A method as claimed in claim 21 in which each station selects its own random delay period. A method as claimed in claim 20 or 21 in which the waiting time period selected for station 2 is zero and the waiting time period selected for the first station is selected to end substantially concurrently with the waiting time of the second station. A method as claimed in claim 23 in which the waiting time of stations sensing either or both of the first and second stations is selected so that they terminate substantially concurrently with the waiting time of the first or second stations. A method as claimed in claim 23 in which the maximum random length of time assignable to any station is selected to maximize the number of successfully achieved reservations while reducing periods of nonuse of the communication medium. Communications control apparatus for controlling access by a first communication station to a communication medium intended for sharing by at least two stations for the purpose of enabling peer-to-peer communications therebetween, comprising: means for determining if the medium is being used; message generating means for generating messages (XFR) for transmission by the first station for purposes of communicating information with another station; the message generating means being adapted to generate a connection request message (CR) for transmission to a second station if the routine for determining if the medium is being used determines that the medium is not in use; means for identifying a connection confirm message (CC) sent from the second station in response to the connection request message (CR) for the purpose of establishing a reservation of the transmission medium for use by the first and second stations for the purpose of communicating therebetween; means for generating, upon receipt of the connection confirm messages (CC), data messages (XFR) from information provided to the communications control apparatus for the purpose of transmission to another station; characterized in that the apparatus comprises: means for identifying an acknowledgement message (XACK) sent by the second station upon the second station detecting the last of the data messages (XFR) from the first station; means for generating a disconnect request message (DR) in response to the identification of the acknowledgement message (XACK) for transmission to the second station; means for identifying a disconnect confirm message (DC), sent by the second station upon the second station detecting the disconnect request message (DR); and, means responsive to the identification of the disconnect confirm message (DC) adapted to cause the first station to relinquish reservation of the medium to permit subsequent reservations to be obtained. Apparatus as claimed in claim 26, comprising control means for responding to communications initiated by other stations, comprising; means for identifying a connection request message (CR) from an other station; means for generating a connection confirm message (CC) in response to the identification of the connection request message (CR) for transmission to the other station; means for identifying the last message in a group of data messages (XFR) sent from the other station; means adapted to generate an acknowledgement message (XACK) for transmission to the first station upon the identification of the last message (XFR) from the other station; means for generating a disconnect confirm message (DC) for transmission to the first station; logic means for placing the first station in a state in which the reservation of the medium is relinquished. Apparatus as claimed in claims 26 or 27 wherein in a third station adapted to participate in peer-to-peer communications in the communication medium including a routine which upon identifying a connection request message (CR) or the connection confirm message (CC) will cause the data processing station to enter into a wait state of preselected time period in which the station is restrained from transmitting messages on the medium. Apparatus as claimed in claim 28 including means to maintain the station in a wait state until it identifies the termination of a reservation between the first and second stations. Apparatus as claimed in claim 29 wherein the means to maintain the wait state is adapted to terminate the wait state upon identifying either a disconnect request message (DR) or a disconnect confirm message (DC). Apparatus as claimed in any of claims 28 through 30 comprising means to cause the station to transfer to an idle state from the wait state upon identifying either of the disconnect request message (DR) or the disconnect confirm message (DC). Apparatus as claimed in any of claims 28 through 30 wherein means activated upon the expiry of the wait state is responsive to detection of whether the medium is in use; such that if the medium is in use causes the station to a wait state of a predetermined period; or if the medium is not in use causes the station to enter an idle state in which it is free to receive or initiate communications with other stations. Apparatus as claimed in claim 26 comprising means to send in a group of sequential data messages (XFR), each of the data messages (XFR) including sequence information identifying which portion of the information the data messages (XFR) relate to. Apparatus as claimed in claim 33 comprising means for providing the sequence information of each data message (XFR) including identification of the total number of messages being sent to convey the information and the sequence of the data message (XFR) in the group of data messages sent. Apparatus as claimed in claims 33 or 34 including means to use the sequence information to identify the last message (XFR) in the group of messages (XFR). Apparatus as claimed in any of claims 26, 33, 34 and 35 wherein the means for generating the acknowledgement message (XACK) is adapted to include in the acknowledgement message (XACK) information identifying successfully received data messages. Apparatus as claimed in claim 36 comprising means which upon receiving the acknowledgement message (XACK) causes the retransmission of data messages (RXFR) not previously received successfully by the receiving station. Apparatus as claimed in claim 37 comprising means which upon detecting the last of the retransmitted data messages (RXFR) generates a retry acknowledgement message (RXACK) for transmission to the first station including information identifying successfully received data messages (RXFR). Apparatus as claimed in claim 38 where the means for retransmitting unsuccessfully received data messages (RXFR) is adapted for repetition until all messages (RXFR) are received successfully by the other stations. Apparatus as claimed in claim 38 including means for generating a disconnect request message (DR) for transmission to the second station upon receiving the retry acknowledgement message (RXACK). Apparatus as claimed in claim 40 wherein the means of claim 40 is adapted to cause the retransmitting of unsuccessfully received data messages (RXFR) until all messages (RXFR) are received successfully. Apparatus as claimed in claim 38 comprising means to cause the transmission of a disconnect request message (DR) to the second station upon the receipt of a retry acknowledgement message (RXACK). Apparatus as claimed in claim 42 comprising means for causing the first station the transmission of a disconnect request message (DR) to the second station upon the receipt of the last of the retry acknowledgement messages (RXACK) from the second station. Apparatus as claimed in claim 42 or 43 comprising means adapted to cause the first station to enter a state in which it is free to contend for a reservation of the medium upon termination of a reservation by the first and second stations. Apparatus as claimed in claim 44 in which means is provided to restrain the first station from communication for a pre selected period of waiting time before entering a state in which it is free to contend for a reservation of the medium. Apparatus as claimed in claim 45 in which the period of waiting time is selected to equalize the possibility of each station using the medium for communication to contend for reservation of the medium. Apparatus as claimed in claim 46 in which the waiting period of time is selected to terminate substantially at the same time as waiting periods of other stations and a random delay is imposed on each station before contention for a reservation of the medium is permitted. Apparatus as claimed in claim 47 in which the maximum random length of time selectable is selected to maximize the number of successfully achieved reservations and while reducing periods of nonuse of the communication medium.

Inventors: CHEN JEANE SHU-CHUN, FICKES STANLEY L, HARTLEN BRYAN R, KURATA TOM D, MARYAN JACEK P, MCKAY DAN N, WILLIAMS TIMOTHY F, CHEN, JEANE SHU-CHUN, FICKES, STANLEY L., HARTLEN, BRYAN R., KURATA, TOM D., MARYAN, JACEK P., MCKAY, DAN N., WILLIAMS, TIMOTHY F.
Applicants: IBM, INTERNATIONAL BUSINESS MACHINES
Application year: 1994
Main classification: H04L12
IPC codes: H04L12