CN113312296A - Heart rate data acquisition and host serial port communication method based on ZigBee - Google Patents

Heart rate data acquisition and host serial port communication method based on ZigBee Download PDF

Info

Publication number
CN113312296A
CN113312296A CN202110555603.8A CN202110555603A CN113312296A CN 113312296 A CN113312296 A CN 113312296A CN 202110555603 A CN202110555603 A CN 202110555603A CN 113312296 A CN113312296 A CN 113312296A
Authority
CN
China
Prior art keywords
data
frame
field
zigbee
heart rate
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
CN202110555603.8A
Other languages
Chinese (zh)
Other versions
CN113312296B (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.)
Wuhan Textile University
South Central Minzu University
Original Assignee
Wuhan Textile University
South Central University for Nationalities
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 Wuhan Textile University, South Central University for Nationalities filed Critical Wuhan Textile University
Priority to CN202110555603.8A priority Critical patent/CN113312296B/en
Publication of CN113312296A publication Critical patent/CN113312296A/en
Application granted granted Critical
Publication of CN113312296B publication Critical patent/CN113312296B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/0002Remote monitoring of patients using telemetry, e.g. transmission of vital signals via a communication network
    • A61B5/0004Remote monitoring of patients using telemetry, e.g. transmission of vital signals via a communication network characterised by the type of physiological signal transmitted
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/0002Remote monitoring of patients using telemetry, e.g. transmission of vital signals via a communication network
    • A61B5/0015Remote monitoring of patients using telemetry, e.g. transmission of vital signals via a communication network characterised by features of the telemetry system
    • A61B5/002Monitoring the patient using a local or closed circuit, e.g. in a room or building
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/02Detecting, measuring or recording pulse, heart rate, blood pressure or blood flow; Combined pulse/heart-rate/blood pressure determination; Evaluating a cardiovascular condition not otherwise provided for, e.g. using combinations of techniques provided for in this group with electrocardiography or electroauscultation; Heart catheters for measuring blood pressure
    • A61B5/024Detecting, measuring or recording pulse rate or heart rate
    • A61B5/02416Detecting, measuring or recording pulse rate or heart rate using photoplethysmograph signals, e.g. generated by infrared radiation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/60ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H40/00ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices
    • G16H40/60ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices for the operation of medical equipment or devices
    • G16H40/67ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices for the operation of medical equipment or devices for remote operation

Landscapes

  • Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Medical Informatics (AREA)
  • Public Health (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Theoretical Computer Science (AREA)
  • Surgery (AREA)
  • General Engineering & Computer Science (AREA)
  • Molecular Biology (AREA)
  • Pathology (AREA)
  • Animal Behavior & Ethology (AREA)
  • Biophysics (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Veterinary Medicine (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physiology (AREA)
  • Epidemiology (AREA)
  • Primary Health Care (AREA)
  • Cardiology (AREA)
  • Computer Hardware Design (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a heart rate data acquisition and host serial port communication method based on ZigBee.A ZigBee terminal node acquires heart rate data; forming a Zigbee data packet, sending the Zigbee data packet to a ZigBee coordinator, encapsulating a data sending frame and sending the data sending frame to a host; judging the integrity and correctness of the data transmission frame; the host encapsulates the data response frame according to the data sending frame; the ZigBee coordinator receives the data response frame and forwards the data response frame to the ZigBee terminal node; and the ZigBee terminal node analyzes the data response frame after receiving the data response frame, and retransmits the data transmission frame to the ZigBee coordinator according to the interruption. The invention realizes the functions of registering, updating, canceling and the like of the node address of each ZigBee terminal node. And the correctness control of data transmitted by Zigbee and transmitted by a serial port is realized through the data check and the functional field, and the retransmission processing is carried out on the data which fails to be transmitted.

Description

Heart rate data acquisition and host serial port communication method based on ZigBee
Technical Field
The invention belongs to the technical field of wireless communication, and particularly relates to a heart rate data acquisition and host serial port communication method based on ZigBee.
Background
The ZigBee technology is a two-way wireless communication technology with short distance, low complexity, low power consumption, low speed and low cost, and is suitable for various traditional fields of industry, agriculture, military, environment, medical treatment and the like.
Medical treatment under the traditional mode detects and produces very big inconvenience to patient, utilizes wireless sensor network technique, through corresponding human electric signal detection sensor, can measure human sign data, simultaneously through wireless transmission data technique, the doctor can look over at any time through control host computer remote monitoring patient health, accepts alarm information at any time.
ZigBee is a wireless connection, can work on three frequency bands of 2.4GHz, 868MHz and 915MHz, respectively has the highest transmission rates of 250kb/s,20kb/s and 40kb/s, the transmission distance is in the range of 10 to 75m, and the range can be continuously increased.
The ZigBee stack is established on the basis of the IEEE802.15.4 standard, the MAC and PHY layers of the protocol are defined, the ZigBee device comprises the PHY and MAC layers of the IEEE802.15.4 standard, and the ZigBee stack layer: network layer (NWK), application layer and security service provision layer.
The serial port communication protocol sets rules and conventions for the ZigBee to complete communication and service following with the host through a serial port, defines the use format of the data unit, information and meaning contained in the data unit, a connection mode and information sending and receiving time sequence, and ensures correct interaction between information.
However, in the current medical detection, data transmission is mostly carried out by adopting a bluetooth scheme, so that the energy consumption is large, the distance transmission is limited, and the data transmission is unstable.
Disclosure of Invention
The invention aims to solve the problems in the prior art and provides a heart rate data acquisition and host serial port communication method based on ZigBee.
The above object of the present invention is achieved by the following technical means:
a heart rate data acquisition and host serial port communication method based on ZigBee comprises the following steps:
step 1, collecting heart rate data by a ZigBee terminal node;
step 2, the ZigBee terminal node forms a Zigbee data packet by the heart rate data, the heart rate data serial number, the node address information and the node state and sends the Zigbee data packet to the ZigBee coordinator, and the ZigBee coordinator encapsulates a data sending frame according to the Zigbee data packet and sends the data sending frame to the host;
step 3, the host analyzes the received data transmission frame, judges the integrity and correctness of the data transmission frame, judges whether the ZigBee terminal node works normally according to the node state, and judges whether the ZigBee terminal node address needs to be registered or unregistered or updated according to the node state;
step 4, the host encapsulates the data response frame according to the data sending frame;
step 5, the ZigBee coordinator receives the data response frame and forwards the data response frame to the ZigBee terminal node;
and 6, analyzing the data response frame received by the ZigBee terminal node, and if the corresponding data transmission frame is judged to be incorrectly received by analyzing, retransmitting the data transmission frame to the ZigBee coordinator.
Step 2 as described above comprises the steps of:
step 2.1, setting a frame header field of a data transmission frame;
step 2.2, setting a frame sequence number field of the data sending frame as a heart rate data sequence number of the currently received Zigbee data packet;
step 2.3, setting the node address information field of the data sending frame as the node address information of the Zigbee data packet;
step 2.4, if the node state is normal and can receive heart rate data, setting the content of the functional field in the data transmission frame to be 0x 00;
if the node state is a newly added network node, setting the content of the function field of the data transmission frame to be 0x 01;
if the received heart rate data is abnormal, setting the content of a function field of a data transmission frame to be 0x 02;
if the node state is that the network address changes, setting the content of the function field of the data transmission frame to be 0x 03;
if the node status is ready to exit the network, the contents of the function field of the data transmission frame are set to 0x04,
step 2.5, after receiving the heart rate data, the ZigBee coordinator judges the length of the heart rate data, sets the data length field of the data transmission frame as the length of the heart rate data,
step 2.6, adding the measured heart rate data in the heart rate data field in the data transmission frame,
step 2.7, carrying out XOR calculation on the frame header field, the frame sequence number field, the node address information field, the function field, the data length field, the heart rate data field and the frame tail field of the data transmission frame to obtain an XOR value as the content of the check field in the data transmission frame,
and 2.8, setting a frame tail field in the data transmission frame, and transmitting the data transmission frame to the host by the ZigBee coordinator.
Step 3 as described above comprises the steps of:
step 3.1, the host receives the data sending frame and analyzes the data sending frame;
3.2, the host carries out XOR calculation on the contents of a frame header field, a frame sequence number field, a node address information field, a function field, a data length field, a heart rate data field and a frame tail field in the received data sending frame, compares the XOR value obtained by calculation with the content of a check field in the data sending frame, and enters step 3.3 if the comparison is the same, or enters step 4 if the comparison result is different;
step 3.3, when the content of the function field is 0x00, setting the current stored ZigBee terminal node state as good operation,
when the content of the function field is 0x01, the host registers the address of the ZigBee terminal node which is newly added into the network,
when the content of the function field is 0x02, the host displays that the Zigbee end node currently performing data measurement is in an abnormal state,
when the content of the function field is 0x03, the host updates the address of the ZigBee terminal node which currently sends data,
when the content of the function field is 0x04, the host logs off the address of the Zigbee terminal node that is currently ready to exit the network.
Step 4 as described above comprises the steps of:
step 4.1, the host sets the frame header field of the data response frame;
4.2, the host sets the frame tail field of the data response frame;
4.3, the host sets the frame number field of the data response frame as the frame number field of the corresponding data sending frame;
step 4.4, the host sets the node address information field of the data response frame as the node address information field of the corresponding data sending frame;
step 4.5, if the host computer does not find the abnormality when analyzing the data sending frame for verification and the function field of the corresponding data sending frame reflects that the abnormality is not 0x02, setting the response instruction field in the data response frame as the heart rate data receiving success;
if the analyzed data transmission frame is abnormal or the function field of the corresponding data transmission frame is 0x02 when being checked, setting the response instruction field in the data response frame as the data reception failure and needing to perform data retransmission;
and 4.6, the host carries out XOR calculation on the frame header field, the frame sequence number field, the node address information field, the response instruction field and the frame tail field in the data response frame to obtain an XOR value and arranges the XOR value in a check field in the data response frame.
Compared with the prior art, the invention has the following advantages:
1. the Zigbee is used as a communication mode between the ZigBee terminal node and the ZigBee coordinator, so that the power consumption is reduced, and the data transmission distance is long;
2. establishing reliable data transmission between the ZigBee terminal node and the host, and performing conversion from the Zigbee to serial communication;
3. the user-defined serial port communication is established, the management of the host computer to each ZigBee terminal node can be realized besides reliable heart rate data transmission, and the functions of registering, updating, cancelling and the like of the node address of each ZigBee terminal node are realized.
4. And the correctness control of data transmitted by Zigbee and transmitted by a serial port is realized through the data check and the functional field, and the retransmission processing is carried out on the data which fails to be transmitted.
Drawings
Fig. 1 is a diagram of a data transmission frame structure in the present invention;
FIG. 2 is a diagram of a data response frame structure according to the present invention;
FIG. 3 is a schematic structural diagram of a ZigBee coordinator node;
fig. 4 is a diagram illustrating the setting of function fields in a data transmission frame;
fig. 5 is a schematic diagram illustrating the setting of a response instruction field in a data response frame.
Detailed Description
The present invention will be described in further detail with reference to examples for the purpose of facilitating understanding and practice of the invention by those of ordinary skill in the art, and it is to be understood that the present invention has been described in the illustrative embodiments and is not to be construed as limited thereto.
The structure and definition of the data transmission frame according to the present invention are shown in fig. 1, and the structure and definition of the data response frame are shown in fig. 2.
For the control host, the ZigBee coordinator node and the ZigBee terminal node, data collection and data interaction need to be achieved through analysis of data transmission frame and data response frame structures.
A heart rate data acquisition and host serial port communication method based on ZigBee comprises the following steps:
step 1, periodically measuring heart rate data by a ZigBee terminal node;
the current ZigBee terminal node periodically measures heart rate data, and the structure of the ZigBee terminal node is shown in figure 3. The heart rate sensor measures and adopts the photoelectric volume to send out, cause the different measurement of luminousness to carry on the measurement of heart rate data through measuring human tissue when the blood vessel is pulsating, it is made up of light source and electronic converter two parts, the light source adopts the luminescent diode of certain wavelength selective to oxygen and hemoglobin in the arterial blood, as the light beam sees through human peripheral blood vessel, because the blood volume change of arterial pulse leads to the luminousness of the light beam to change, receive the light reflected by human tissue by the photoelectric converter at this moment, change into the electric signal and amplify and output the analog voltage value with it. Meanwhile, the ZigBee terminal node converts the collected analog signal value into a digital signal to calculate and obtain heart rate data.
Step 2, the ZigBee terminal node forms a Zigbee data packet by the collected heart rate data, the heart rate data serial number, the node address information and the node state and sends the Zigbee data packet to the ZigBee coordinator, the ZigBee coordinator analyzes the Zigbee data packet and analyzes the heart rate data, the heart rate data serial number, the node address information and the node state, encapsulates a data sending frame according to the received heart rate data, the heart rate data serial number, the node address information and the node state, and sends the data sending frame to the host;
the ZigBee terminal nodes form a Zigbee data packet by the collected heart rate data, the heart rate data serial number, the node address information and the node state through a Zigbee network and send the Zigbee data packet to the ZigBee coordinator. The node address information comprises a physical address and a network address, and in the ZigBee network, the network address of the ZigBee coordinator is defaulted to 0000, namely the destination addresses of data sent by all ZigBee terminal nodes are 0000.
The ZigBee coordinator receiving the Zigbee data packet analyzes the Zigbee data packet and starts to package a data transmission frame, wherein the data transmission frame comprises a frame header field (SOF), a frame sequence number field (SN), a node address information field (SA/MA), a function Field (FC), a data length field (LT), a heart rate data field (HRDA), a check field (BCC) and a frame end field (EOF).
Step 2.1, the header field of the data transmission frame is set to 0x3C,
and 2.2, setting a frame sequence number field of the data sending frame as a heart rate data sequence number of the currently received Zigbee data packet.
And 2.3, setting the node address information field of the data sending frame as the node address information of the Zigbee data packet.
Step 2.4, simultaneously, the ZigBee coordinator judges whether the current ZigBee terminal node operates normally according to the node state and the heart rate data of the ZigBee data packet,
if the node state is normal and can receive heart rate data, setting the content of a function field in a data transmission frame to be 0x 00;
if the node state is a newly added network node, setting the content of the function field of the data transmission frame to be 0x 01;
if the received heart rate data is abnormal, setting the content of a function field of a data transmission frame to be 0x 02;
if the node state is that the network address changes, setting the content of the function field of the data transmission frame to be 0x 03;
if the node status is ready to exit the network, the contents of the function field of the data transmission frame are set to 0x 04.
And 2.5, after receiving the heart rate data, the ZigBee coordinator judges the length of the heart rate data, namely the length of the data byte occupied by the heart rate data, and simultaneously sets the data length field of the data transmission frame as the length of the heart rate data.
And 2.6, adding the measured heart rate data into the heart rate data field in the data sending frame, wherein the heart rate data adopts a hexadecimal number form.
And 2.7, performing exclusive OR calculation on all set contents of a frame header field (SOF), a frame sequence number field (SN), a node address information field (SA/MA), a function Field (FC), a data length field (LT), a heart rate data field (HRDA) and a frame end field (EOF) of the data transmission frame to obtain an exclusive OR value, wherein the exclusive OR value is the content of a check field of the data transmission frame.
And 2.8, setting the field of the tail of the data transmission frame to be 0x3E, packaging the data transmission frame by the ZigBee coordinator, and transmitting the data transmission frame to the host through the serial port.
Step 3, the host analyzes the received data sending frame, judges the integrity and correctness of the data sending frame, if the data sending frame is complete and correct, the data is correctly received, otherwise, the data is incorrectly received, and the host judges whether the ZigBee terminal node works normally or registers or cancels or updates the address of the ZigBee terminal node according to the node state of the data sending frame;
and 3.1, when the host receives the data sending frame obtained from the serial port, firstly, judging a frame header field, determining a frame header starting position of the data sending frame, and then, judging a frame tail field to ensure the integrity of the data sending frame. And storing the received complete data transmission frame to the internal array, and starting to analyze the current data transmission frame.
As shown in fig. 4, the host determines the operating state of the ZigBee terminal node currently measuring heart rate data by parsing the function Field (FC) in the data transmission frame, and the content and definition of the function Field (FC) in the data transmission frame are as shown in fig. 4.
3.2, the host carries out XOR calculation on the contents of a frame header field (SOF), a frame sequence number field (SN), a node address information field (SA/MA), a function Field (FC), a data length field (LT), a heart rate data field (HRDA) and a frame end field (EOF) in the received data transmission frame, compares the XOR value obtained by calculation with the content of a check field (BCC) in the data transmission frame, enters step 3.3 if the comparison is the same, the received data transmission frame is correct and complete and has no byte loss phenomenon, and enters step 4 if the comparison results are different.
Step 3.3, when the content of the function Field (FC) is 0x00, setting the current stored ZigBee terminal node state as good operation,
when the content of the function Field (FC) is 0x01, the host registers the address of the ZigBee terminal node which is newly added into the network,
when the content of the function Field (FC) is 0x02, the host displays that the Zigbee end node currently performing data measurement is in an abnormal state,
when the content of the function Field (FC) is 0x03, the host updates the address of the ZigBee terminal node which currently sends data.
When the content of the function Field (FC) is 0x04, the host deregisters the address of the Zigbee terminal node that is currently ready to quit the network.
Step 4, the host encapsulates the data response frame according to the data sending frame;
the data response frame includes a frame header field (SOF), a frame sequence number field (SN), a node address information field (SA), a response instruction field (RI), a check field (BCC), a frame end field (EOF)
Step 4.1, the host sets the content of the header field (SOF) of the data response frame to 0x3C, indicating that this is the start of frame of the data response frame,
step 4.2, the host sets the end of frame field (EOF) of the data response frame to 0x3E, indicating that this is the end of data response frame.
And 4.3, setting the frame sequence number field (SN) of the data response frame as the frame sequence number field of the corresponding data sending frame by the host.
And 4.4, setting the node address information field (SA) of the data response frame as the node address information field of the corresponding data transmission frame by the host.
Step 4.5, setting and meaning of the response instruction field (RI) are shown in fig. 5, if the host does not find abnormality when the host parses the data transmission frame for verification and the function Field (FC) of the corresponding data transmission frame reflects that the received heart rate data is not abnormal, setting the response instruction field (RI) in the data response frame to 0x01 when encapsulating the data response frame to indicate that the heart rate data is successfully received, if abnormality is found when parsing the data transmission frame for verification or the function Field (FC) of the corresponding data transmission frame reflects that the received heart rate data is abnormal, that is, the content is 0x02, setting the response instruction field in the data response frame to 0x00 when encapsulating the data response frame, indicating that the data is failed to be received, and data retransmission needs to be performed.
And 4.6, carrying out exclusive OR calculation on the content of a frame header field (SOF), the content of a frame sequence number field (SN), the content of a node address information field (SA), the content of a response instruction field (RI) and the content of a frame end field (EOF) in the data response frame to obtain an exclusive OR value, and setting the exclusive OR value in a check field (BCC) in the data response frame.
Step 5, the ZigBee coordinator receives the data response frame and forwards the data response frame to the ZigBee terminal node;
the ZigBee coordinator receives a data response frame corresponding to the data transmission frame, positions a frame head position of the data response frame by judging whether the content of the received data is equal to 0x3C, and positions a frame tail position of the data response frame by judging whether the content of the received data is equal to 0x 3E. And after the data response frame is completely received, the ZigBee coordinator starts to analyze the node address information field (SA), and the data response frame is sent to the ZigBee terminal node corresponding to the node address information field (SA) through the wireless network.
And 6, analyzing the data response frame received by the ZigBee terminal node, and if the corresponding data transmission frame is judged to be incorrectly received by analyzing, retransmitting the data transmission frame to the ZigBee coordinator.
The ZigBee terminal node receives the data response frame, positions the frame head of the data response frame by judging whether the content of the received data is 0x3C, and positions the frame tail of the data response frame by judging whether the content of the received data is 0x 3E. After the data response frame is completely received, the ZigBee terminal node analyzes the content of the response instruction field (RI), whether the host completely receives the sent heart rate data is judged, when the content of the response instruction field (RI) is 0x00, the failure of the host in receiving the heart rate data is shown, at the moment, the data sending frame is packaged and sent again, and the measured heart rate data is retransmitted. When the analytic content is 0x01, the host successfully receives the heart rate data, and the ZigBee terminal node waits for the heart rate data measurement result of the sensor in the next period.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.

Claims (4)

1. Heart rate data acquisition and host serial port communication method based on ZigBee is characterized by comprising the following steps:
step 1, collecting heart rate data by a ZigBee terminal node;
step 2, the ZigBee terminal node forms a Zigbee data packet by the heart rate data, the heart rate data serial number, the node address information and the node state and sends the Zigbee data packet to the ZigBee coordinator, and the ZigBee coordinator encapsulates a data sending frame according to the Zigbee data packet and sends the data sending frame to the host;
step 3, the host analyzes the received data transmission frame, judges the integrity and correctness of the data transmission frame, judges whether the ZigBee terminal node works normally according to the node state, and judges whether the ZigBee terminal node address needs to be registered or unregistered or updated according to the node state;
step 4, the host encapsulates the data response frame according to the data sending frame;
step 5, the ZigBee coordinator receives the data response frame and forwards the data response frame to the ZigBee terminal node;
and 6, analyzing the data response frame received by the ZigBee terminal node, and if the corresponding data transmission frame is judged to be incorrectly received by analyzing, retransmitting the data transmission frame to the ZigBee coordinator.
2. The ZigBee-based heart rate data acquisition and host serial port communication method as claimed in claim 1, wherein the step 2 comprises the steps of:
step 2.1, setting a frame header field of a data transmission frame;
step 2.2, setting a frame sequence number field of the data sending frame as a heart rate data sequence number of the currently received Zigbee data packet;
step 2.3, setting the node address information field of the data sending frame as the node address information of the Zigbee data packet;
step 2.4, if the node state is normal and can receive heart rate data, setting the content of the functional field in the data transmission frame to be 0x 00;
if the node state is a newly added network node, setting the content of the function field of the data transmission frame to be 0x 01;
if the received heart rate data is abnormal, setting the content of a function field of a data transmission frame to be 0x 02;
if the node state is that the network address changes, setting the content of the function field of the data transmission frame to be 0x 03;
if the node status is ready to exit the network, the contents of the function field of the data transmission frame are set to 0x04,
step 2.5, after receiving the heart rate data, the ZigBee coordinator judges the length of the heart rate data, sets the data length field of the data transmission frame as the length of the heart rate data,
step 2.6, adding the measured heart rate data in the heart rate data field in the data transmission frame,
step 2.7, carrying out XOR calculation on the frame header field, the frame sequence number field, the node address information field, the function field, the data length field, the heart rate data field and the frame tail field of the data transmission frame to obtain an XOR value as the content of the check field in the data transmission frame,
and 2.8, setting a frame tail field in the data transmission frame, and transmitting the data transmission frame to the host by the ZigBee coordinator.
3. The ZigBee-based heart rate data acquisition and host serial port communication method as claimed in claim 2, wherein the step 3 comprises the following steps:
step 3.1, the host receives the data sending frame and analyzes the data sending frame;
3.2, the host carries out XOR calculation on the contents of a frame header field, a frame sequence number field, a node address information field, a function field, a data length field, a heart rate data field and a frame tail field in the received data sending frame, compares the XOR value obtained by calculation with the content of a check field in the data sending frame, and enters step 3.3 if the comparison is the same, or enters step 4 if the comparison result is different;
step 3.3, when the content of the function field is 0x00, setting the current stored ZigBee terminal node state as good operation,
when the content of the function field is 0x01, the host registers the address of the ZigBee terminal node which is newly added into the network,
when the content of the function field is 0x02, the host displays that the Zigbee end node currently performing data measurement is in an abnormal state,
when the content of the function field is 0x03, the host updates the address of the ZigBee terminal node which currently sends data,
when the content of the function field is 0x04, the host logs off the address of the Zigbee terminal node that is currently ready to exit the network.
4. The ZigBee-based heart rate data acquisition and host serial port communication method as claimed in claim 3, wherein the step 4 comprises the following steps:
step 4.1, the host sets the frame header field of the data response frame;
4.2, the host sets the frame tail field of the data response frame;
4.3, the host sets the frame number field of the data response frame as the frame number field of the corresponding data sending frame;
step 4.4, the host sets the node address information field of the data response frame as the node address information field of the corresponding data sending frame;
step 4.5, if the host computer does not find the abnormality when analyzing the data sending frame for verification and the function field of the corresponding data sending frame reflects that the abnormality is not 0x02, setting the response instruction field in the data response frame as the heart rate data receiving success;
if the analyzed data transmission frame is abnormal or the function field of the corresponding data transmission frame is 0x02 when being checked, setting the response instruction field in the data response frame as the data reception failure and needing to perform data retransmission;
and 4.6, the host carries out XOR calculation on the frame header field, the frame sequence number field, the node address information field, the response instruction field and the frame tail field in the data response frame to obtain an XOR value and arranges the XOR value in a check field in the data response frame.
CN202110555603.8A 2021-05-21 2021-05-21 Heart rate data acquisition and host serial port communication method based on ZigBee Active CN113312296B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110555603.8A CN113312296B (en) 2021-05-21 2021-05-21 Heart rate data acquisition and host serial port communication method based on ZigBee

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110555603.8A CN113312296B (en) 2021-05-21 2021-05-21 Heart rate data acquisition and host serial port communication method based on ZigBee

Publications (2)

Publication Number Publication Date
CN113312296A true CN113312296A (en) 2021-08-27
CN113312296B CN113312296B (en) 2022-01-18

Family

ID=77374054

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110555603.8A Active CN113312296B (en) 2021-05-21 2021-05-21 Heart rate data acquisition and host serial port communication method based on ZigBee

Country Status (1)

Country Link
CN (1) CN113312296B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070129081A1 (en) * 2005-12-02 2007-06-07 Samsung Electronics Co., Ltd. Local congestion-avoidance method in wireless personal area network
US20070258386A1 (en) * 2006-05-03 2007-11-08 Institute For Information Industry Zigbee network system, method with roaming function, and computer readable medium thereof
CN107426672A (en) * 2017-06-21 2017-12-01 山东师范大学 Multichannel physiologic information monitoring system and method based on ZigBee-network
CN108600366A (en) * 2018-04-24 2018-09-28 山东师范大学 Drop information monitoring method and system based on ZigBee multihop networks
CN111010681A (en) * 2019-11-25 2020-04-14 中南民族大学 Intelligent medical monitoring system based on ZigBee network
CN112637338A (en) * 2020-12-22 2021-04-09 广州技象科技有限公司 Internet of things node service management method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070129081A1 (en) * 2005-12-02 2007-06-07 Samsung Electronics Co., Ltd. Local congestion-avoidance method in wireless personal area network
US20070258386A1 (en) * 2006-05-03 2007-11-08 Institute For Information Industry Zigbee network system, method with roaming function, and computer readable medium thereof
CN107426672A (en) * 2017-06-21 2017-12-01 山东师范大学 Multichannel physiologic information monitoring system and method based on ZigBee-network
CN108600366A (en) * 2018-04-24 2018-09-28 山东师范大学 Drop information monitoring method and system based on ZigBee multihop networks
CN111010681A (en) * 2019-11-25 2020-04-14 中南民族大学 Intelligent medical monitoring system based on ZigBee network
CN112637338A (en) * 2020-12-22 2021-04-09 广州技象科技有限公司 Internet of things node service management method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
AIJUAN SONG等: ""Remote monitoring system based on Zigbee wireless sensor network"", 《2017 29TH CHINESE CONTROL AND DECISION CONFERENCE(CCDC)》 *
侯睿等: ""基于ZigBee的医疗监测系统自适应拥塞控制方法"", 《中南民族大学学报(自然科学版)》 *

Also Published As

Publication number Publication date
CN113312296B (en) 2022-01-18

Similar Documents

Publication Publication Date Title
US8480577B2 (en) Wireless patient monitoring system
CN110290208B (en) Home security communication platform and method based on remote Internet of things
Lou et al. A wireless health monitoring system based on android operating system
CN103888362A (en) Multi-band wireless sensor network data router and system
CN206117730U (en) Thing networking environment real -time monitoring system based on 6LoWPAN agreement
CN106453580A (en) 6LoWPAN protocol based real-time IoT (Internet of Things) environment monitoring system
CN107426672A (en) Multichannel physiologic information monitoring system and method based on ZigBee-network
WO2008085916A2 (en) Adaptive framework for the flow of medical device data in the personal health space
CN105708418A (en) Physiological data acquisition method
CN115022302B (en) Equipment fault data remote transmission method and device, electronic equipment and storage medium
CN113312296B (en) Heart rate data acquisition and host serial port communication method based on ZigBee
CN105187332B (en) Multi-source data transmission method based on Zigbee network
CN106372404A (en) Intelligent medical monitoring system
CN102082627A (en) Health data transmission method and system
CN113630753B (en) ZigBee-based body temperature data acquisition and host serial port communication method
CN107071717A (en) A kind of collecting method and device based on Bluetooth technology
US20100229064A1 (en) Wireless Transmission Method and Apparatus
Li et al. Reducing electric power consumption when transmitting ECG/EMG/EEG using a bluetooth low energy microcontroller
CN204836240U (en) Intelligent monitoring system
Ren et al. Experimental evaluation of on-body transmission characteristics for wireless biosensors
CN115150436B (en) System and method for realizing serial communication between Internet of things sensing module and MCU
Hu et al. Personal Health Monitoring System Based on Body Sensor Network
CN105725990A (en) Method for collecting and processing physical sign data
EP4312419A1 (en) Sensor data transmission method and device
CN207249898U (en) Online low-consumption wireless pH value sensor

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