Terminal device, and frame sending and receiving methods
09788356 ยท 2017-10-10
Assignee
Inventors
Cpc classification
Y02D30/70
GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
H04L25/03019
ELECTRICITY
International classification
H04L25/03
ELECTRICITY
Abstract
The disclosure provides a terminal device, and frame sending and receiving methods, which relate to the field of communications. The terminal device includes: a confirming component configured to send a broadcast control frame to another terminal device which supports a Wireless Fidelity (Wi-Fi) direct-connecting technology, and confirm that the another terminal device which replies a broadcast response frame supports dynamic frame interaction after receiving the broadcast response frame replied by the another terminal device; and a scanning component configured to send a scanning request frame to the another terminal device which supports the dynamic frame interaction, wherein the field indicating the address of the receiving end in the scanning request frame is null. The length of the frames are greatly reduced by dynamically and self-adaptively adjusting the lengths of interaction frames for the frames in a scanning phase, a discovery phase and an operating phase respectively, thereby effectively solving the problem of power consumption; and meanwhile, a simple physical-connecting solution can be realized, and therefore devices which support Wi-Fi direct-connecting can simply interact with one another.
Claims
1. A terminal device, comprising: a confirming component configured to send a broadcast control frame to another terminal device which supports a Wi-Fi direct-connecting technology, and confirm that the another terminal device which replies a broadcast response frame supports dynamic frame interaction after receiving the broadcast response frame replied by the another terminal device; and a scanning component configured to send scanning request frame to the another terminal device which supports the dynamic frame interaction, wherein a field indicating an address of a receiving end in the scanning request frame is null.
2. The terminal device according to claim 1, further comprising: a discovery component configured to receive the scanning request frame sent by the another terminal device which supports the dynamic frame interaction, parse the scanning request frame to obtain a parsing result, construct a scanning response frame based on that the parsing result shows that the field indicating the address of the receiving end in the scanning request frames sent by the another terminal devices is null, and send the scanning response frame to the another terminal device, wherein type information and sub-type information is only retained in MAC header fields of the scanning response frame.
3. The terminal device according to claim 1, further comprising: an operating component configured to send an operating data frame to the another terminal device which supports the dynamic frame interaction, wherein a length of frame body data area of the operating data frame is smaller than a length of frame body data area of an original operating data frame.
4. The terminal device according to claim 3, wherein the length of the frame body data area of the operating data frame is smaller than or equal to 10 bytes, a control type is identified by 1 byte in the frame body data area, and remaining data area is configured to store controlled additional data.
5. The terminal device according to claim 4, wherein the frame body data area of the operating data frame further comprises: an Element Identifier (Element ID) used for identifying whether the operating data frame is an extended operating data frame.
6. The terminal device according to claim 3, wherein the operating component is further configured to: receive the operating data frame sent by the another terminal device which supports the dynamic frame interaction, read the element ID in the frame body data area of the operating data frame, and judge whether the operating data frame is the extended operating data frame according to a values of the element ID.
7. The terminal device according to claim 6, wherein when judging that the received operating data frame is the extended operating data frame, the operating component reads data in a first byte in the frame body data area of the operating data frame, obtain a control type of the another terminal device, reads subsequent additional data according to a length of data stored in second byte, parses complete control information according to the control type and the additional data, responds to a control operation carried out by the another terminal device according to the control information, and sends result state information representing whether the operation succeed to the another terminal device.
8. The terminal device according to claim 7, further comprising: a setting component configured to pre-set functions corresponding to the control information according to a type of the terminal device, wherein the control information comprises the control type and the additional data.
9. A frame sending method, comprising: sending a broadcast control frame to another terminal device which supports a Wi-Fi direct-connecting technology, and confirming that the another terminal device which reply broadcast response frame support dynamic frame interaction after receiving the broadcast response frame replied by the another terminal device; and sending a scanning request frame to the another terminal device which supports the dynamic frame interaction, wherein a field indicating an address of a receiving end of the scanning request frame is null.
10. The frame sending method according to claim 9, further comprising: sending an operating data frame to the another terminal device which supports the dynamic frame interaction, wherein a length of a frame body data area of the operating data frame is smaller than a length of a frame body data area of an original operating data frame.
11. The frame sending method according to claim 10, wherein the frame body data area of the operating data frame further comprises: an Element Identifier (Element ID) used for identifying whether the operating data frame is an extended operating data frame.
12. A frame receiving method, comprising: receiving a broadcast control frame sent by another terminal device which supports a Wi-Fi direct-connecting technology, and replying broadcast response frame to the another terminal device to confirm that dynamic frame interaction is supported; and receiving a scanning request frame sent by the another terminal device which supports the dynamic frame interaction, parsing the scanning request frame to obtain a parsing result, constructing a scanning response frame if the parsing result shows that a field indicating an address of a receiving end of the scanning request frame sent by the another terminal device is null, and sending the scanning response frame to the another terminal device, wherein type information and sub-type information is only retained in MAC header field of the scanning response frame.
13. The frame receiving method according to claim 12, further comprising: receiving an operating data frame sent by the another terminal device which supports the dynamic frame interaction, reading an Element Identifier (Element ID) in a frame body data area of the operating data frame is read, and judging whether the operating data frame is an extended operating data frame according to a value of the element ID.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
DETAILED DESCRIPTION OF THE EMBODIMENTS
(11) In order to make the technical problems intended to be solved, the technical solutions and the advantages of the disclosure clearer, the disclosure is described below with reference to the drawings and the embodiments in detail.
(12) An embodiment of the disclosure provides a terminal device which is intended to solve the problems in the traditional art that the power consumption of the device which supports the Wi-Fi direct-connecting technology is higher and the device adopting the direct current power supply is greatly influenced. The lengths of the frames are greatly reduced by dynamically and self-adaptively adjusting the lengths of the interaction frames for the frames in the scanning phase, the discovery phase and the operating phase respectively and sending enough information data according to the characteristics of the Wi-Fi direct-connecting technology without the need of sending the length-fixed data frames at each time, thereby effectively solving the problem of power consumption; and meanwhile, the simple physical-connecting solution may be realized, and therefore the devices which support Wi-Fi direct-connecting may simply interact with one another.
(13) As shown in
(14) According to the terminal device 10 provided by the embodiment of the disclosure, in a confirming phase of Wi-Fi direct-connecting devices, a broadcast control frame is added to inquire whether a current Wi-Fi direct-connecting device supports the dynamic frame interaction, if YES, a broadcast response frame is replied to an inquiry device to indicate that the dynamic frame interaction is supported, and if NO, the another terminal device will not respond since the broadcast control frame is an extended control frame and the another terminal device can not identify the extended control frame.
(15) After scanning is overtime, the terminal device 10 only locally records the device replying the broadcast response frame, and may carry out dynamic frame interaction with the device replying the broadcast response frame subsequently. The terminal device 10 may still interact with the another terminal device which do not support the dynamic frame interaction according to a conventional frame type, thereby ensuring the compatibility of various devices.
(16) Preferably, the scanning component 13 sends a scanning request frame (Probe Request), which belongs to a management frame type and a broadcast control frame type. As shown in
(17) Due to the fact that the scanning request frame will be quite frequently sent in practical operations, 6 bytes of each frame may be saved. Specifically speaking, according to the transmitting power consumption and receiving power consumption of unit data calculated in the background technology, by means of a standard beacon interval of 100 ms, in passive scanning, (6*8*10*60/1024)*0.68=19.125 mw may be saved after data are received for 1 minute, and (6*8*10*60/1024)*0.83=23.34 mw may be saved after the data are sent for 1 minute.
(18) In another embodiment of the disclosure, the terminal device 10 further includes: a discovery component 14 configured to receive the scanning request frame sent by the another terminal device which supports the dynamic frame interaction, parse the scanning request frame to obtain a parsing result, construct a scanning response frame if the parsing result shows that the field indicating the address of the receiving end in the scanning request frame sent by the another terminal device is null, and send the scanning response frame to the another terminal device, wherein type information and sub-type information is only retained in MAC header fields in the scanning response frame.
(19) The discovery component 14 of the terminal device 10 provided by the embodiment of the disclosure mainly refers to that the Wi-Fi direct-connecting devices stay on all channels, respond to the received scanning request frames and then send the scanning response frames to the other terminal devices. An address field in the scanning response frame cannot be removed, otherwise the other terminal device cannot confirm MAC address in the scanning response frame; meanwhile, the scanning response frame is a control frame; as shown in
(20) Specifically speaking, under the condition of the beacon interval of 100 ms, according to a theoretical calculation method, it may be calculated that 3.2 mw may be saved after the data are received for 1 minute and 3.9 mw may be saved after the data are sent for 1 minute.
(21) In order to better reduce the power consumption, the terminal device 10 further includes: an operating component 15 configured to send an operating data frame to the another terminal device which supports the dynamic frame interaction, wherein the length of frame body data area of the operating data frame is smaller than that of frame body data area of an original operating data frame.
(22) The length of the frame body data area of the operating data frame is smaller than or equal to 10 bytes, a control type is identified by 1 byte in the frame body data area, and remaining data area is configured to store controlled additional data.
(23) In the terminal device 10 provided by the embodiment of the disclosure, the main optimizations of the operating component 15 are embodied in frame body data area, and the maximum length of the frame body data area of the original operating data frame is 2312 bytes. As shown in
(24) Preferably, the frame body data area of the operating data frame further include: an element ID used for identifying whether the operating data frame is an extended operating data frame.
(25) In the terminal device 10 provided by the embodiment of the disclosure, during the operation interaction, it is self-defined that an element ID occupies a byte in frame body of the operating data frame in a dynamic Information Elements (IE) mode, and then the length of subsequent data is recorded to identify whether the operating data frame is the extended operating data frame. If the recorded data length is smaller than or equal to 10 bytes, the operating data frame is the extended operating data frame, and if NO, the operating data frame is not the extended operating data frame.
(26) An example is taken as follows.
(27) It is assumed that control information is sent to the refrigerator from the terminal device, the temperature is identified as 3 DEG C. If a cooling state code of the refrigerator, recorded before, is hexadecimal 20 and additional data is 3, data format of the frame body of the operating data frame is as follows:
(28) TABLE-US-00001 Data area Element ID Data length Control state Additional data 0xDD 0x02 0x20 0x03
(29) Specifically speaking, if the average length of frame body in the operating data frame is considered as 100 bytes according to an empirical value under the condition of dynamic frame bodies, 90 bytes may be saved for each operating data frame; and 30 data frames are sent per minute according to an average sending speed of the data frame, so that (90*8*30/1024)*0.68=14.35mw may be saved after the data are received for 1 minute, and (90*8*30/1024)*0.83=17.51mw may be saved after the data are sent for 1 minute. Under the condition of frequent data interaction, the power consumption of the data frames may be greatly reduced.
(30) Preferably, the operating component 15 is further configured to: receive the operating data frame sent by the another terminal device which supports the dynamic frame interaction, read the element ID in the frame body data area of the operating data frame, and judge whether the operating data frame is the extended operating data frame according to a value of the element ID.
(31) When judging that the received operating data frame is the extended operating data frame, the operating component 15 reads data in the first byte in the frame body data area of the operating data frame, obtains the control type of the another terminal device, read subsequent additional data according to the length of data stored in second byte, parses complete control information according to the control type and the additional data, responds to a control operation carried out by the another terminal device according to the control information, and sends result state information indicating whether the operation succeeds to the another terminal device.
(32) In the terminal device 10 provided by the embodiment of the disclosure, the operating component 15 has a function of sending the operating data frame as well as a function of receiving and parsing the operating data frame. The operating component 15 judges whether the operating data frame is the extended operating data frame according to the element ID in the operating data frame first, and reads the first byte, identifying the control type of the another terminal device, in the frame body data area of the operating data frame if the operating data frame is the extended operating data frame; then the operating component reads the subsequent additional data according to the length of the data stored in the second byte, and parses the complete control information according to the control type and the additional data; and then P2P Wi-Fi direct-connecting device completes a function state requested by a control terminal, and send an operation success state or an operation failure state to the control terminal. Thus, the length of the frame is reduced, and the power consumption may be greatly reduced in frequent frame interaction.
(33) In the traditional art, a physical-connecting network is widely applied to other technical fields. Thus, according to the disclosure, the physical-connecting network is combined with the Wi-Fi direct-connecting technology. According to another embodiment of the disclosure, the terminal device 10 further includes: a setting component 12 configured to pre-set functions corresponding to the control information according to the type of the terminal device, wherein the control information comprises the control type and the additional data.
(34) In the physical-connecting network, the setting component 12 pre-sets the functions corresponding to the control information according to the type of the terminal device 10 such as a temperature control bit of the refrigerator: 1, and an air quantity magnitude control bit of the air conditioner: 2. An one-to-one corresponding relationship may be stored in all terminals and devices in advance, open-type recording function control codes may be provided for a user, and the corresponding relationship may be set by the user according to own habits, hobbies and the like. The Wi-Fi direct-connecting technology is ingeniously combined with the physical-connecting network, thereby more facilitating the lives of people and meeting a humanized design.
(35) An embodiment of the disclosure further provides a frame sending method, which includes that:
(36) In step 111: a broadcast control frame is sent to another terminal device which supports a Wi-Fi direct-connecting technology, and it is confirmed that the another terminal device which replies the broadcast response frame supports dynamic frame interaction after the broadcast response frame replied by the another terminal device is received; and
(37) In step 112: a scanning request frame is sent to the another terminal device which supports the dynamic frame interaction, wherein a field indicating an address of a receiving end in the scanning request frame is null.
(38) As shown in
(39) In step 101: a broadcast control frame used for inquired is constructed.
(40) In step 102: it is judged whether the broadcast response frame from the another terminal device within an overtime limit.
(41) In step 103: if the broadcast response frame from the another terminal device is received within the overtime limit, it is shown that the another terminal device supports the dynamic frame interaction; and
(42) In step 104: if the broadcast response frame from the another terminal device is not received within the overtime limit, carrying out normal frame interaction.
(43) The frame sending method further includes that:
(44) Step 113: an operating data frame is sent to the another terminal device which supports the dynamic frame interaction, wherein the length of frame body data area in the operating data frame is smaller than that of frame body data area of an original operating data frame.
(45) Preferably, the frame body data area in the operating data frame further includes: an element ID used for identifying whether the operating data frame is an extended operating data frame.
(46) It is important to note that the method according to the embodiment is a method corresponding to the terminal device serving as a sending end. All embodiments for the terminal device are applicable to the method, and the technical effects identical to those of the terminal device can be achieved.
(47) An embodiment of the disclosure further provides a frame receiving method, which includes that:
(48) Step 211: a broadcast control frame sent by another terminal device which supports a Wi-Fi direct-connecting technology is received, and a broadcast response frame is replied to the another terminal device to confirm that dynamic frame interaction is supported; and
(49) Step 212: a scanning request frame sent by the another terminal device which supports the dynamic frame interaction is received, the scanning request frame is parsed to obtain a parsing result, a scanning response frame is constructed if the parsing result shows that a field indicating an address of a receiving end in the scanning request frame sent by the another terminal device is null, and the scanning response frame is sent to the another terminal device, wherein type information and sub-type information are only retained in MAC header field of the scanning response frame.
(50) As shown in
(51) Step 301: a scanning request frame is received;
(52) Step 302: it is judged whether the field indicating the address of the receiving end in the received scanning request frames is null;
(53) Step 303: if the field indicating the address of the receiving end is null, it is shown that the scanning request frame is a dynamically optimized request frame;
(54) Step 304: an extended scanning response frame is constructed; and
(55) Step 305: the scanning response frame is sent to the another terminal device.
(56) The frame receiving method further includes that:
(57) Step 213: an operating data frame sent by the another terminal device which supports the dynamic frame interaction is received, an element ID in frame body data area of the operating data frame is read, and it is judged whether the operating data frame is an extended operating data frame according to a value of the element ID.
(58) As shown in
(59) Step 601: the operating data frame sent by the terminal device is received;
(60) Step 602: the element ID in frame body of the operating data frame is read;
(61) Step 603: it is judged whether the operating data frame is the extended operating data frame according to the value of the element ID;
(62) Step 604: if the operating data frame is the extended operating data frame, data in the first byte in the frame body data area of the operating data frame is read, wherein the data indicates a control type of the another terminal device;
(63) Step 605: additional data of subsequent bytes is read according to the control type read in Step 604 and the length of data in the second byte;
(64) Step 606: complete control information is parsed by means of the data read in Step 604 and Step 605, and an control operation from the another terminal device is responded; and
(65) Step 607: operating result state information is returned to a terminal control device, and operating result state information indicating whether an operating result succeeds is returned.
(66) It is important to note that the method according to the embodiment is a method corresponding to the terminal device serving as a receiving end. All embodiments for the terminal device are applicable to the method, and the technical effects identical to those of the terminal device can be achieved.
(67) In the embodiments of the disclosure, the length of the frame is greatly reduced by dynamically and self-adaptively adjusting the length of the interaction frame for the frames in the scanning phase, the discovery phase and the operating phase respectively and sending enough information data according to the characteristics of the Wi-Fi direct-connecting technology without the need of sending the length-fixed data frame at each time, thereby effectively solving the problem of power consumption; and meanwhile, the simple physical-connecting solution may be realized, and therefore the devices which support Wi-Fi direct-connecting may simply interact with one another.
(68) The above is only implementations of the disclosure. It should point out that those ordinary skilled in the technical art can also make some improvements and modifications without departing from the embodiments of the disclosure. These improvements and modifications should fall within the protection scope of the disclosure.
INDUSTRIAL APPLICABILITY
(69) The technical solutions provided by the embodiments of the disclosure can be applied to the technical field of communications. The lengths of the frames are greatly reduced by dynamically and self-adaptively adjusting the lengths of the interaction frames for the frames in the scanning phase, the discovery phase and the operating phase respectively and sending enough information data according to the characteristics of the Wi-Fi direct-connecting technology without the need of sending the length-fixed data frames at each time, thereby effectively solving the problem of power consumption; and meanwhile, the simple physical-connecting solution can be realized, and therefore the devices which support Wi-Fi direct-connecting can simply interact with one another.