CN105099526B - Polling data packet transmission method and device - Google Patents
Polling data packet transmission method and device Download PDFInfo
- Publication number
- CN105099526B CN105099526B CN201510354327.3A CN201510354327A CN105099526B CN 105099526 B CN105099526 B CN 105099526B CN 201510354327 A CN201510354327 A CN 201510354327A CN 105099526 B CN105099526 B CN 105099526B
- Authority
- CN
- China
- Prior art keywords
- time
- bluetooth
- preset
- bluetooth slave
- response
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 230000005540 biological transmission Effects 0.000 title abstract description 21
- 230000004044 response Effects 0.000 claims abstract description 231
- 238000004364 calculation method Methods 0.000 claims description 13
- 230000000694 effects Effects 0.000 abstract description 5
- 230000000630 rising effect Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 13
- 238000004891 communication Methods 0.000 description 10
- 238000012545 processing Methods 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000002618 waking effect Effects 0.000 description 1
Classifications
-
- Y—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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
The disclosure discloses a kind of polling data packet transmission method and device, belongs to Bluetooth transmission field.The polling data packet transmission method includes:It is determined that the Bluetooth slave devices enter preassigned pattern after, according to very first time interval successively to the Bluetooth slave devices send polling data bag;Predetermined instant before next response moment indicated by the predetermined response cycle, according to the second time interval, send first predetermined polling data bag to the Bluetooth slave devices successively.By it is determined that bluetooth equipment enters under preassigned pattern, according to interval duration it is larger the very first time interval to Bluetooth slave devices send polling data bag, and, according to the second time interval, polling data bag is being sent to Bluetooth slave devices close to the response moment indicated by the predetermined response cycle;Solve the problems, such as to be transmitted across how useless polling data bag and cause the rising of oneself power consumption;The effect of power consumption when reducing bluetooth master transmission polling data bag is reached.
Description
Technical Field
The present disclosure relates to the field of bluetooth transmission, and in particular, to a method and an apparatus for sending a polling packet.
Background
When data is transmitted by using a bluetooth mode, in order to ensure the connection between the bluetooth master device and the bluetooth slave device, the bluetooth master device periodically transmits polling data packets to the bluetooth slave device.
When the bluetooth slave device is working, a response packet may be fed back to the bluetooth master device at a predetermined response time according to the received polling packet periodically sent by the bluetooth master device, where the response packet is used to indicate that the bluetooth slave device is in a working state. When the bluetooth slave device is in a dormant state, the bluetooth slave device cannot receive the polling data packet sent by the bluetooth master device, and cannot feed back a response data packet to the bluetooth master device, at this time, the bluetooth master device may cause the increase of its own power consumption due to frequent sending of too many useless polling data packets, and the sending of these useless polling data packets may occupy the antenna of the bluetooth master device, resulting in that other services cannot normally use the antenna.
Disclosure of Invention
The disclosure provides a polling data packet sending method and a polling data packet sending device. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a polling packet sending method, applied to a bluetooth master device that establishes a bluetooth connection with a bluetooth slave device, the method including:
receiving a mode notification sent by the Bluetooth slave device and used for instructing the Bluetooth slave device to enter a preset mode, wherein the mode notification comprises a first time interval, a second time interval and parameters used for calculating a preset response period;
calculating the product of the value of the parameter and the duration indicated by the first time interval to obtain the preset response period;
sequentially sending polling data packets to the Bluetooth slave equipment according to the second time interval;
if a response data packet fed back by the Bluetooth slave equipment is received at the next response time indicated by the preset response period, determining that the Bluetooth slave equipment enters the preset mode, and sequentially sending polling data packets to the Bluetooth slave equipment according to the first time interval;
at a preset time before a next response time indicated by the preset response period, sequentially sending a first preset polling data packet to the Bluetooth slave equipment according to the second time interval, wherein the time length required for sending the first preset polling data packet is longer than the time length from the preset time to the next response time, and the time length indicated by the first time interval is longer than the time length indicated by the second time interval;
and the Bluetooth slave equipment entering the preset mode sends a response data packet to the Bluetooth master equipment according to the received polling data packet at the response time indicated by the preset response period.
Optionally, the method further includes:
after the first preset polling data packets are sequentially sent to the Bluetooth slave equipment, if a response data packet fed back by the Bluetooth slave equipment when the first preset polling data packet is received is not received, accumulating a preset unresponse count value, wherein the unresponse count value is used for indicating the number of times that the response data packet fed back by the Bluetooth slave equipment is not received at the feedback moment after the Bluetooth slave equipment is determined to enter the preset mode; or accumulating preset non-response time length, wherein the non-response time length is used for indicating the time length of not receiving the response data packet fed back by the Bluetooth slave device after the Bluetooth slave device is determined to enter the preset mode.
Optionally, the method further includes:
if the unresponsive count value reaches a preset count threshold value, disconnecting the Bluetooth connection between the Bluetooth master device and the Bluetooth slave device; or,
and if the unresponsive time reaches the preset delay time, disconnecting the Bluetooth connection between the Bluetooth master device and the Bluetooth slave device.
Optionally, the method further includes:
if the unresponsive count value does not reach the preset count threshold value, continuing to execute the step of sequentially sending polling data packets to the Bluetooth slave equipment according to the first time interval; or,
and if the unresponsive time length reaches the preset delay time length, continuously executing the step of sequentially sending polling data packets to the Bluetooth slave equipment according to the first time interval.
Optionally, the method further includes:
multiplying the duration indicated by the second time interval by a second preset value to obtain a preset duration, wherein the second preset value is smaller than the first preset value;
and determining the time which is before the next feedback time and is the preset time away from the next feedback time as the preset time.
According to a second aspect of the embodiments of the present disclosure, there is provided a polling packet transmitting apparatus, for use in a bluetooth master device that establishes a bluetooth connection with a bluetooth slave device, the apparatus including:
the first sending module is configured to send polling data packets to the Bluetooth slave equipment in sequence according to a first time interval after the Bluetooth slave equipment is determined to enter a preset mode;
a second sending module, configured to send a first predetermined number of polling packets to the bluetooth slave device in sequence according to a second time interval at a predetermined time before a next response time indicated by a predetermined response period, where a time length required for sending the first predetermined number of polling packets is longer than a time length from the predetermined time to the next response time, and a time length indicated by the first time interval is longer than a time length indicated by the second time interval;
the Bluetooth slave device entering the preset mode sends a response data packet to the Bluetooth master device according to the received polling data packet at the response time indicated by the preset response period;
the device further comprises:
a receiving module configured to receive a mode notification sent by the bluetooth slave device for instructing the bluetooth slave device to enter the predetermined mode, wherein the mode notification includes the first time interval, the second time interval and a parameter for calculating the predetermined response period;
a first calculation module configured to calculate a product of the value of the parameter and a duration indicated by the first time interval, resulting in the predetermined response period;
a third sending module configured to send polling packets to the bluetooth slave device in sequence according to the second time interval;
a first determining module configured to determine that the bluetooth slave device enters the predetermined mode when a response packet fed back by the bluetooth slave device is received at a next response time indicated by the predetermined response period calculated by the first calculating module.
Optionally, the apparatus further comprises:
a second calculating module, configured to, after the second sending module sequentially sends the first predetermined number of polling packets to the bluetooth slave device, if a response packet fed back by the bluetooth slave device when receiving the first predetermined number of polling packets is not received, accumulate a predetermined non-response count value, where the non-response count value is used to indicate a number of times that no response packet fed back by the bluetooth slave device is received at a feedback time after it is determined that the bluetooth slave device enters the predetermined mode; or accumulating preset non-response time length, wherein the non-response time length is used for indicating the time length of not receiving the response data packet fed back by the Bluetooth slave device after the Bluetooth slave device is determined to enter the preset mode.
Optionally, the apparatus further comprises:
a first disconnection module configured to disconnect a bluetooth connection between the bluetooth master device and the bluetooth slave device when the unresponsive count value calculated by the second calculation module reaches a predetermined count threshold; or,
and the second disconnection module is configured to disconnect the Bluetooth connection between the Bluetooth master device and the Bluetooth slave device when the unresponsive time length calculated by the second calculation module reaches a preset delay time length.
Optionally, the apparatus further comprises:
the first sending module is further configured to send polling packets to the bluetooth slave device in sequence according to the first time interval when the unresponsive count value calculated by the second calculating module does not reach the predetermined count threshold value; or,
the first sending module is further configured to send polling packets to the bluetooth slave device in sequence according to the first time interval when the unresponsive time length calculated by the second calculating module reaches the predetermined delay time length.
Optionally, the apparatus further comprises:
a third calculation module configured to multiply a duration indicated by the second time interval by a value of a second predetermined number, the second predetermined number being smaller than the first predetermined number, to obtain a predetermined duration;
a second determination module configured to determine a time before and the predetermined length of time from the next feedback time as the predetermined time.
According to a third aspect of the embodiments of the present disclosure, there is provided a polling packet transmitting apparatus, for use in a bluetooth master device that establishes a bluetooth connection with a bluetooth slave device, the apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to:
receiving a mode notification sent by the Bluetooth slave device and used for instructing the Bluetooth slave device to enter a preset mode, wherein the mode notification comprises a first time interval, a second time interval and parameters used for calculating a preset response period;
calculating the product of the value of the parameter and the duration indicated by the first time interval to obtain the preset response period;
sequentially sending polling data packets to the Bluetooth slave equipment according to the second time interval;
if a response data packet fed back by the Bluetooth slave equipment is received at the next response time indicated by the preset response period, determining that the Bluetooth slave equipment enters the preset mode, and sequentially sending polling data packets to the Bluetooth slave equipment according to the first time interval;
at a preset time before a next response time indicated by the preset response period, sequentially sending a first preset polling data packet to the Bluetooth slave equipment according to the second time interval, wherein the time length required for sending the first preset polling data packet is longer than the time length from the preset time to the next response time, and the time length indicated by the first time interval is longer than the time length indicated by the second time interval;
and the Bluetooth slave equipment entering the preset mode sends a response data packet to the Bluetooth master equipment according to the received polling data packet at the response time indicated by the preset response period.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
transmitting a polling data packet to the Bluetooth slave device by transmitting the polling data packet to the Bluetooth slave device according to a first time interval with a larger interval duration and restoring a second time interval close to a response time indicated by a preset response period when the Bluetooth device is determined to enter the preset mode; because the polling data packet can be sent by using the first time interval with larger interval duration between two adjacent response moments, and the polling data packet is sent according to the second time interval with smaller interval duration when the response moments are close, the problems that the power consumption of the user is increased due to frequent sending of too many useless polling data packets and the sending of the useless polling data packets occupies the antenna of the Bluetooth main equipment and other services cannot normally use the antenna when the polling data packet is sent by using the time interval with smaller interval duration all the time are solved; the effects of reducing the power consumption of the Bluetooth master device when sending the polling data packet and reducing the occupation of the antenna caused by sending useless polling data packets are achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a schematic illustration of an implementation environment involved in a method of polling packets sending according to some exemplary embodiments;
FIG. 2 is a flow diagram illustrating a method of polling packet transmission in accordance with an exemplary embodiment;
FIG. 3A is a flow chart illustrating a method of polling packet transmission in accordance with another exemplary embodiment;
FIG. 3B is a schematic diagram illustrating a method of determining a predetermined time before a next response time indicated by a predetermined response period in accordance with an exemplary embodiment;
FIG. 3C is a diagram illustrating a transmission of a poll packet to a Bluetooth slave device, according to an example embodiment;
FIG. 3D is a schematic diagram of FIG. 3C with a portion of the time period enlarged;
FIG. 4 is a block diagram illustrating a polling packet transmitting device in accordance with an exemplary embodiment;
FIG. 5 is a block diagram illustrating a polling packet transmitting device in accordance with another exemplary embodiment;
fig. 6 is a block diagram illustrating an apparatus for transmitting polling packets in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a schematic diagram illustrating an implementation environment related to a polling packet sending method according to some exemplary embodiments, which may include a bluetooth master device 110 and a bluetooth slave device 120, as shown in fig. 1.
The bluetooth master device 110 and the bluetooth slave device 120 are connected by a bluetooth method.
The bluetooth master device 110 is a device that transmits data to the bluetooth slave device 120, and the bluetooth master device 110 may be any electronic device with bluetooth function, such as a smart phone, a tablet computer, a smart television, an e-book reader, a multimedia player, a laptop portable computer, a desktop computer, and the like.
The bluetooth slave device 120 may also be any electronic device with a bluetooth function, such as a smart phone, a tablet computer, a smart television, an e-book reader, a multimedia player, a laptop portable computer, a desktop computer, and the like, and may also be a wearable device (such as a smart band, a smart key ring, a smart watch, a smart tie clip, a smart ring, and the like), a smart remote controller, a smart door lock, a smart weight scale, and the like.
In the bluetooth transmission protocol, the bluetooth slave device may enter a predetermined mode, and send a response packet to the bluetooth master device every response time in the predetermined mode according to a polling packet received from the bluetooth master device, so as to inform the bluetooth master device that the bluetooth slave device is not disconnected. The following embodiments are described in terms of this operating principle specified in the bluetooth transmission protocol.
Fig. 2 is a flowchart illustrating a polling packet transmission method according to an exemplary embodiment, which is applied to the bluetooth master device 110 in the implementation environment shown in fig. 1, as shown in fig. 2, and includes the following steps.
In step 201, after determining that the bluetooth slave device enters the predetermined mode, polling packets are sequentially transmitted to the bluetooth slave device according to a first time interval.
In step 202, at a predetermined time before a next response time indicated by a predetermined response period, sequentially sending a first predetermined number of polling packets to the bluetooth slave device according to a second time interval, where a time period required for sending the first predetermined number of polling packets is longer than a time period from the predetermined time to the next response time, and a time period indicated by the first time interval is longer than a time period indicated by the second time interval.
And the Bluetooth slave equipment entering the preset mode sends a response data packet to the Bluetooth master equipment according to the received polling data packet at the response time indicated by the preset response period.
In summary, in the polling packet transmission method provided in the embodiment of the present disclosure, when it is determined that the bluetooth device enters the predetermined mode, the polling packet is transmitted to the bluetooth slave device according to the first time interval with the longer interval duration, and the second time interval is recovered when the response time indicated by the predetermined response period approaches, so as to transmit the polling packet to the bluetooth slave device; because the polling data packet can be sent by using the first time interval with larger interval duration between two adjacent response moments, and the polling data packet is sent according to the second time interval with smaller interval duration when the response moments are close, the problems that the power consumption of the user is increased due to frequent sending of too many useless polling data packets and the sending of the useless polling data packets occupies the antenna of the Bluetooth main equipment and other services cannot normally use the antenna when the polling data packet is sent by using the time interval with smaller interval duration all the time are solved; the effects of reducing the power consumption of the Bluetooth master device when sending the polling data packet and reducing the occupation of the antenna caused by sending useless polling data packets are achieved.
Fig. 3A is a flowchart illustrating a polling packet transmission method according to another exemplary embodiment, which is applied to the bluetooth master device 110 in the implementation environment shown in fig. 1, as shown in fig. 3A, and includes the following steps.
In step 301, a mode notification sent by the bluetooth slave device for instructing the bluetooth slave device to enter a predetermined mode is received, wherein the mode notification includes the first time interval, the second time interval and a parameter for calculating a predetermined response period.
In practical application, when the bluetooth slave device is ready to enter the sleep state, in order to ensure that the bluetooth slave device can also connect with the bluetooth master device to receive data sent by the bluetooth master device, the bluetooth transmission protocol specifies a predetermined mode after the bluetooth slave device goes to sleep, and in the predetermined mode, the bluetooth device may wake up at a response time indicated by a predetermined response period to receive a polling packet sent by the bluetooth master device and send a response packet to the bluetooth master device after receiving the polling packet. Then the Bluetooth slave device waits for the next response time to wake up again, continues to receive the polling data packet sent by the Bluetooth master device, and sends a response data packet to the Bluetooth master device after receiving the polling data packet.
The polling packet is generally a null packet, and obviously, in practical applications, the polling packet may also be a packet containing content.
In practical implementation, if the bluetooth slave device wants to enter the predetermined mode, the bluetooth slave device will generally notify the bluetooth master device, and at this time, the bluetooth slave device will send a mode notification for instructing the bluetooth slave device to enter the predetermined mode, where the mode notification may include the first time interval, the second time interval, and parameters for calculating the predetermined response period.
Wherein the indicated duration of the first time interval is greater than the indicated duration of the second time interval. The predetermined response period is used to indicate a response time at which the bluetooth slave device wakes up.
Generally, the duration indicated by the first time interval and the duration indicated by the second time interval are both less than the duration indicated by the predetermined response period (i.e., the duration between two adjacent response times).
In step 302, the product of the value of the parameter and the duration indicated by the first time interval is calculated to obtain the predetermined response period.
After receiving the mode notification, the bluetooth master device first needs to calculate a predetermined response period for the bluetooth slave device to wake up according to the parameters in the mode notification.
For example, if the bluetooth slave device wants to wake up every 6s, i.e. the predetermined response period is 6s, then if the second time interval is 20ms, the parameter for calculating the predetermined response period may be defined as 300. I.e. the predetermined response period should be the product of the parameter used to calculate the predetermined response period multiplied by the length of time indicated by the first time interval.
In step 303, polling packets are sequentially transmitted to the bluetooth slave device at a second time interval.
And the Bluetooth master device sequentially sends polling data packets to the Bluetooth slave device according to a normal second time interval.
In step 304, if a response packet fed back by the bluetooth slave device is received at the next response time indicated by the predetermined response period, it is determined that the bluetooth slave device enters the predetermined mode.
The response packet here is transmitted to the bluetooth master device by the bluetooth slave device when the polling packet is received at the next response timing indicated by the predetermined response period.
When a response data packet fed back by the Bluetooth slave device is received at the next response time indicated by the preset response period, the Bluetooth master device determines that the Bluetooth slave device successfully enters the preset mode.
And when the response data packet fed back by the bluetooth slave device is not received at the next response time indicated by the predetermined response period, step 303 is continuously executed until the response data packet fed back by the bluetooth slave device is received, and it is determined that the bluetooth slave device has successfully entered the predetermined mode.
For example, still taking the predetermined response period as 6s and the second time interval as 20ms as an example, the bluetooth master device sends a polling packet to the bluetooth slave device every 20ms, and when the first 6s arrives, if the bluetooth master device receives a response packet fed back by the bluetooth slave device, it may be determined that the bluetooth slave device performs the predetermined mode. And when the first 6s arrives, if the bluetooth master device does not receive the response data packet fed back by the bluetooth slave device, the bluetooth slave device can be determined to not successfully perform the predetermined mode, at this time, a polling data packet is continuously sent to the bluetooth slave device every 20ms until the second 6s (namely, 12 th s) arrives, whether the bluetooth master device receives the response data packet fed back by the bluetooth slave device or not is judged, and if the bluetooth master device receives the response data packet fed back by the bluetooth slave device, the bluetooth slave device can be determined to perform the predetermined mode.
In step 305, after determining that the bluetooth slave device enters the predetermined mode, polling packets are sequentially transmitted to the bluetooth slave device according to a first time interval.
When the bluetooth slave performs the predetermined mode, which means that the bluetooth slave may be in a dormant state, in order to reduce power consumption due to the transmission of too many useless polling packets or reduce the time taken up by the antenna when transmitting these useless polling packets, the bluetooth master may transmit polling packets to the bluetooth slave with a first time interval having a longer time interval.
For example, still taking the predetermined response period as 6s and the second time interval as 20ms as an example, the first time interval may be 120ms, that is, it is originally necessary to send a polling packet to the bluetooth slave device every 20ms, and it is changed to send a polling packet to the bluetooth slave device every 120 ms. Thereby the number of transmitted polling packets can be greatly reduced.
Since the bluetooth slave device generally does not need to transmit data with the bluetooth master device during the time period between two adjacent response time, the frequency of transmitting polling data packets can be reduced appropriately.
In step 306, a first predetermined number of polling packets are sequentially transmitted to the bluetooth slave device at a predetermined time before the next response time indicated by the predetermined response period at a second time interval.
When the bluetooth master device sequentially sends polling packets to the bluetooth slave device according to the first time interval, if a predetermined time before a next response time indicated by the predetermined response period is reached, that is, the predetermined time is close to the response time, in order to ensure that the bluetooth slave device can respond to the polling packets as soon as possible, the bluetooth master device may recover the second time interval, that is, sequentially send the first predetermined polling packets to the bluetooth slave device according to the second time interval.
Optionally, as shown in fig. 3B, when determining a predetermined time before the next response time, the bluetooth master device may include the following steps:
in step 306a, the duration indicated by the second time interval is multiplied by a value of a second predetermined number, which is smaller than the first predetermined number, to obtain the predetermined duration.
The time length required for sending the first preset polling data packet is longer than the time length from the preset time to the next response time.
In step 306b, the time before and a predetermined time from the next feedback time is determined as the predetermined time.
For example, referring to fig. 3C and fig. 3D, where fig. 3C is a schematic diagram illustrating a polling packet being transmitted to a bluetooth slave device according to an exemplary embodiment, and fig. 3D is a schematic diagram illustrating a part of a period in fig. 3C being enlarged. In fig. 3C and 3D, taking an example that the predetermined response period is 6s, the second time interval is 20ms, the first time interval is 120ms, and the second predetermined time is 5, first, after receiving the notification mode sent by the bluetooth slave device, the bluetooth master device sends a polling packet to the bluetooth slave device according to the second time interval 20ms defined in the notification mode, and after the first 6s, the bluetooth master device determines that the bluetooth slave device enters the predetermined mode. Then, the bluetooth master device sends a polling packet to the bluetooth slave device every 120ms, and determines a time corresponding to 100ms before 12s (the time length indicated by the second time interval is multiplied by a second predetermined value of 5) as the predetermined time (i.e., a time corresponding to 900ms after 11 s).
Typically, the polling packet is sent within a predetermined time period before and after the response time, and the time period indicated by the second time interval is set, so that the bluetooth slave device can receive the polling packet as soon as possible after waking up. In general, a second predetermined number of polling packets may be sent before the response time, and a third predetermined number of polling packets may be sent after the response time, where the value of the second predetermined number plus the third predetermined number is the value of the first predetermined number. For example, the second predetermined number and the third predetermined number are both 5, and the first predetermined number is 10.
As can be seen from fig. 3C, since the second predetermined number is smaller than the first predetermined number, the time (greater than 100ms) required for the bluetooth master device to finish sending the first predetermined number of polling packets is longer than the time from the predetermined time to the 12 th s.
In step 307, after sequentially sending the first predetermined polling packets to the bluetooth slave device, if a response packet fed back by the bluetooth slave device when receiving the first predetermined polling packet is not received, accumulating a predetermined non-response count value; alternatively, predetermined unresponsive time periods are accumulated.
The unresponsive count value mentioned here is used to indicate the number of times that the response packet fed back by the bluetooth slave device is not received at the feedback time after it is determined that the bluetooth slave device enters the predetermined mode.
The unresponsive period mentioned here is used to indicate a period of time during which the response packet fed back by the bluetooth slave device is not received after the bluetooth slave device is determined to enter the predetermined mode.
After the first preset polling data packets are sequentially sent to the Bluetooth slave equipment, if a response data packet fed back by the Bluetooth slave equipment when the Bluetooth slave equipment receives the first preset polling data packet is not received, the Bluetooth slave equipment is indicated not to wake up at the response time, and at the moment, a preset non-response count value is accumulated, or preset non-response time is accumulated.
In actual implementation, after determining that the Bluetooth slave device enters a preset mode, the Bluetooth master device accumulates the unresponsive count value from 0; or, the Bluetooth master device starts to count and accumulate the non-response time length from 0 after determining that the Bluetooth slave device enters the preset mode.
In step 308, if the unresponsive count value does not reach the predetermined count threshold, continuing to perform the step of sequentially sending polling packets to the bluetooth slave device according to the first time interval; or if the non-response time reaches the preset delay time, continuing to execute the step of sequentially sending polling data packets to the Bluetooth slave equipment according to the first time interval.
In practical applications, the bluetooth slave device does not successfully wake up at one of the response times, but may successfully wake up at a subsequent response time, so in order to ensure that the bluetooth slave device can successfully wake up and avoid mistakenly disconnecting the bluetooth connection between the bluetooth master device and the bluetooth slave device, a predetermined count threshold value may be set, or a predetermined delay time period may be set.
For example, if the unresponsive count value does not reach the predetermined count threshold, the step of sequentially transmitting polling packets to the bluetooth slave device at the first time interval (i.e., step 305) is continued, and then the step 306 is continued. For example, the non-response count value is multiplied by the time indicated by the predetermined response period, and if the obtained product value does not reach the predetermined maximum delay time, the step of sequentially sending polling packets to the bluetooth slave device according to the first time interval (i.e., step 305) is continuously performed, and then the step 306 is continuously performed.
Still referring to fig. 3C, taking the predetermined count threshold as 5 as an example, if the bluetooth master device does not receive the response packet at the 12 th time of the response time, the predetermined non-response count value is accumulated to 1, and at this time, the non-response count value is smaller than the predetermined count threshold 5, the process returns to step 305, that is, the polling packet is continuously transmitted to the bluetooth slave device according to 120 ms.
In step 309, if the unresponsive count value reaches a predetermined count threshold, disconnecting the bluetooth connection between the bluetooth master device and the bluetooth slave device; or if the non-response time reaches the preset delay time, disconnecting the Bluetooth connection between the Bluetooth master device and the Bluetooth slave device.
In practical applications, if the bluetooth slave device does not wake up for a long period of time, the bluetooth connection between the bluetooth master device and the bluetooth slave device may be disconnected, and a predetermined count threshold may be set, or a predetermined delay time may be set to limit the maximum time period for which the bluetooth slave device can be allowed to sleep.
Still referring to fig. 3C, if the bluetooth master device does not receive the response packet at the 12 th time of the response time, the predetermined non-response count value is incremented to 1, and then no response packet is received at the 18 th, 24 th, 30 th and 36 th time of the response time, the non-response count value is incremented to 5 at the 36 th time, at which point the bluetooth connection between the bluetooth master device and the bluetooth slave device may be disconnected.
Or, starting timing after the bluetooth master device does not receive the response data packet at the 12 th time of the response time, and disconnecting the bluetooth connection between the bluetooth master device and the bluetooth slave device when the timing reaches the preset delay time and still does not receive the response data packet fed back by the bluetooth slave device.
In summary, in the polling packet transmission method provided in the embodiment of the present disclosure, when it is determined that the bluetooth device enters the predetermined mode, the polling packet is transmitted to the bluetooth slave device according to the first time interval with the longer interval duration, and the second time interval is recovered when the response time indicated by the predetermined response period approaches, so as to transmit the polling packet to the bluetooth slave device; because the polling data packet can be sent by using the first time interval with larger interval duration between two adjacent response moments, and the polling data packet is sent according to the second time interval with smaller interval duration when the response moments are close, the problems that the power consumption of the user is increased due to frequent sending of too many useless polling data packets and the sending of the useless polling data packets occupies the antenna of the Bluetooth main equipment and other services cannot normally use the antenna when the polling data packet is sent by using the time interval with smaller interval duration all the time are solved; the effects of reducing the power consumption of the Bluetooth master device when sending the polling data packet and reducing the occupation of the antenna caused by sending useless polling data packets are achieved.
It should be added that, the various steps involved in fig. 3A may be arbitrarily combined to form different embodiments, for example, the above steps 305 to 308 are combined to form one embodiment, or the steps 301 to 307 and 309 are combined to form one embodiment, and the combination manner of the various steps is not limited in the embodiment of the present disclosure.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 4 is a block diagram illustrating a polling packet transmitting apparatus according to an exemplary embodiment, which is applied to the bluetooth master device 110 in the implementation environment shown in fig. 1, as shown in fig. 4, and includes, but is not limited to: a first transmission module 401 and a second transmission module 402.
A first sending module 401 configured to send polling packets to the bluetooth slave device in sequence according to a first time interval after determining that the bluetooth slave device enters the predetermined mode;
a second sending module 402, configured to send a first predetermined number of polling packets to the bluetooth slave device in sequence according to a second time interval at a predetermined time before a next response time indicated by a predetermined response period, where a time period required for sending the first predetermined number of polling packets is longer than a time period from the predetermined time to the next response time, and a time period indicated by the first time interval is longer than a time period indicated by the second time interval;
and the Bluetooth slave device entering the preset mode sends a response data packet to the Bluetooth master device according to the received polling data packet at the response time indicated by the preset response period.
In one possible implementation, please refer to fig. 5, which is a block diagram illustrating a polling packet transmitting device according to another exemplary embodiment, the polling packet transmitting device may further include: a receiving module 403, a first calculating module 404, a third sending module 405 and a first determining module 406.
A receiving module 403, configured to receive a mode notification sent by the bluetooth slave device for instructing the bluetooth slave device to enter a predetermined mode, where the mode notification includes the first time interval, the second time interval, and a parameter for calculating a predetermined response period;
a first calculation module 404 configured to calculate a product of the value of the parameter and a duration indicated by a first time interval, resulting in the predetermined response period;
a third sending module 405 configured to send polling packets to the bluetooth slave devices in sequence according to the second time interval;
a first determining module 406, configured to determine that the bluetooth slave device enters the predetermined mode when receiving a response packet fed back by the bluetooth slave device at a next response time indicated by the predetermined response period calculated by the first calculating module 404, where the response packet is sent to the bluetooth master device when the bluetooth slave device receives the polling packet at the next response time indicated by the predetermined response period.
In a possible implementation manner, still referring to fig. 5, the polling packet transmitting apparatus may further include:
a second calculating module 407, configured to, after the second sending module 402 sequentially sends the first predetermined polling packets to the bluetooth slave device, if a response packet fed back by the bluetooth slave device when receiving the first predetermined polling packet is not received, accumulate a predetermined non-response count value, where the non-response count value is used to indicate the number of times that no response packet fed back by the bluetooth slave device is received at a feedback time after determining that the bluetooth slave device enters the predetermined mode; or accumulating the preset non-response time length, wherein the non-response time length is used for indicating the time length for not receiving the response data packet fed back by the Bluetooth slave device after the Bluetooth slave device is determined to enter the preset mode.
In a possible implementation manner, still referring to fig. 5, the polling packet transmitting apparatus may further include: a first disconnection module 408, or alternatively, a second disconnection module 409.
A first disconnection module 408 configured to disconnect the bluetooth connection between the bluetooth master device and the bluetooth slave device when the unresponsive count value calculated by the second calculation module 407 reaches a predetermined count threshold; or,
and a second disconnection module 409 configured to disconnect the bluetooth connection between the bluetooth master device and the bluetooth slave device when the non-response time calculated by the second calculation module 407 reaches a predetermined delay time.
In a possible implementation manner, still referring to fig. 5, the first sending module 401 is further configured to, when the non-response count value calculated by the second calculating module 407 does not reach the predetermined count threshold, sequentially send polling packets to the bluetooth slave devices according to a first time interval; or,
the first sending module 401 is further configured to, when the non-response time calculated by the second calculating module 407 reaches the predetermined delay time, sequentially send polling packets to the bluetooth slave device according to the first time interval.
In a possible implementation manner, still referring to fig. 5, the polling packet transmitting apparatus may further include: a third calculation module 410 and a second determination module 411.
A third calculation module 410 configured to multiply a duration indicated by the second time interval by a value of a second predetermined number, the second predetermined number being smaller than the first predetermined number, to obtain a predetermined duration;
the second determining module 411 is configured to determine, as the predetermined time, a time before and a predetermined time from the next feedback time.
In summary, the polling packet transmitting apparatus provided in the embodiment of the present disclosure transmits the polling packet to the bluetooth slave device according to the first time interval with a longer interval duration when it is determined that the bluetooth device enters the predetermined mode, and resumes the second time interval at the response time close to the response time indicated by the predetermined response period, so as to transmit the polling packet to the bluetooth slave device; because the polling data packet can be sent by using the first time interval with larger interval duration between two adjacent response moments, and the polling data packet is sent according to the second time interval with smaller interval duration when the response moments are close, the problems that the power consumption of the user is increased due to frequent sending of too many useless polling data packets and the sending of the useless polling data packets occupies the antenna of the Bluetooth main equipment and other services cannot normally use the antenna when the polling data packet is sent by using the time interval with smaller interval duration all the time are solved; the effects of reducing the power consumption of the Bluetooth master device when sending the polling data packet and reducing the occupation of the antenna caused by sending useless polling data packets are achieved.
It should be added that each module in fig. 4 and fig. 5 is only an exemplary limitation, and in practical applications, the modules may also be combined or split, and the embodiment of the present disclosure does not limit the dividing manner of the modules.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An exemplary embodiment of the present disclosure provides a polling packet transmitting apparatus, which can implement the polling packet transmitting method provided by the present disclosure, and the polling packet transmitting apparatus is applied to a bluetooth master device, and the polling packet transmitting apparatus includes: a processor, a memory for storing processor-executable instructions;
wherein the processor is configured to:
after determining that the Bluetooth slave equipment enters a preset mode, sequentially sending polling data packets to the Bluetooth slave equipment according to a first time interval;
at a preset time before the next response time indicated by a preset response period, sequentially sending a first preset polling data packet to the Bluetooth slave equipment according to a second time interval, wherein the time length required for sending the first preset polling data packet is longer than the time length from the preset time to the next response time, and the time length indicated by the first time interval is longer than the time length indicated by the second time interval;
and the Bluetooth slave device entering the preset mode sends a response data packet to the Bluetooth master device according to the received polling data packet at the response time indicated by the preset response period.
Fig. 6 is a block diagram illustrating an apparatus for transmitting polling packets in accordance with an example embodiment. For example, the apparatus 600 may be a bluetooth enabled mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, apparatus 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input/output (I/O) interface 612, a sensor component 614, and a communication component 616.
The processing component 602 generally controls overall operation of the device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 602 may include one or more processors 618 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operations at the apparatus 600. Examples of such data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power supply component 606 provides power to the various components of device 600. The power components 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 600.
The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 600 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 610 is configured to output and/or input audio signals. For example, audio component 610 includes a Microphone (MIC) configured to receive external audio signals when apparatus 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 614 includes one or more sensors for providing status assessment of various aspects of the apparatus 600. For example, the sensor component 614 may detect an open/closed state of the device 600, the relative positioning of the components, such as a display and keypad of the device 600, the sensor component 614 may also detect a change in position of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, orientation or acceleration/deceleration of the device 600, and a change in temperature of the device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communications between the apparatus 600 and other devices in a wired or wireless manner. The apparatus 600 may access a wireless network based on a communication standard, such as Wi-Fi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described polling packet transmission method.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 604 comprising instructions, executable by the processor 618 of the apparatus 600 to perform the above-described polling packet transmission method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (11)
1. A polling packet transmitting method, applied to a bluetooth master device that establishes a bluetooth connection with a bluetooth slave device, comprising:
receiving a mode notification sent by the Bluetooth slave device and used for instructing the Bluetooth slave device to enter a preset mode, wherein the mode notification comprises a first time interval, a second time interval and parameters used for calculating a preset response period;
calculating the product of the value of the parameter and the duration indicated by the first time interval to obtain the preset response period;
sequentially sending polling data packets to the Bluetooth slave equipment according to the second time interval;
if a response data packet fed back by the Bluetooth slave equipment is received at the next response time indicated by the preset response period, determining that the Bluetooth slave equipment enters the preset mode, and sequentially sending polling data packets to the Bluetooth slave equipment according to the first time interval;
at a preset time before a next response time indicated by the preset response period, sequentially sending a first preset polling data packet to the Bluetooth slave equipment according to the second time interval, wherein the time length required for sending the first preset polling data packet is longer than the time length from the preset time to the next response time, and the time length indicated by the first time interval is longer than the time length indicated by the second time interval;
and the Bluetooth slave equipment entering the preset mode sends a response data packet to the Bluetooth master equipment according to the received polling data packet at the response time indicated by the preset response period.
2. The method of claim 1, further comprising:
after the first preset polling data packets are sequentially sent to the Bluetooth slave equipment, if a response data packet fed back by the Bluetooth slave equipment when the first preset polling data packet is received is not received, accumulating a preset unresponse count value, wherein the unresponse count value is used for indicating the number of times that the response data packet fed back by the Bluetooth slave equipment is not received at the feedback moment after the Bluetooth slave equipment is determined to enter the preset mode; or accumulating preset non-response time length, wherein the non-response time length is used for indicating the time length of not receiving the response data packet fed back by the Bluetooth slave device after the Bluetooth slave device is determined to enter the preset mode.
3. The method of claim 2, further comprising:
if the unresponsive count value reaches a preset count threshold value, disconnecting the Bluetooth connection between the Bluetooth master device and the Bluetooth slave device; or,
and if the unresponsive time reaches the preset delay time, disconnecting the Bluetooth connection between the Bluetooth master device and the Bluetooth slave device.
4. The method of claim 2, further comprising:
if the unresponsive count value does not reach a preset count threshold value, continuing to execute the step of sequentially sending polling data packets to the Bluetooth slave equipment according to the first time interval; or,
and if the unresponsive time length reaches the preset delay time length, continuously executing the step of sequentially sending polling data packets to the Bluetooth slave equipment according to the first time interval.
5. The method according to any one of claims 1 to 4, further comprising:
multiplying the duration indicated by the second time interval by a second preset value to obtain a preset duration, wherein the second preset value is smaller than the first preset value;
and determining the time which is before the next feedback time and is the preset time away from the next feedback time as the preset time.
6. A polling packet transmitting apparatus for use in a bluetooth master device that establishes a bluetooth connection with a bluetooth slave device, the apparatus comprising:
the first sending module is configured to send polling data packets to the Bluetooth slave equipment in sequence according to a first time interval after the Bluetooth slave equipment is determined to enter a preset mode;
a second sending module, configured to send a first predetermined number of polling packets to the bluetooth slave device in sequence according to a second time interval at a predetermined time before a next response time indicated by a predetermined response period, where a time length required for sending the first predetermined number of polling packets is longer than a time length from the predetermined time to the next response time, and a time length indicated by the first time interval is longer than a time length indicated by the second time interval;
the Bluetooth slave device entering the preset mode sends a response data packet to the Bluetooth master device according to the received polling data packet at the response time indicated by the preset response period;
the device further comprises:
a receiving module configured to receive a mode notification sent by the bluetooth slave device for instructing the bluetooth slave device to enter the predetermined mode, wherein the mode notification includes the first time interval, the second time interval and a parameter for calculating the predetermined response period;
a first calculation module configured to calculate a product of the value of the parameter and a duration indicated by the first time interval, resulting in the predetermined response period;
a third sending module configured to send polling packets to the bluetooth slave device in sequence according to the second time interval;
a first determining module configured to determine that the bluetooth slave device enters the predetermined mode when a response packet fed back by the bluetooth slave device is received at a next response time indicated by the predetermined response period calculated by the first calculating module.
7. The apparatus of claim 6, further comprising:
a second calculating module, configured to, after the second sending module sequentially sends the first predetermined number of polling packets to the bluetooth slave device, if a response packet fed back by the bluetooth slave device when receiving the first predetermined number of polling packets is not received, accumulate a predetermined non-response count value, where the non-response count value is used to indicate a number of times that no response packet fed back by the bluetooth slave device is received at a feedback time after it is determined that the bluetooth slave device enters the predetermined mode; or accumulating preset non-response time length, wherein the non-response time length is used for indicating the time length of not receiving the response data packet fed back by the Bluetooth slave device after the Bluetooth slave device is determined to enter the preset mode.
8. The apparatus of claim 7, further comprising:
a first disconnection module configured to disconnect a bluetooth connection between the bluetooth master device and the bluetooth slave device when the unresponsive count value calculated by the second calculation module reaches a predetermined count threshold; or,
and the second disconnection module is configured to disconnect the Bluetooth connection between the Bluetooth master device and the Bluetooth slave device when the unresponsive time length calculated by the second calculation module reaches a preset delay time length.
9. The apparatus of claim 7, further comprising:
the first sending module is further configured to send polling data packets to the bluetooth slave device in sequence according to the first time interval when the unresponsive count value calculated by the second calculating module does not reach a predetermined count threshold value; or,
the first sending module is further configured to send polling packets to the bluetooth slave device in sequence according to the first time interval when the unresponsive time length calculated by the second calculating module reaches the predetermined delay time length.
10. The apparatus of any of claims 6 to 9, further comprising:
a third calculation module configured to multiply a duration indicated by the second time interval by a value of a second predetermined number, the second predetermined number being smaller than the first predetermined number, to obtain a predetermined duration;
a second determination module configured to determine a time before and the predetermined length of time from a next feedback time as the predetermined time.
11. A polling packet transmitting apparatus for use in a bluetooth master device that establishes a bluetooth connection with a bluetooth slave device, the apparatus comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to:
receiving a mode notification sent by the Bluetooth slave device and used for instructing the Bluetooth slave device to enter a preset mode, wherein the mode notification comprises a first time interval, a second time interval and parameters used for calculating a preset response period;
calculating the product of the value of the parameter and the duration indicated by the first time interval to obtain the preset response period;
sequentially sending polling data packets to the Bluetooth slave equipment according to the second time interval;
if a response data packet fed back by the Bluetooth slave equipment is received at the next response time indicated by the preset response period, determining that the Bluetooth slave equipment enters the preset mode, and sequentially sending polling data packets to the Bluetooth slave equipment according to the first time interval;
at a preset time before a next response time indicated by the preset response period, sequentially sending a first preset polling data packet to the Bluetooth slave equipment according to the second time interval, wherein the time length required for sending the first preset polling data packet is longer than the time length from the preset time to the next response time, and the time length indicated by the first time interval is longer than the time length indicated by the second time interval;
and the Bluetooth slave equipment entering the preset mode sends a response data packet to the Bluetooth master equipment according to the received polling data packet at the response time indicated by the preset response period.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510354327.3A CN105099526B (en) | 2015-06-24 | 2015-06-24 | Polling data packet transmission method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510354327.3A CN105099526B (en) | 2015-06-24 | 2015-06-24 | Polling data packet transmission method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105099526A CN105099526A (en) | 2015-11-25 |
CN105099526B true CN105099526B (en) | 2017-12-12 |
Family
ID=54579209
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510354327.3A Active CN105099526B (en) | 2015-06-24 | 2015-06-24 | Polling data packet transmission method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105099526B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021120671A1 (en) * | 2019-12-20 | 2021-06-24 | 上海交通大学 | Para-virtualized i/o system and method based on request response |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105677320B (en) * | 2015-12-28 | 2019-06-21 | 小米科技有限责任公司 | A kind of method and apparatus that waiting time is set |
CN107087254B (en) * | 2017-06-30 | 2020-01-14 | 北京小米移动软件有限公司 | Packet sending method and device and Bluetooth low-energy-consumption slave device |
CN107509160B (en) * | 2017-08-18 | 2021-04-30 | 深圳创维数字技术有限公司 | Data transmission method, electronic device, and storage medium |
US11157058B2 (en) * | 2019-05-29 | 2021-10-26 | Motorola Mobility Llc | Setting polling interval of open/closed position sensor for a movable portion of an electronic device based on activity state of the electronic device |
CN112055342B (en) * | 2019-08-30 | 2021-09-24 | 合肥炬芯智能科技有限公司 | Connection-based Bluetooth communication method, system and main equipment |
CN112040063A (en) * | 2020-09-08 | 2020-12-04 | 广州市埃特斯通讯设备有限公司 | Bluetooth data information transmission method between mobile phone and OBU |
CN112333674B (en) * | 2020-10-30 | 2022-06-24 | 展讯半导体(成都)有限公司 | Data transmission method, device and equipment |
CN113206687B (en) * | 2020-12-31 | 2022-05-17 | 珠海市杰理科技股份有限公司 | Bluetooth communication method, Bluetooth slave device, Bluetooth communication system, and storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20030071041A (en) * | 2002-02-27 | 2003-09-03 | 엘지이노텍 주식회사 | Apparatus for transmitting and playing of mp3 data use of bluetooth |
CN101917480A (en) * | 2010-08-19 | 2010-12-15 | 中兴通讯股份有限公司 | Information transmission method and system for a plurality of Bluetooth equipments |
US8744355B2 (en) * | 2011-08-14 | 2014-06-03 | Mediatek Inc. | Communication method, and bluetooth device utilizing the communication method |
-
2015
- 2015-06-24 CN CN201510354327.3A patent/CN105099526B/en active Active
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021120671A1 (en) * | 2019-12-20 | 2021-06-24 | 上海交通大学 | Para-virtualized i/o system and method based on request response |
Also Published As
Publication number | Publication date |
---|---|
CN105099526A (en) | 2015-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105099526B (en) | Polling data packet transmission method and device | |
CN106604376B (en) | Channel monitoring control method, device and user terminal | |
US10063760B2 (en) | Photographing control methods and devices | |
US20230059900A1 (en) | Transmitting method and device and receiving method and device | |
US20200077362A1 (en) | Paging method and apparatus | |
US11968665B2 (en) | Resource configuration methods and apparatuses | |
CN109496445B (en) | Discontinuous reception configuration method and device | |
US11924758B2 (en) | Wake-up method, wake-up apparatus, electronic device, and computer-readable storage medium | |
CN106357910A (en) | Terminal working mode switching method and device | |
CN105578391B (en) | Information processing method, device and system and terminal equipment | |
EP3048508A1 (en) | Methods, apparatuses and devices for transmitting data | |
CN110875769A (en) | Wireless communication device and antenna switching method | |
EP3565374A1 (en) | Region configuration method and device | |
EP3889957A1 (en) | Method and apparatus for controlling intelligent voice control device and storage medium | |
CN105099644B (en) | Half-duplex communication method and related device | |
CN108347718B (en) | Method, device and storage medium for monitoring communication packet | |
CN105163391A (en) | Data transmission method, terminal and wireless access point | |
EP4376514A1 (en) | Paging monitoring method, paging monitoring apparatus, and storage medium | |
US20220070863A1 (en) | Carrier configuration method and device | |
CN107087254B (en) | Packet sending method and device and Bluetooth low-energy-consumption slave device | |
CN106507505B (en) | Disconnection method and device for low-power-consumption Bluetooth connection | |
US11265924B2 (en) | Method and device for data transmission | |
CN109891948B (en) | Method and device for detecting downlink transmission, transmission configuration information and downlink transmission | |
CN115136677B (en) | Method, device, equipment and medium for sending paging advance notice indication | |
CN108401538B (en) | Downlink data transmission method and device, user equipment and base station |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |