CN111417116A - Communication method and system adapted through ATT, read-write and exception handling - Google Patents

Communication method and system adapted through ATT, read-write and exception handling Download PDF

Info

Publication number
CN111417116A
CN111417116A CN202010164426.6A CN202010164426A CN111417116A CN 111417116 A CN111417116 A CN 111417116A CN 202010164426 A CN202010164426 A CN 202010164426A CN 111417116 A CN111417116 A CN 111417116A
Authority
CN
China
Prior art keywords
cpa
layer
att
pdu
error
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010164426.6A
Other languages
Chinese (zh)
Other versions
CN111417116B (en
Inventor
李祥臣
钟代笛
段小炼
曹小英
张文剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CHINA INSTITUTE OF SPORT SCIENCE
Chongqing University
Original Assignee
CHINA INSTITUTE OF SPORT SCIENCE
Chongqing University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CHINA INSTITUTE OF SPORT SCIENCE, Chongqing University filed Critical CHINA INSTITUTE OF SPORT SCIENCE
Priority to CN202010164426.6A priority Critical patent/CN111417116B/en
Publication of CN111417116A publication Critical patent/CN111417116A/en
Application granted granted Critical
Publication of CN111417116B publication Critical patent/CN111417116B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/04Arrangements for maintaining operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/18Management of setup rejection or failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W80/00Wireless network protocols or protocol adaptations to wireless operation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)
  • Communication Control (AREA)

Abstract

The invention belongs to the technical field of data communication, and particularly relates to a communication method and a system which are adapted through ATT and exception handling, wherein the communication method and the system comprise a CPA layer with an exception handling method, the exception handling method comprises errors or exceptions of two communication parties in a data exchange process and an exception handling method thereof, the problem that the communication failure of the two communication parties is caused by errors or exceptions of the existing communication mode, such as time interval overtime, execution errors of an ATT attribute operation method, errors of an ATT protocol and the like or link loss and the like, which often occur in the data exchange process or the CPA data exchange process of the two communication parties is solved, and the technical effect of the data communication process is ensured through the errors in the processing process, the errors which are automatically processed and do not need intervention, particularly the judgment on C L C errors and the corresponding processing method.

Description

Communication method and system adapted through ATT, read-write and exception handling
Technical Field
The invention belongs to the technical field of data communication, and particularly relates to a communication method and a communication system which are adaptive through ATT, reading and writing and exception handling.
Background
Att (attribute protocol) is a data transmission protocol proposed by the bluetooth alliance, which is suitable for sensor network applications. The protocol models data exposed to the outside of the sensor equipment into a plurality of attributes (attributes) with handles (handles), and the master equipment completes the operation on the attributes through protocol instructions with various different functions, so that the aim of realizing data exchange with the slave equipment is fulfilled;
due to a plurality of factors such as signal interference, too long distance, protocol content errors and the like, errors or abnormal conditions often occur in the communication process, in order to enhance the robustness and environmental adaptability of communication, two parties participating in data communication should monitor and analyze various abnormal error conditions which may occur, and effective measures are taken to recover the normal state of communication, or a user is informed of the abnormal conditions and corresponding error details are provided. The handling mechanism for abnormal error conditions is one of the effective tools to help the communication device manage the communication state;
the invention relates to a data communication system and a method which are adapted based on CPA field protection of '202010080880.3';
the invention is based on the communication method and system which is adapted by ATT and exception handling of '201910783902. X';
the existing communication mode has the problem that communication failure of two communication parties is caused by errors or abnormity such as time interval overtime, execution errors of an ATT attribute operation method, errors of an ATT protocol and the like or link loss and the like in the data exchange process or CPA data exchange process of the two communication parties.
Disclosure of Invention
The invention provides a communication method and a system adaptive through ATT, read-write and exception handling, which aim to solve the problem that the communication failure of two communication parties is caused by errors or exceptions such as time interval overtime, execution errors of ATT attribute operation methods, ATT protocol errors and the like or link loss and the like which often occur in the data exchange process or CPA data exchange process of the two communication parties in the conventional communication mode in the background technology.
The technical problem solved by the invention is realized by adopting the following technical scheme: before data exchange is carried out on master and slave devices, the two communication sides respectively establish a data communication protocol stack level structure which sequentially comprises a bottom layer transmission layer, an attribute protocol ATT layer, a universal attribute specification protocol adaptation CPA layer, a data exchange protocol PHD layer and an application layer from bottom to top;
the CPA layer includes an exception handling method, the exception handling method including:
if the two communication parties generate time interval overtime or abnormal values of C L C or ASN fields in the data exchange process, executing corresponding active abnormal event intervention;
if both communication parties generate ATT attribute operation method errors in the CPA data exchange process, corresponding active ATT error intervention is executed;
if both communication sides generate CPA PDU transmission errors in the CPA data exchange process, executing active CPA PDU error intervention;
and if the link loss is detected, executing corresponding non-active event exception handling.
Further, if the two communication parties generate time interval timeout or a value exception of a C L C or ASN field in the data exchange process, performing corresponding proactive exception event intervention includes:
if any one of the first time interval, the second time interval and the third time interval included in the CPA layer for assisting the CPA layer in managing the connection state of the CPA layer is overtime, or else;
in the first CPA connection subprocess, if the C L C bit in the CPA PDU is set or the value of the ASN field is not the initial value, or;
in the second CPA connection subprocess, if the C L C bit in the CPA PDU is set or the value of the ASN field is different from the ASN value in the working state data stored in the master device, or;
in the CPA operation sub-process, if the C L C bit in the CPA PDU received by the master device or the slave device is not set, or;
the value of the ASN field is not the ASN value plus 1 in the CPA PDU of the last successful interaction (transmission or reception);
the master device then:
clearing the working state data, sending event notification that the bottom layer connection is disconnected according to semantics to the PHD layer, and not processing other data sent from the equipment before the next connection;
the slave device then:
and clearing the working state data, sending a notice that the bottom layer connection is disconnected to the PHD layer according to the semantics, and not processing other data sent by the main equipment except the connection request.
Further, the CPA layer comprises three time intervals for assisting the CPA layer in managing its connection status;
the three time intervals that the CPA layer includes to assist the CPA layer in managing its connection status include:
the first time interval is the longest waiting time for executing link reconnection after the CPA layer receives the link connection timeout error sent by the ATT layer;
the second time interval is the longest waiting time for receiving the corresponding write response after the master device sends the write request through the ATT; or the longest waiting time for receiving the corresponding read response after the main device sends the read request through the ATT;
the third time interval: after the ATT layer is planned to be disconnected, when the CPA layer receives APDU from the PHD layer, the CPA layer sends semantics to the ATT layer, namely the longest waiting time from the start of establishing a bottom layer connection internal instruction to the completion of reconnection of the ATT layer;
further, if the waiting time of any one of the first time interval, the second time interval and the third time interval exceeds the longest waiting time, the operating state of the CPA layer is immediately and automatically changed.
Further, if both communication parties generate an ATT attribute operation method error in the CPA data exchange process, corresponding active ATT error intervention is executed, which includes:
the ATT protocol error comprises authentication insufficiency, encryption insufficiency, key length insufficiency, unexpected error or other related errors;
if the authentication of the two communication parties is insufficient, the main equipment can carry out authentication operation and resend the ATT reading request;
if the encryption of both communication parties is insufficient, the main equipment can carry out encryption operation and resend the ATT reading request;
if the key lengths of the two communication parties are not enough, the main equipment can change the key and re-execute the encryption operation;
if both parties are accidentally in error, the master device may attempt to resend the ATT read request.
Further, if the two communication parties generate CPA PDU transmission errors in the CPA data exchange process, active CPA PDU error intervention is executed, the active CPA PDU error intervention process is completed by defining error codes in the range of application program error codes reserved by ATT, and the active CPA PDU error intervention process comprises the following steps:
when the master device sends or reads a CPAPDU to the slave device through a corresponding write request or read request, it may receive an error response that is thrown on the ATT layer and whose semantic is that CPAPDU sends an error or whose semantic is that CPAPDU receives an error, or;
the master device may receive an error that the semantic thrown on the ATT layer sent by the slave device is too long in the CPAPDU information part, or;
after the master device sends the APDU of the PHD layer to the PHD layer of the slave device through the write request of the ATT, the slave device does not receive a new APDU replied by the PHD layer, or;
when the master device invites the slave device to send a CPAPDU through the read request of the ATT, if the device where the master device is located cannot accept the length of the transmitted APDU.
Further, if the two communication parties are in the CPA data exchange process, the active CPA PDU error intervention process includes:
in the CPA operation sub-process, if the master device sends a CPA PDU to the slave device through the ATT write request, an error response that the semantics thrown on the ATT layer sent by the slave device are wrong in receiving the CPA PDU may be received, the master device can try to resend the original CPA PDU after receiving the error, and meanwhile, the slave device discards the segment related to the received original CPA PDU when the error occurs;
in the CPA connection sub-process or the CPA operation sub-process, if the master device reads a CPA PDU from the slave device through a read request of ATT, an error response that the semantics thrown on an ATT layer sent by the slave device are wrong in CPA PDU sending may be received, the master device discards the related CPA PDU segment received when the error occurs after receiving the error, and tries to resend the read request;
in the CPA operation sub-process, if the master device sends a CPA PDU to the slave device through the ATT write request, the master device may receive an error that the semantics thrown on the ATT layer sent by the slave device is that the CPA PDU information part is too long, the master device may try to resend a new CPA PDU after receiving the error, and meanwhile, the slave device discards the original related CPA PDU segment received when the error occurs;
in the CPA operation sub-process, after the master device sends the APDU of the PHD layer to the PHD layer of the slave device through the write request of the ATT, the slave device is invited to send a new APDU replied by the PHD layer of the slave device through the read request of the ATT after a certain time, and if the slave device does not receive the new APDU replied by the PHD layer, the slave device sends an error response that the semantics thrown on the ATT layer is upper busy or error to the master device;
in the CPA operation sub-process, if the master device invites the slave device to send a CPA PDU through the read request of the ATT, if the device where the master device is located cannot accept the length of the transmitted APDU, the application layer may terminate the interaction.
If any of the error types appears repeatedly, the application layer determines the subsequent error processing operation.
Further, if the link loss is detected, the performing corresponding non-proactive event exception handling includes:
if the link loss is detected, the ATT layer sends a link connection timeout error to the CPA layer, when both communication sides receive the link connection timeout error at any time after the last CPA PDU transmission is finished, the working state data is saved, and after the ATT layer link reconnection is waited, both communication sides CPA layer immediately enter a CPA operation sub-flow and continue to execute the communication before the link disconnection from the current CPA PDU after executing a second CPA connection sub-flow.
Further, the non-active event exception handling specifically includes:
the operational status data includes the ASN value in the first CPA PDU and, upon disconnection of the underlying link:
if the master device is encapsulating the APDU or the null as payload into the CPA PDU, the working state data also comprises the APDU sent by the PHD layer of the local device, and the APDU which is encapsulated before the bottom link is reconnected is encapsulated into the CPA PDU again after the bottom link is reconnected;
if the master equipment is sending CPA PDU through ATT layer, the working state data also includes current CPA PDU, and resends CPA PDU after the bottom layer link is reconnected; simultaneously the slave discards all the involved segments of the received current CPA PDU;
if the slave device encapsulates the APDU or the null as a payload into the CPA PDU, the working state data also comprises the APDU sent by the PHD layer of the master device, and after the bottom-layer link is reconnected, the master device sends a read request to the slave device again, and meanwhile, the slave device encapsulates the APDU which is being encapsulated before the bottom-layer link is reconnected into the CPA PDU again;
if the slave equipment is sending CPAP PDU through ATT layer, the working state data also includes current CPAP PDU, and after the bottom layer link is reconnected, the master equipment sends read request to the slave equipment again, and at the same time, the master equipment discards all the related segments of the received current CPAP PDU.
The invention also provides a communication system for protocol adaptation based on ATT and read-write instruction, wherein before the communication system exchanges data based on the master and slave devices, the two communication parties respectively establish a data communication protocol stack level structure which sequentially comprises a bottom layer transmission layer, an attribute protocol ATT layer, a universal attribute specification protocol adaptation CPA layer, a data exchange protocol PHD layer and an application layer from bottom to top;
the CPA layer includes an exception handling module to:
implementing the exception handling method as described in any one of the above.
The beneficial technical effects are as follows:
the method for processing the abnormity of the CPA layer comprises executing corresponding active abnormity event intervention if time interval overtime or abnormal values of C L C or ASN fields are generated in the data exchange process of two communication parties, executing corresponding active ATT error intervention if ATT attribute operation method execution errors are generated in the data exchange process of the two communication parties, determining subsequent error processing operation by an application layer if any error type in ATT protocol errors repeatedly appears in the data exchange process of the two communication parties, and executing corresponding non-active abnormity event processing if link loss is detected;
the method provides a method for fault-tolerant processing through a C L C bit by comparing XXXXX with XXXXX, and provides a method for fault-tolerant processing through a C L C bit or ASN field when the value is not an initial value, or C L C bit or ASN field is different from the ASN value in the working state data stored by the main equipment, or C L C bit in PDU is not set, so that CPA layer can deal with the processing of fault disconnection sub-flow, the type of the error generated in the data exchange process is identified and active or automatic fault-tolerant processing is carried out, and therefore, the effectiveness of the data communication process is ensured;
in summary, the invention ensures the effectiveness of the data communication process through the judgment of the error of the processing process, the error which is automatically processed and does not need to be intervened, in particular the C L C error and the corresponding processing method.
Drawings
FIG. 1 is an architectural diagram of a data communications protocol stack for the communications method of the present invention;
FIG. 2 is a flow chart of a communication method of the present invention;
FIG. 3 is a timing chart of the timeout processing of the first time interval of the active exception intervention of the communication method according to the present invention;
FIG. 4 is a timing diagram illustrating a third time interval timeout for proactive abnormal event intervention in the communication method of the present invention;
FIG. 5 is a timing diagram illustrating the process of receiving error CPAP PDU according to the active CPAP PDU error intervention of the communication method of the present invention;
figure 6 is a timing diagram of the processing of the communication method of the present invention in which a link connection timeout with inactive exception intervention occurs during the master device sending CPAPDU.
The technical scheme provided by the invention has flexibility in implementation, and a preferable scheme can be provided for the technical effect to be achieved by the invention by setting part of parameters in the technical scheme and setting up a better application design related to the parameters, and the invention is further described by combining the accompanying drawings as follows:
the numbers in the figures represent the following:
1-a bottom layer transmission layer, 2-an ATT layer, 3-a CPA layer, 4-a PHD layer and 5-an application layer;
ST101, if the two communication parties are in the data exchange process, the time interval overtime or the value abnormality of C L C or ASN field is generated;
ST 102: executing corresponding active abnormal event intervention;
ST 103: if both communication parties generate an ATT attribute operation method to execute errors in the CPA data exchange process;
ST 104: executing corresponding active ATT error intervention;
ST 105: if both communication parties are in the CPA data exchange process, any error type in ATT protocol errors repeatedly appears;
ST 106: the application layer determines the subsequent error handling operation;
ST 107: if detecting the loss of the link;
ST 108: then corresponding inactive event exception handling is performed.
Detailed Description
The first embodiment is as follows:
in this embodiment: as shown in fig. 1 and 2, the communication method adapted through ATT, read-write and exception handling includes that before data exchange is performed between a master device and a slave device, a communication party and a slave device respectively establish a data communication protocol stack level structure, which sequentially comprises a bottom layer transmission layer, an attribute protocol ATT layer, a generic attribute specification protocol adaptation CPA layer, a data exchange protocol PHD layer and an application layer from bottom to top;
the CPA layer includes an exception handling method, the exception handling method including:
if both communication parties generate time interval overtime or abnormal values ST101 of C L C or ASN fields in the data exchange process, executing corresponding active abnormal event intervention ST 102;
if both communication parties generate an ATT attribute operation method to execute an error in the CPA data exchange process ST103, executing corresponding active ATT error intervention ST 104;
if any error type in the ATT protocol errors repeatedly appears in the CPA data exchange process by both communication sides ST105, the subsequent error processing operation ST106 is determined by the application layer;
if a link loss is detected ST107, a corresponding inactive event exception handling is performed ST 108.
The method provides a method for fault-tolerant processing through a C L C bit by comparing XXXXX with XXXXX, and provides a method for fault-tolerant processing through a C L C bit or ASN field when the value is not an initial value, or C L C bit or ASN field is different from the ASN value in the working state data stored by the main equipment, or C L C bit in PDU is not set, so that CPA layer can deal with the processing of fault disconnection sub-flow, the type of the error generated in the data exchange process is identified and active or automatic fault-tolerant processing is carried out, and therefore, the effectiveness of the data communication process is ensured;
in summary, the invention ensures the effectiveness of the data communication process through the judgment of the error of the processing process, the error which is automatically processed and does not need to be intervened, in particular the C L C error and the corresponding processing method.
If the two communication parties generate time interval timeout or abnormal values ST101 of C L C or ASN fields in the data exchange process, executing corresponding proactive abnormal event intervention ST102 includes:
if any one of the first time interval, the second time interval and the third time interval included in the CPA layer for assisting the CPA layer in managing the connection state of the CPA layer is overtime, or else;
in the first CPA connection subprocess, if the C L C bit in the CPA PDU is set or the value of the ASN field is not the initial value, or;
in the second CPA connection subprocess, if the C L C bit in the CPA PDU is set or the value of the ASN field is different from the ASN value in the working state data stored in the master device, or;
in the CPA operation sub-process, if the C L C bit in the CPA PDU received by the master device or the slave device is not set, or;
the value of the ASN field is not the ASN value plus 1 in the CPAP PDU of the last successful interaction (transmission or reception);
the master device then:
clearing the working state data, sending event notification that the bottom layer connection is disconnected according to semantics to the PHD layer, and not processing other data sent from the equipment before the next connection;
the slave device then:
and clearing the working state data, sending a notice that the bottom layer connection is disconnected to the PHD layer according to the semantics, and not processing other data sent by the main equipment except the connection request.
If the two communication parties generate time interval overtime or abnormal values of C L C or ASN fields in the data exchange process, executing corresponding active abnormal event intervention comprises that if any one of a first time interval, a second time interval and a third time interval included by a CPA layer and used for assisting the CPA layer to manage the connection state of the CPA layer is overtime, or if a C L C bit in the CPA PDU or the value of the ASN field is not an initial value in a first CPA connection sub-process, or if the C L C bit in the CPA PDU or the value of the ASN field is not the same as the ASN value in the working state data stored by the main device in a second CPA connection sub-process, or if the C L C bit in the CPA PDU received by the main device or the slave device is not set, or the value of the ASN field is not the ASN value added with 1 in the working state data which is successfully interacted (transmitted or received) last time in the second CPA connection sub-process, the main device clears the working state data, transmits the PHD layer is the PHD layer, and notifies the PHD layer that the PHD layer processes the PHD layer and other PHD layer is not to send or other PHD layer, and notifies the PHD layer that the PHD layer is not to send a work state except for the PHD layer, and;
the first time interval is the longest waiting time for executing link reconnection after the CPA layer receives the link connection timeout error sent by the ATT layer;
the second time interval is the longest waiting time for receiving the corresponding write response after the master device sends the write request through the ATT; or the longest waiting time for receiving the corresponding read response after the main device sends the read request through the ATT;
the third time interval: after the ATT layer is planned to be disconnected, when the CPA layer receives APDU from the PHD layer, the CPA layer sends semantics to the ATT layer, namely the longest waiting time from the start of establishing a bottom layer connection internal instruction to the completion of reconnection of the ATT layer;
the fourth time interval is the longest waiting time for waiting for receiving the APDU from the PHD layer after the slave device receives the read request;
and the fifth time interval is the PHD layer polled at the fifth time interval after the master device enters the CPA operation sub-process until the APDU is received from the PHD layer, the round waits for the end, and the fifth time interval timer is triggered to poll the PHD layer after the master device sends the APDU and when no other operation exists.
The CPA layer comprises five time intervals for assisting the CPA layer to manage the connection state of the CPA layer; the five time intervals that the CPA layer includes to assist the CPA layer in managing its connection status include: the first time interval is the longest waiting time for executing link reconnection after the CPA layer receives the link connection timeout error sent by the ATT layer; the second time interval is the longest waiting time for receiving the corresponding write response after the master device sends the write request through the ATT; or the longest waiting time for receiving the corresponding read response after the main device sends the read request through the ATT; the third time interval: after the ATT layer is planned to be disconnected, when the CPA layer receives APDU from the PHD layer, the CPA layer sends semantics to the ATT layer, namely the longest waiting time from the start of establishing a bottom layer connection internal instruction to the completion of reconnection of the ATT layer; the fourth time interval is the longest waiting time for waiting for receiving the APDU from the PHD layer after the slave device receives the read request; the fifth time interval is that after the master device enters the CPA operation sub-process, the PHD layer is polled at the fifth time interval until the APDU is received from the PHD layer, the round waits for the end, and the fifth time interval timer is triggered after the master device sends the APDU and when no other operation exists, and the working state of the CPA layer is automatically changed if the waiting time of any one of the three time intervals exceeds the longest waiting time by the polled PHD layer;
since the CPA data exchange process also includes five time intervals for assisting the CPA layer in managing its connection status: the first time interval is the longest waiting time for the CPA layer to execute link reconnection after receiving the link connection timeout error sent by the ATT layer. The second time interval is the longest waiting time for receiving the corresponding 'write response' after the master device sends the 'write request' through the ATT; or the longest latency for the master device to receive a corresponding "read response" after sending a "read request" over the ATT. The third time interval is the longest waiting time for actively disconnecting at the ATT layer (generally for reducing power consumption), when the main device layer receives the APDU, the main device layer sends an internal command of 'establishing bottom layer connection' to the own ATT layer to start and wait for completing reconnection; or when the device where the slave device is located generates new data to be transmitted, the slave device sends an internal instruction of 'establishing bottom layer connection' to the ATT layer of the slave device, and waits for the longest waiting time for completing reconnection. The fourth time interval is the longest wait time for the APDU to be received from the own PHD layer after the read request is received from the device. And the fifth time interval is that the master device polls the PHD layer of the own party at the fifth time interval after entering the CPA operation sub-process until the APDU is received from the PHD layer, the round of waiting is finished, and the fifth time interval timer is triggered to poll the PHD layer of the own party after the master device sends the APDU and no other operation is performed. When the waiting time in one link exceeds the time interval, the working state of the CPA layer automatically changes;
in contrast to the communication method and system adapted by ATT and exception handling, which may be referred to herein as "patent No. XXXX"; publication No.: XXXX; the publication date is as follows: XXXX, (supplementary after application of patent 3), the processing mode of the system after the timeout of the first time interval and the third time interval in the scheme is different from that of the previous system, and the processing mode of the system after the timeout of the second time interval is different from that of the previous system, so that the purpose is to adapt to the exception handling process of the communication method.
As shown in fig. 3, the processing procedure for the timeout of the first time interval of the active exception intervention is as follows:
when the master CPA layer is constructing CPA PDU, the bottom layer link is cut off overtime, the master device end saves ASN value and APDU (if the construction information is CPA PDU which is not empty, APDU does not exist); the slave device end saves the ASN value;
when the bottom link is not reconnected successfully in the first time interval, the master equipment CPA layer clears the working state data; informing the PHD layer that the bottom layer connection is disconnected, and if APDU is received before the bottom layer link is disconnected due to overtime, informing the PHD layer that the APDU fails to be sent;
clearing the working state data from the CPA layer of the equipment; the PHD layer is notified that the underlying connection has been broken.
As shown in fig. 4, the process of timeout of the third time interval for active exception intervention is as follows:
after the master device CPA layer sends and receives CPAPDU through ATT, if the CPA layer continuously waits for a certain time without receiving APDU sent by the PHD layer (there is a process of maintaining heartbeat through null packet transmission), the CPA layer of the master device and the slave device can control the ATT layer to disconnect (here, taking the slave device CPA layer as an example);
when any one side of the master equipment and the slave equipment has data transmission, the CPA layer controls the ATT layer to establish connection, namely the CPA layer sends an ATT layer connection establishing internal instruction to the ATT layer, the ATT layer establishes connection in a third time interval and sends an ATT layer connection established event notification to the CPA layer, and CPA PDU transmission is further completed.
And when a third time interval timeout error occurs, namely the ATT layer does not establish ATT layer connection in the third time interval, the master-slave equipment CPA layer makes clear of respective working state data and sends a bottom layer connection disconnected event notification to the PHD layer. And if the waiting time of any one of the first time interval, the second time interval and the third time interval exceeds the longest waiting time, the working state of the CPA layer is immediately and automatically changed.
If both communication parties generate an ATT attribute operation method to execute an error in the CPA data exchange process ST103, corresponding active ATT error intervention is executed ST104, which comprises the following steps:
the ATT protocol error comprises authentication insufficiency, encryption insufficiency, key length insufficiency, unexpected error or other related errors;
if the authentication of the two communication parties is insufficient, the main equipment can carry out authentication operation and resend the ATT reading request;
if the encryption of both communication parties is insufficient, the main equipment can carry out encryption operation and resend the ATT reading request;
if the key lengths of the two communication parties are not enough, the main equipment can change the key and re-execute the encryption operation;
if both parties are accidentally in error, the master device may attempt to resend the ATT read request.
Due to the error response defined by ATT, applicable to CPA connection sub-process, when the master device sends a "read request" for CC attribute to the slave device through ATT, it may receive the error response thrown on ATT layer sent by the slave device, including: 1) the authentication is insufficient. The master device performs an authentication operation and resends the "read request". 2) The encryption is insufficient. The master device performs the encryption operation and resends the "read request". 3) The key length is not sufficient. The master device changes the key and re-performs the encryption operation. 4) Unexpected mistakes. The master re-executes the read request once. 5) Other errors besides the above. If any error of 1) to 5) repeatedly occurs, the subsequent error processing operation is determined by the application layer.
The active CPA PDU error intervention process is completed by defining an error code serving a CPA layer in an 'application error' code range reserved by the ATT, and comprises the following steps:
when the master device sends or reads a CPA PDU to the slave device through a corresponding write request or read request, it may receive an error response that the semantics thrown on the ATT layer is that the CPA PDU sends or receives an error, or;
the master device may receive an error that the semantic thrown on the ATT layer sent by the slave device is too long in the information part of the CPA PDU, or;
after the master device sends the APDU of the PHD layer to the PHD layer of the slave device through the write request of the ATT, the slave device does not receive a new APDU replied by the PHD layer, or;
when the master device invites the slave device to send a CPA PDU through the read request of the ATT, if the device where the master device is located cannot accept the length of the transmitted APDU.
If any error type in the ATT protocol errors repeatedly occurs in the CPA data exchange process by both communication parties ST105, the application layer determines that the subsequent error processing operation ST106 includes:
in the CPA operation sub-process, if the master device sends a CPA PDU to the slave device through the ATT write request, an error response that the semantics thrown on the ATT layer sent by the slave device are wrong in receiving the CPA PDU may be received, the master device can try to resend the original CPA PDU after receiving the error, and meanwhile, the slave device discards the segment related to the received original CPA PDU when the error occurs;
in the CPA connection sub-process or the CPA operation sub-process, if the master device reads a CPA PDU from the slave device through a read request of ATT, an error response that the semantics thrown on an ATT layer sent by the slave device are wrong in CPA PDU sending may be received, the master device discards the related CPA PDU segment received when the error occurs after receiving the error, and tries to resend the read request;
in the CPA operation sub-process, if the master device sends a CPA PDU to the slave device through the ATT write request, the master device may receive an error that the semantics thrown on the ATT layer sent by the slave device is that the CPA PDU information part is too long, the master device may try to resend a new CPA PDU after receiving the error, and meanwhile, the slave device discards the original related CPA PDU segment received when the error occurs;
in the CPA operation sub-process, after the master device sends the APDU of the PHD layer to the PHD layer of the slave device through the write request of the ATT, the slave device is invited to send a new APDU replied by the PHD layer of the slave device through the read request of the ATT after a certain time, and if the slave device does not receive the new APDU replied by the PHD layer, the slave device sends an error response that the semantics thrown on the ATT layer is upper busy or error to the master device;
in the CPA operation sub-process, if the master device invites the slave device to send a CPA PDU through the read request of the ATT, if the device where the master device is located cannot accept the length of the transmitted APDU, the application layer may terminate the interaction.
If any error type repeatedly occurs during active CPA PDU error intervention ST105, the subsequent error handling operation is decided by the application layer ST106
The error types of the ATT protocol comprise: when the master device sends or reads a CPA PDU to the slave device through a corresponding write request or read request, it may receive an error response that the semantics thrown on the ATT layer is that the CPA PDU sends or receives an error, or; the master device may receive an error that the semantic thrown on the ATT layer sent by the slave device is too long in the information part of the CPA PDU, or; after the master device sends the APDU of the PHD layer to the PHD layer of the slave device through the write request of the ATT, the slave device does not receive a new APDU replied by the PHD layer, or when the master device invites the slave device to send a CPA PDU through the read request of the ATT, if the device where the master device is located cannot accept the length of the transmitted APDU;
due to the CPA layer error defined in the 'application program error' code range reserved by the ATT, the method is suitable for 1) CPA operation sub-process, when the master device sends a CPA PDU to the slave device through the 'write request' of the ATT, the error response with the semantic of 'CPA PDU receiving error' thrown on the ATT layer sent by the slave device can be received. The master device may attempt to resend the original CPA PDU after receiving the error, while the slave device discards the original CPA PDU segment received at the time of the error.
Because the method is adopted, if any error type in the ATT protocol errors repeatedly occurs in the CPA data exchange process of the two communication parties, the subsequent error processing operation determined by the application layer comprises the following steps: in the CPA operation sub-process, if the master device sends a CPA PDU to the slave device through the ATT write request, an error response that the semantics thrown on the ATT layer sent by the slave device are wrong in receiving the CPA PDU may be received, the master device can try to resend the original CPA PDU after receiving the error, and meanwhile, the slave device discards the segment related to the received original CPA PDU when the error occurs; in the CPA connection sub-process or the CPA operation sub-process, if the master device reads a CPAP PDU from the slave device through a read request of ATT, an error response that the semantics thrown on an ATT layer sent by the slave device are wrong in CPAP PDU sending may be received, the master device discards the related CPAP PDU segment which is received when the error occurs after receiving the error, and tries to resend the read request; in the CPA operation sub-process, if the master device sends a CPA PDU to the slave device through the ATT write request, the master device may receive an error that the semantics thrown on the ATT layer sent by the slave device is that the CPA PDU information part is too long, the master device may try to resend a new CPA PDU after receiving the error, and meanwhile, the slave device discards the CPA PDU segment which is received when the error occurs and related originally; in the CPA operation sub-process, after the master device sends the APDU of the PHD layer to the PHD layer of the slave device through the write request of the ATT, the slave device is invited to send a new APDU replied by the PHD layer of the slave device through the read request of the ATT after a certain time, and if the slave device does not receive the new APDU replied by the PHD layer, the slave device sends an error response that the semantics thrown on the ATT layer is upper busy or error to the master device; in the CPA operation sub-process, if the master device invites the slave device to send a CPA PDU through the read request of ATT, if the device where the master device is located can not accept the length of the transmitted APDU, the application layer can terminate the interaction;
due to the CPA layer error defined in the 'application program error' code range reserved by the ATT, the method is suitable for 1) CPA operation sub-process, when the master device sends a CPA PDU to the slave device through the 'write request' of the ATT, the error response with the semantic of 'CPA PDU receiving error' thrown on the ATT layer sent by the slave device can be received. The master device may attempt to resend the original CPA PDU after receiving the error, while the slave device discards the original CPA PDU segment received at the time of the error. 2) In the CPA connection sub-process or the CPA operation sub-process, when the master device reads a CPA PDU from the slave device through a "read request" of the ATT, an error response with a semantic of "CPA PDU sending error" thrown on the ATT layer sent by the slave device may be received. The master device, upon receiving the error, discards the segment of the CPA PDU that was received at the time of the error and attempts to resend the "read request". 3) In the CPA operation sub-process, when the master device sends a CPA PDU to the slave device through a "write request" of the ATT, the master device may receive an error that is thrown on the ATT layer sent by the slave device and has a semantic "CPA PDU information part is too long" because the device where the slave device is located cannot receive the APDU of too long. The master device may attempt to resend the new CPA PDU after receiving the error, while the slave device discards the original CPA PDU segment that was received at the time of the error. 4) In the CPA operation sub-process, after sending the APDU of the self-PHD layer to the PHD layer of the slave device through the "write request" of the ATT, the master device invites the slave device to send a new APDU replied by the PHD layer of the slave device through the "read request" of the ATT after a certain time, and if the slave device does not receive the new APDU replied by the self-PHD layer, the slave device sends an error response that the semantics of being thrown on the ATT layer is "upper busy or error" to the master device. 5) In the CPA operation sub-process, when the master device invites the slave device to send a CPA PDU through a read request of the ATT, if the device where the master device is located cannot accept the length of the transmitted APDU, the application layer may terminate the interaction. If 1) to 4) errors occur repeatedly, the subsequent error handling operation is decided by the application layer. .
FIG. 5 shows a timing diagram of the process of receiving error CPA PDU for proactive CPA PDU error intervention.
When the master device sends a CPA PDU through a pair of write request and write response, the slave device may reply an error response with a semantic of 'receiving error of CPA PDU', inform the master device that the current CPA PDU is transmitted with error, and resend the original CPA PDU after the master device receives the error.
When the master device sends a CPA PDU through a group (multiple continuous pairs) of write requests and write responses, the master device may receive an error response with the semantic of 'receiving error of CPA PDU' when a certain CPA PDU segment is transmitted.
This mechanism ensures reliable transmission of data, but may also allow for continued transmission from the erroneous segment.
If the link loss is detected ST107, the ATT layer will notify the CPA layer of the link connection timeout error, and the executing corresponding inactive event exception handling ST108 includes:
if ST107 when detecting the link loss, the ATT layer will send the link connection timeout error to the CPA layer, when both communication parties receive the link connection timeout error at any time after finishing the transmission of the last CPA PDU, the working state data is saved, after waiting for the successful reconnection of the ATT layer link, the CPA layers of both communication parties execute the second CPA connection sub-process, immediately enter the CPA operation sub-process and continue to execute the communication before the link disconnection from the current CPA PDU.
Due to the adoption of the method, if the link loss is detected, the corresponding non-active event exception handling is executed, and the method comprises the following steps:
if detecting that the link is lost, the ATT layer sends a link connection timeout error to the CPA layer, when both communication sides receive the link connection timeout error at any time after finishing the transmission of the last CPA PDU, the working state data is saved, and after waiting for the successful reconnection of the ATT layer link, the CPA layers of both communication sides execute a second CPA connection sub-process, immediately enter the CPA operation sub-process and continue to execute the communication before the link is disconnected from the current CPA PDU;
when the device detects the link loss, the ATT layer informs the CPA layer of the link connection timeout error. And at any time after the m-1 CPA PDU transmission is completed, if the error is received, the master device and the slave device immediately save the working state data and control the ATT layer to execute the ATT layer connection establishment according to the claim 4 in the first time interval to complete the link reconnection. And if the reconnection of the bottom link is not successful in the first time interval, executing an active abnormal event intervention process. If the bottom layer link is reconnected successfully in the first time interval, the CPA layer executes a data communication method and a data communication system which are adapted based on CPA field protection with patent number XXXX and can be cited here; publication No.: XXXX; the publication date is as follows: XXXX, (supplement after application of patent 8) ", establishing a sub-flow for the second CPA connection, and then immediately entering the CPA running sub-flow by the master-slave device and continuing to perform communication before link disconnection from the next CPA pdu.
The non-active event exception handling specifically includes:
the operational status data includes the ASN value in the first CPA PDU and, upon disconnection of the underlying link:
if the master device is encapsulating the APDU or the null as payload into the CPA PDU, the working state data also comprises the APDU sent by the PHD layer of the local device, and the APDU which is encapsulated before the bottom link is reconnected is encapsulated into the CPA PDU again after the bottom link is reconnected;
if the master equipment is sending CPA PDU through ATT layer, the working state data also includes current CPA PDU, and resends CPA PDU after the bottom layer link is reconnected; simultaneously the slave discards all the involved segments of the received current CPA PDU;
if the slave device encapsulates the APDU or the null as a payload into the CPA PDU, the working state data also comprises the APDU sent by the PHD layer of the master device, and after the bottom-layer link is reconnected, the master device sends a read request to the slave device again, and meanwhile, the slave device encapsulates the APDU which is being encapsulated before the bottom-layer link is reconnected into the CPA PDU again;
if the slave equipment is sending CPA PDU through ATT layer, the working state data also includes current CPA PDU, and after the bottom layer link is reconnected, the master equipment sends read request to the slave equipment again, and at the same time, the master equipment discards all the related segments of the received current CPA PDU.
As shown in FIG. 6, a link connection timeout for inactive event exception handling occurs during the CPA PDU transmission by the master device.
When a master equipment CPA layer sends a CPA PDU (supposing that the m-th CPA PDU) segment through ATT, a link connection timeout error occurs, the master equipment CPA layer saves the CPA PDU and saves the ASN value of the m-1 th CPA PDU; the slave CPA layer discards all segments of the error CPA PDU and stores the ASN value of the m-1 th CPA PDU;
after the bottom-layer link is reconnected successfully, executing a second CPA connection sub-process;
the master device and the slave device enter a CPA operation sub-process, and the CPA layer of the master device sends the starting segment of the mth CPA PDU through ATT.
The invention also provides a communication system for protocol adaptation based on ATT and read-write instruction, wherein before the communication system exchanges data based on the master and slave devices, the two communication parties respectively establish a data communication protocol stack level structure which sequentially comprises a bottom layer transmission layer, an attribute protocol ATT layer, a universal attribute specification protocol adaptation CPA layer, a data exchange protocol PHD layer and an application layer from bottom to top;
the CPA layer includes an exception handling module to:
implementing the exception handling method of any of the above.
The working principle is as follows:
if the two communication parties generate time interval overtime or abnormal values of C L C or ASN fields in the data exchange process, executing corresponding active abnormal event intervention, if the two communication parties generate ATT attribute operation methods to execute errors in the CPA data exchange process, executing corresponding active ATT error intervention, if any error type in ATT protocol errors repeatedly appears in the CPA data exchange process, determining subsequent error processing operation by an application layer, and if a link loss is detected, executing corresponding non-active abnormal event processing;
the method provides a method for fault-tolerant processing through a C L C bit by comparing XXXXX with XXXXX, and provides a method for fault-tolerant processing through a C L C bit or ASN field when the value is not an initial value, or C L C bit or ASN field is different from the ASN value in the working state data stored by the main device, or C L C bit in CPA PDU is not set, so that CPA layer deals with the processing of fault disconnection sub-flow, identifies the type of the error generated in the data exchange process and carries out active or automatic fault-tolerant processing, thereby ensuring the effectiveness of the data communication process;
the invention solves the problem that the communication between two communication parties is failed due to the fact that errors such as time interval overtime, execution errors of an ATT attribute operation method, errors of an ATT protocol and the like or errors or abnormalities such as link loss and the like often occur in the data exchange process or CPA data exchange process of the two communication parties in the existing communication mode, and the effectiveness of the data communication process is ensured through errors in the processing process, errors which are automatically processed and do not need intervention, particularly judgment on C L C errors and a corresponding processing method;
the technical solutions of the present invention or similar technical solutions designed by those skilled in the art based on the teachings of the technical solutions of the present invention are all within the scope of the present invention to achieve the above technical effects.

Claims (10)

1. Before data exchange is carried out on master and slave devices, the communication method is characterized in that both sides of the communication respectively establish a data communication protocol stack level structure which sequentially comprises a bottom layer transmission layer, an attribute protocol ATT layer, a universal attribute specification protocol adaptation CPA layer, a data exchange protocol PHD layer and an application layer from bottom to top;
the CPA layer includes an exception handling method, the exception handling method including:
if the two communication parties generate time interval overtime or abnormal values of C L C or ASN fields in the data exchange process, executing corresponding active abnormal event intervention;
if both communication parties generate ATT attribute operation method errors in the CPA data exchange process, corresponding active ATT error intervention is executed;
if both communication sides generate CPA PDU transmission errors in the CPA data exchange process, executing active CPA PDU error intervention;
and if the link loss is detected, executing corresponding non-active event exception handling.
2. The communication method adapted through ATT, read-write and exception handling according to claim 1, wherein if the two communicating parties generate time interval timeout or value exception of C L C or ASN field during data exchange, performing corresponding active exception event intervention comprises:
if any one of the first time interval, the second time interval and the third time interval included in the CPA layer for assisting the CPA layer in managing the connection state of the CPA layer is overtime, or else;
in the first CPA connection subprocess, if the C L C bit in the CPA PDU is set or the value of the ASN field is not the initial value, or;
in the second CPA connection subprocess, if the C L C bit in the CPA PDU is set or the value of the ASN field is different from the ASN value in the working state data stored in the master device, or;
in the CPA operation sub-process, if the C L C bit in the CPA PDU received by the master device or the slave device is not set, or;
the value of the ASN field is not the ASN value plus 1 in the CPA PDU of the last successful interaction (transmission or reception);
the master device then:
clearing the working state data, sending event notification that the bottom layer connection is disconnected according to semantics to the PHD layer, and not processing other data sent from the equipment before the next connection;
the slave device then:
and clearing the working state data, sending a notice that the bottom layer connection is disconnected to the PHD layer according to the semantics, and not processing other data sent by the main equipment except the connection request.
3. The communication method adapted by ATT, read-write and exception handling according to claim 2, wherein the CPA layer comprises three time intervals for assisting the CPA layer in managing its connection status;
the three time intervals that the CPA layer includes to assist the CPA layer in managing its connection status include:
the first time interval is the longest waiting time for executing link reconnection after the CPA layer receives the link connection timeout error sent by the ATT layer;
the second time interval is the longest waiting time for receiving the corresponding write response after the master device sends the write request through the ATT; or the longest waiting time for receiving the corresponding read response after the main device sends the read request through the ATT;
the third time interval: after the ATT layer has planned disconnection, when the CPA layer receives APDU from the PHD layer, the CPA layer sends semantics to the ATT layer for the longest waiting time from the start of establishing the internal instruction of the bottom layer connection to the completion of reconnection of the ATT layer.
4. The communication method adapted by ATT, read-write and exception handling according to claim 3, wherein the operating state of the CPA layer is automatically changed immediately if the latency of any one of the first time interval, the second time interval and the third time interval exceeds the maximum latency.
5. The communication method adapted by ATT, read-write and exception handling according to claim 1, wherein if both communication parties generate ATT attribute operation method errors during CPA data exchange, performing corresponding active ATT error intervention, comprising:
the ATT protocol error comprises authentication insufficiency, encryption insufficiency, key length insufficiency, unexpected error or other related errors;
if the authentication of the two communication parties is insufficient, the main equipment can carry out authentication operation and resend the ATT reading request;
if the encryption of both communication parties is insufficient, the main equipment can carry out encryption operation and resend the ATT reading request;
if the key lengths of the two communication parties are not enough, the main equipment can change the key and re-execute the encryption operation;
if both parties are accidentally in error, the master device may attempt to resend the ATT read request.
6. The communication method adapted by ATT, read-write and exception handling according to claim 1, wherein if both communication parties generate CPA PDU transmission error during CPA data exchange, active CPA PDU error intervention is performed, wherein the active CPA PDU error intervention is performed by defining error codes within an application error code range reserved by ATT, comprising:
when the master device sends or reads a CPA PDU to the slave device through a corresponding write request or read request, the master device may receive an error response which is thrown on an ATT layer and has a semantic of sending an error for the CPA PDU or has a semantic of receiving an error for the CPA PDU, or;
the master device may receive an error that the semantic thrown on the ATT layer sent by the slave device is too long in the information part of the CPA PDU, or;
after the master device sends the APDU of the PHD layer to the PHD layer of the slave device through the write request of the ATT, the slave device does not receive a new APDU replied by the PHD layer, or;
when the master device invites the slave device to send a CPA PDU through the read request of the ATT, if the device where the master device is located cannot accept the length of the transmitted APDU.
7. The communication method adapted by ATT, read-write and exception handling according to claim 1, wherein if both communication parties are in CPA data exchange process, the active CPA PDU error intervention process comprises:
in the CPA operation sub-process, if the master device sends a CPA PDU to the slave device through the ATT write request, an error response that the semantics thrown on the ATT layer sent by the slave device are wrong in receiving the CPA PDU may be received, the master device can try to resend the original CPA PDU after receiving the error, and meanwhile, the slave device discards the segment related to the received original CPA PDU when the error occurs;
in the CPA connection sub-process or the CPA operation sub-process, if the master device reads a CPA PDU from the slave device through a read request of ATT, an error response that the semantics thrown on an ATT layer sent by the slave device are wrong in CPA PDU sending may be received, the master device discards the related CPA PDU segment received when the error occurs after receiving the error, and tries to resend the read request;
in the CPA operation sub-process, if the master device sends a CPA PDU to the slave device through the ATT write request, the master device may receive an error that the semantics thrown on the ATT layer sent by the slave device is that the CPA PDU information part is too long, the master device may try to resend a new CPA PDU after receiving the error, and meanwhile, the slave device discards the received CPA PDU segment related to the original when the error occurs;
in the CPA operation sub-process, after the master device sends the APDU of the PHD layer to the PHD layer of the slave device through the write request of the ATT, the slave device is invited to send a new APDU replied by the PHD layer of the slave device through the read request of the ATT after a certain time, and if the slave device does not receive the new APDU replied by the PHD layer, the slave device sends an error response that the semantics thrown on the ATT layer is upper busy or error to the master device;
in the CPA operation sub-process, if the master device invites the slave device to send a CPA PDU through the read request of ATT, if the device where the master device is located can not accept the length of the transmitted APDU, the application layer can terminate the interaction;
if any of the error types appears repeatedly, the application layer determines the subsequent error processing operation.
8. The communication method adapted by ATT, read-write and exception handling according to claim 1, wherein the performing of corresponding inactive event exception handling if a link loss is detected comprises:
if the link loss is detected, the ATT layer sends a link connection timeout error to the CPA layer, when both communication sides receive the link connection timeout error at any time after the last CPA PDU transmission is finished, the working state data is saved, and after the ATT layer link reconnection is waited, both communication sides CPA layer immediately enter a CPA operation sub-flow and continue to execute the communication before the link disconnection from the current CPA PDU after executing a second CPA connection sub-flow.
9. The communication method adapted by ATT, read-write and exception handling according to claim 8, wherein the inactive event exception handling specifically comprises:
the operational status data includes the ASN value in the first CPA PDU and, upon disconnection of the underlying link:
if the master device is encapsulating the APDU or the null as payload into the CPA PDU, the working state data also comprises the APDU sent by the PHD layer of the local device, and the APDU which is encapsulated before the bottom link is reconnected is encapsulated into the CPA PDU again after the bottom link is reconnected;
if the master equipment is sending CPA PDU through ATT layer, the working state data also includes current CPA PDU, and resends CPA PDU after the bottom layer link is reconnected; simultaneously the slave discards all the involved segments of the received current CPA PDU;
if the slave device encapsulates the APDU or the null as a payload into the CPA PDU, the working state data also comprises the APDU sent by the PHD layer of the master device, and after the bottom-layer link is reconnected, the master device sends a read request to the slave device again, and meanwhile, the slave device encapsulates the APDU which is being encapsulated before the bottom-layer link is reconnected into the CPA PDU again;
if the slave equipment is sending CPA PDU through ATT layer, the working state data also includes current CPA PDU, and after the bottom layer link is reconnected, the master equipment sends read request to the slave equipment again, and at the same time, the master equipment discards all the related segments of the received current CPA PDU.
10. The communication system is characterized in that before the communication system exchanges data based on master and slave equipment, both communication sides respectively establish a data communication protocol stack level structure which sequentially comprises a bottom layer transmission layer, an attribute protocol ATT layer, a universal attribute specification protocol adaptation CPA layer, a data exchange protocol PHD layer and an application layer from bottom to top;
the CPA layer includes an exception handling module to:
an exception handling method according to any one of claim 1 to claim 9 is implemented.
CN202010164426.6A 2020-03-10 2020-03-10 Communication method and system adapted through ATT, read-write and exception handling Active CN111417116B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010164426.6A CN111417116B (en) 2020-03-10 2020-03-10 Communication method and system adapted through ATT, read-write and exception handling

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010164426.6A CN111417116B (en) 2020-03-10 2020-03-10 Communication method and system adapted through ATT, read-write and exception handling

Publications (2)

Publication Number Publication Date
CN111417116A true CN111417116A (en) 2020-07-14
CN111417116B CN111417116B (en) 2023-09-19

Family

ID=71494314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010164426.6A Active CN111417116B (en) 2020-03-10 2020-03-10 Communication method and system adapted through ATT, read-write and exception handling

Country Status (1)

Country Link
CN (1) CN111417116B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009004234A1 (en) * 2007-06-15 2009-01-08 France Telecom Anomaly detection in service entity traffic in a packet network
CN110493775A (en) * 2019-08-23 2019-11-22 重庆大学 The communication means and system being adapted to by ATT and abnormality processing
CN111314448A (en) * 2020-02-05 2020-06-19 重庆大学 Data communication system and method adapted based on CPA field protection
CN111328056A (en) * 2020-01-20 2020-06-23 钟代笛 Communication method and system for carrying out protocol adaptation based on ATT and read-write instruction
CN111416889A (en) * 2020-01-16 2020-07-14 重庆大学 Communication method and system adapted through GATT and exception handling

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009004234A1 (en) * 2007-06-15 2009-01-08 France Telecom Anomaly detection in service entity traffic in a packet network
CN110493775A (en) * 2019-08-23 2019-11-22 重庆大学 The communication means and system being adapted to by ATT and abnormality processing
CN111416889A (en) * 2020-01-16 2020-07-14 重庆大学 Communication method and system adapted through GATT and exception handling
CN111328056A (en) * 2020-01-20 2020-06-23 钟代笛 Communication method and system for carrying out protocol adaptation based on ATT and read-write instruction
CN111314448A (en) * 2020-02-05 2020-06-19 重庆大学 Data communication system and method adapted based on CPA field protection

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DAIDI ZHONG: "Model_checking_the_properties_of_ISO_IEEE_11073-206012016_standard-based_communication_protocol_for_personal_health_device" *
曹小英: "基于居民健康卡的网关设备及端到端***_曹小英" *

Also Published As

Publication number Publication date
CN111417116B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
CN110493775B (en) Communication method and system adapted by ATT and exception handling
EP0464014A2 (en) Communications systems using a fault tolerant protocol
CN106330475B (en) Method and device for managing main and standby nodes in communication system and high-availability cluster
JP3900058B2 (en) Data communication method and information processing apparatus
EP3331197A1 (en) A method and system for monitoring a connection status of a device
US7254739B2 (en) Error recovery in a client/server application using two independent sockets for communication
CN107508916B (en) Server link management method for intelligent robot
CN114500552A (en) Cloud edge message reliability transmission method and device under edge computing scene
US7191356B2 (en) Method for asynchronous support of fault-tolerant and adaptive communication
JP3608905B2 (en) Data communication system and data communication method
JP2003337717A (en) Fault recovery synchronizing system of online transaction process
CN111417116A (en) Communication method and system adapted through ATT, read-write and exception handling
JP3176548B2 (en) Line interface device in ATM exchange
JP2773424B2 (en) Network system and connection computer switching method
CN111314448B (en) Data communication system and method adapted based on CPA field protection
CN111416889B (en) Communication method and system adapted through GATT and exception handling
US6505303B1 (en) Communications node, information equipment including the same and network system
CN105045759B (en) Control communication method of financial self-service equipment
JP3088683B2 (en) Data communication system
CN113783805B (en) Transmission method and system of FC switching network
JPH10105490A (en) Method for monitoring server fault and its countermeasure method
CN112751933A (en) Data transmission method based on socket connection
JPH06301608A (en) File transfer control system
JPH1028185A (en) System for disconnecitng and reconnecting network path
JP2001256185A (en) Inter-process communication management system in multi- process system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant