CN113096373A - Remote controller, controlled equipment and method for realizing packet control based on Bluetooth broadcast packet - Google Patents
Remote controller, controlled equipment and method for realizing packet control based on Bluetooth broadcast packet Download PDFInfo
- Publication number
- CN113096373A CN113096373A CN202110286151.8A CN202110286151A CN113096373A CN 113096373 A CN113096373 A CN 113096373A CN 202110286151 A CN202110286151 A CN 202110286151A CN 113096373 A CN113096373 A CN 113096373A
- Authority
- CN
- China
- Prior art keywords
- packet
- bluetooth broadcast
- remote controller
- broadcast packet
- grouping
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 17
- 238000012544 monitoring process Methods 0.000 claims abstract description 21
- 230000009471 action Effects 0.000 claims abstract description 8
- 238000012545 processing Methods 0.000 claims description 44
- 230000005540 biological transmission Effects 0.000 abstract description 4
- 230000008569 process Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G08—SIGNALLING
- G08C—TRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
- G08C17/00—Arrangements for transmitting signals characterised by the use of a wireless electrical link
- G08C17/02—Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/06—Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
Abstract
The invention discloses a remote controller, controlled equipment and a method for realizing packet control based on a Bluetooth broadcast packet, wherein the method comprises the following steps: step S1, monitoring whether the remote controller has a key pressed; step S2, when it is monitored that the grouping key is pressed, if the continuous pressing time exceeds the grouping setting time threshold, the remote controller ID, the grouping identification and the grouping number are filled in the Bluetooth broadcast packet for transmission; if the continuous pressing time accords with the short pressing time threshold, filling the remote controller ID, the control identification and the grouping number into a Bluetooth broadcast packet for transmission; step S3, the controlled device receives and analyzes the broadcast packet; step S4, when judging that the broadcast packet contains the grouping identification, judging whether the receiving time exceeds the grouping limited time threshold value, if not, acquiring and recording the ID and the grouping number of the remote controller; and when the broadcast packet is judged to contain the control identifier, judging whether the ID and the group number of the remote controller in the broadcast packet are consistent with those stored by the equipment, and if so, executing related actions according to the control identifier.
Description
Technical Field
The invention relates to the technical field of Bluetooth, in particular to a remote controller, controlled equipment and a method for realizing packet control based on a Bluetooth broadcast packet.
Background
With the development of technology, control over many devices can be controlled through a remote controller, for example, a smart television, a wireless mouse, various players, a smart lamp, and the like, and a variety of remote controllers on the market also appear, such as infrared remote controller control, RF remote controller control, bluetooth remote controller control, and the like.
The remote controller is a wireless transmitting device, the key information is coded by a modern digital coding technology and is transmitted to a receiving end by infrared rays or other wireless signals, the receiving end converts the received infrared signals or wireless signals into electric signals, the electric signals are decoded by a processor, and corresponding instructions are demodulated to achieve the purpose of controlling related equipment to finish required operation requirements.
The existing one-way remote controllers are infrared remote controllers, RF remote controllers and the like; the RF remote controller is divided into frequency bands of 315MHz, 433MHz, 2.4GHz and the like. The 2.4GHz frequency band remote controller is also divided into a remote controller with a private protocol, a remote controller based on a Bluetooth broadcast packet and the like; the one-way remote controller based on the Bluetooth broadcast packet can only send signals in one way and cannot establish Bluetooth connection.
Along with the development of remote controllers, the functions are more and more, from the beginning of the integral control of one remote controller to the later, one remote controller is required to be controlled in a grouping way, a plurality of groups are controlled by a single remote controller, when a target group is remotely controlled, other groups are not influenced, the function greatly enriches the application scene, and the use is more convenient.
However, the existing one-way remote controller based on the bluetooth broadcast packet can only control all controlled devices by one remote controller, and cannot perform group control, so that under the condition of multiple places, one remote controller cannot be used for regional control, for example, one remote controller cannot be used for separate room control in one household, and the use is extremely inconvenient.
Disclosure of Invention
In order to overcome the defects in the prior art, the present invention provides a remote controller, a controlled device and a method for implementing packet control based on a bluetooth broadcast packet, so as to implement packet control of a unidirectional remote controller based on a bluetooth broadcast packet.
To achieve the above and other objects, the present invention provides a remote controller for implementing packet control based on a bluetooth broadcast packet, wherein packet keys are provided thereon, comprising:
the key monitoring unit is used for monitoring whether a key of the remote controller is pressed down;
the group setting processing unit is used for judging whether the continuous pressing time of the group key exceeds a preset group setting time threshold value or not when the key monitoring unit monitors that the group key is pressed down, and filling a Bluetooth broadcast packet with a remote controller ID, a group identifier and a group number and sending the Bluetooth broadcast packet in the form of the Bluetooth broadcast packet when the continuous pressing time of the group key exceeds the preset group setting time threshold value;
and the control processing unit is used for filling the remote controller ID, the control identification and the grouping number into the Bluetooth broadcast packet and sending the Bluetooth broadcast packet in the form of the Bluetooth broadcast packet when the key monitoring unit monitors that the grouping key is pressed down and judges that the continuous pressing time of the grouping key meets a preset short pressing time threshold value.
Preferably, the packet setting processing unit fills the remote controller ID, the packet identifier, and the packet number in the bluetooth broadcast packet and transmits the packet in the form of the bluetooth broadcast packet when the duration of pressing the packet key exceeds a preset packet setting time threshold, and then continuously determines whether the packet key is kept in a pressed state, and if so, re-transmits the bluetooth broadcast packet including the remote controller ID, the packet identifier, and the packet number.
Preferably, when the duration of the group key exceeds a preset group setting time threshold, the group setting processing unit changes the key identifier from a short-press identifier to a long-press group identifier, and fills the long-press group identifier, the remote controller ID and the group number into the bluetooth broadcast packet to be transmitted.
Preferably, the group identifier is a key or a specifically defined identifier for a group, and the control identifier is a key or a specifically defined identifier for implementing a control function.
Preferably, when the key monitoring unit monitors that the control key is pressed, the control processing unit acquires the ID of the remote controller, the control identifier and the packet number of the packet key operated last time, fills the packet in the bluetooth broadcast packet, and sends the packet.
Preferably, the control processing unit transmits a bluetooth broadcast packet including a remote controller ID, a control identification, and a packet number once or several times.
In order to achieve the above object, the present invention further provides a controlled device for implementing packet control based on a bluetooth broadcast packet, including:
the Bluetooth broadcast packet analyzing unit is used for analyzing the Bluetooth broadcast packet when the Bluetooth broadcast packet is received;
the packet identifier processing unit is used for judging whether the receiving time of the Bluetooth broadcast packet exceeds a preset packet limited time threshold value or not when judging that the Bluetooth broadcast packet contains the packet identifier according to the analyzed Bluetooth broadcast packet, and if not, acquiring and recording the ID and the packet number of the remote controller according to the Bluetooth broadcast packet;
and the control identifier processing unit is used for judging whether the remote controller ID and the group number in the Bluetooth broadcast packet are consistent with the remote controller ID and the group number stored in the controlled equipment or not when judging that the Bluetooth broadcast packet contains the control identifier according to the analyzed Bluetooth broadcast packet, and executing related actions according to the control identifier if the remote controller ID and the group number are consistent.
Preferably, the packet identifier processing unit determines whether the number of times of receiving the packet bluetooth broadcast packet is greater than or equal to a threshold of the number of bluetooth broadcast packets of a preset successful packet within the packet limited time threshold, and if so, determines that the packet is successful, and stores the remote controller ID and the packet number for determining whether the subsequently received broadcast packet is legal.
Preferably, the controlled device further includes another identifier processing unit, configured to perform another identifier processing on the bluetooth broadcast packet when determining, according to the parsed bluetooth broadcast packet, that the bluetooth broadcast packet does not include the packet identifier or the control identifier.
In order to achieve the above object, the present invention further provides a method for implementing packet control based on bluetooth broadcast packet, comprising the following steps:
step S1, monitoring whether the remote controller has a key pressed;
step S2, when it is monitored that the grouping key is pressed, if the continuous pressing time of the grouping key exceeds the preset grouping setting time threshold, the remote controller ID, the grouping identification and the grouping number are filled into the Bluetooth broadcast packet and sent out in the form of the Bluetooth broadcast packet; if the continuous pressing time of the grouping key accords with a preset short pressing time threshold, filling the remote controller ID, the control identification and the grouping number into a Bluetooth broadcast packet and sending out the Bluetooth broadcast packet in a form of the Bluetooth broadcast packet;
step S3, when the controlled device receives the Bluetooth broadcast packet, the controlled device analyzes the Bluetooth broadcast packet;
step S4, when the controlled device judges that the Bluetooth broadcast packet contains the packet identifier according to the analyzed Bluetooth broadcast packet, judging whether the receiving time exceeds the preset packet limit time threshold value, if not, acquiring and recording the ID and the packet number of the remote controller according to the Bluetooth broadcast packet; when the controlled equipment judges that the Bluetooth broadcast packet contains the control identification according to the analyzed Bluetooth broadcast packet, whether the remote controller ID and the group number in the Bluetooth broadcast packet are consistent with the remote controller ID and the group number stored in the controlled equipment is judged, and if so, relevant actions are executed according to the control identification.
Compared with the prior art, the remote controller, the controlled equipment and the method for realizing the grouping control based on the Bluetooth broadcast packet can effectively prevent the controlled equipment from being interfered to cause the grouping error by limiting the controlled equipment to be executed within a certain time when being electrified, simultaneously change the key identification from the short-press identification to the long-press grouping identification by pressing the grouping key to a time threshold value for setting the grouping, continuously send the Bluetooth broadcast packet containing the remote controller ID, the grouping identification and the grouping number in the mode of the Bluetooth broadcast packet under the condition of continuously pressing the grouping key, prevent the false triggering of the short-press grouping, and continuously send the Bluetooth broadcast packet after the remote controller triggers the grouping, the controlled equipment can complete the grouping only by detecting the Bluetooth broadcast packet containing the grouping identification a small number of times, can ensure the reliability of the grouping setting, and each time the control command sent by the remote controller contains the remote controller ID and the grouping number after the grouping is completed, the controlled device only responds to the stored remote controller ID and the packet number, and the purpose of realizing packet control by a single remote controller is realized.
Drawings
Fig. 1 is a system architecture diagram of a remote controller implementing packet control based on bluetooth broadcast packets according to the present invention;
fig. 2 is a system architecture diagram of a controlled device implementing packet control based on bluetooth broadcast packets according to the present invention;
FIG. 3 is a flowchart illustrating steps of a method for implementing packet control based on Bluetooth broadcast packets according to the present invention;
FIG. 4 is a flowchart illustrating the grouping operation of remote controllers according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating the operation of the controlled device detecting the remote control signal according to the embodiment of the present invention;
fig. 6 is a flowchart of the remote control processing flow of the controlled device according to the embodiment of the present invention.
Detailed Description
Other advantages and capabilities of the present invention will be readily apparent to those skilled in the art from the present disclosure by describing the embodiments of the present invention with specific embodiments thereof in conjunction with the accompanying drawings. The invention is capable of other and different embodiments and its several details are capable of modification in various other respects, all without departing from the spirit and scope of the present invention.
Before describing the present invention, several concepts to which the invention relates are defined:
packet definition time threshold: the controlled equipment can accept grouping setting within a plurality of time after being electrified, and does not accept grouping application if the time exceeds the time, and the time defines a time threshold value for grouping;
grouping setting time threshold: when the remote controller carries out grouping, a grouping key is pressed for a plurality of times to send a Bluetooth broadcast packet containing a grouping identifier, and a time threshold value is set for the grouping at the time;
short-time threshold: the remote controller is used for determining whether to carry out a control function according to the short-press time threshold value;
number threshold of successfully grouped bluetooth broadcast packets: and judging the number of the received Bluetooth broadcast packets containing the packet identifiers required by the packet success.
Fig. 1 is a system architecture diagram of a remote controller implementing packet control based on bluetooth broadcast packets according to the present invention. As shown in fig. 1, the present invention provides a remote controller for implementing packet control based on bluetooth broadcast packet, wherein a packet key is provided thereon, comprising:
and a key monitoring unit 101 for monitoring whether a key of the remote controller is pressed.
In the present invention, the remote controller is a bluetooth broadcast remote controller, that is, a remote controller that includes a bluetooth chip or an RF chip and transmits a bluetooth broadcast packet in a bluetooth broadcast manner, and a grouping key is provided thereon, where the grouping key may be a single key or a grouping key that is a combination of a plurality of keys, and when a user presses the grouping key on the remote controller, the key monitoring unit 101 monitors that the grouping key is pressed.
And the group setting processing unit 102 is configured to, when the key monitoring unit 101 monitors that the group key is pressed, determine whether the duration time of pressing the group key exceeds a preset group setting time threshold, and fill the bluetooth broadcast packet with the remote controller ID, the group identifier, and the group number when the duration time of pressing the group key exceeds the preset group setting time, and send the bluetooth broadcast packet in the form of the bluetooth broadcast packet.
That is, a group setting time threshold is preset in the system of the remote controller, when a user presses a group key, a short pressing identifier is generated, when the user continuously presses the group key and the continuous pressing time exceeds the preset group setting time threshold, the short pressing identifier is changed into a long pressing group identifier, the remote controller ID is obtained, the remote controller ID, the group identifier and the group number are filled in a bluetooth broadcast packet and sent out in the form of a bluetooth broadcast packet, the group number is a number for distinguishing different groups, the group number is preset and corresponds to the group key, the group number is different according to different representative groups, the group number comprises a full control group number and a common group number, all controlled devices can be controlled by using the full control group number, for example, the group keys 1, 2, 3, 4 are set on the remote controller, and correspond to the group numbers 1, 2, and 3, FF (wherein FF represents a full control packet number), when the continuous pressing time of the long-pressing packet key 1 exceeds a preset packet setting time threshold value, filling a remote controller ID, a packet identifier and a packet number 1 corresponding to the packet key 1 into a Bluetooth broadcast packet to be sent out, wherein the packet identifier can be a key value or a specially defined identifier for a packet, and the Bluetooth broadcast packet is a command sent according to a specified format in a Bluetooth broadcast mode.
Preferably, the packet setting processing unit 102 continuously transmits the bluetooth broadcast packets containing the remote controller ID, the packet identification, and the packet number in a case where the packet key is continuously pressed, so that the controlled device determines the completion of the packet by counting the number of the bluetooth broadcast packets. Specifically, the packet setting processing unit 102 fills the bluetooth broadcast packet with the remote controller ID, the packet identifier, and the packet number when the duration time of the packet key exceeds the preset packet setting time, and sends out the packet in the form of the bluetooth broadcast packet, and then continuously determines whether the packet key is kept pressed, if so, sends the bluetooth broadcast packet containing the remote controller ID, the packet identifier, and the packet number again, and if not, returns to the key monitoring unit 101 to continuously monitor whether the key is pressed.
Therefore, the invention can prevent the false triggering of the short-press grouping by using different marks for the short-press and the long-press of the grouping key, the remote controller only sends the Bluetooth broadcast packet when the long-press time exceeds the preset grouping setting time, and the controlled equipment does not count the quantity of the Bluetooth broadcast packet in the long-press process.
And the control processing unit 103 is configured to, when the key monitoring unit 101 monitors that the group key is pressed and determines that the duration time of pressing the group key meets a preset short press time threshold, fill the remote controller ID, the control identifier, and the group number in the bluetooth broadcast packet and send the bluetooth broadcast packet.
Similarly, a short press time threshold is preset in the system of the remote controller, when the user presses the group key and the group key is released, the time for the user to continuously press the group key (namely, the time for the user to continuously press the group key) is monitored, whether the time is within the preset short press time is judged, if yes, the group key is used as a control key currently, a corresponding control identifier is generated, the remote controller ID is obtained, the remote controller ID, the control identifier and the group number are filled into a bluetooth broadcast packet and sent out in the form of the bluetooth broadcast packet, and the control identifier refers to an identifier for performing conventional control and can be a key value or a specially defined identifier for realizing a control function. That is, in the present invention, each grouping key can be used as both a grouping setting and a control key, and when a long-time pressing of the grouping key exceeds a preset grouping setting time, the grouping setting is performed, and when the time of pressing the grouping key is within a preset short-time, the control function thereof is used.
Preferably, the control processing unit 103 may send a bluetooth broadcast packet containing a remote controller ID, a control identifier, and a packet number a single time or several times, and when the sending is completed, the control processing unit returns to the key monitoring unit 101 to continue waiting and detecting the key.
Preferably, when the key monitoring unit 101 monitors that the control key is pressed, the remote controller ID, the control identifier, and the packet number of the packet key that was operated last time are acquired and filled in the bluetooth broadcast packet to be sent out. That is, the remote controller is provided with control keys in addition to the group key, and the control keys are set as the control keys of the corresponding group following the group number of the group key operated last time.
Fig. 2 is a system architecture diagram of a controlled device for implementing packet control based on bluetooth broadcast packets according to the present invention. As shown in fig. 2, a controlled device for implementing packet control based on bluetooth broadcast packet of the present invention includes:
a bluetooth broadcast packet parsing unit 201, configured to parse the bluetooth broadcast packet when the bluetooth broadcast packet is received.
Specifically, the controlled device is a device that can parse the bluetooth broadcast packet and needs a remote controller for control. When the controlled equipment is powered on, various initialized parameters are started, the Bluetooth broadcast packet scanning is started, when the Bluetooth broadcast signals are scanned, the Bluetooth broadcast packets are obtained and analyzed, and if the Bluetooth broadcast signals are not scanned, the Bluetooth broadcast packets are continuously scanned.
And the packet identifier processing unit 202 is configured to, when determining that the bluetooth broadcast packet includes a packet identifier according to the parsed bluetooth broadcast packet, determine whether the receiving time of the bluetooth broadcast packet exceeds a preset packet limit time threshold, and if not, acquire and record a remote controller ID and a packet number according to the bluetooth broadcast packet.
That is, a packet-limited time threshold for setting a time when the controlled device can accept the packet setting after being powered on is preset in the controlled device system, that is, the packet setting can be accepted only within the time, and the packet application is not accepted beyond the time. And when the Bluetooth broadcast packet is judged to contain the packet identifier according to the analyzed Bluetooth broadcast packet, judging whether the time for receiving the Bluetooth broadcast packet exceeds the preset packet limited time threshold, if not, accepting the packet setting, and acquiring and recording the ID and the packet number of the remote controller according to the analyzed Bluetooth broadcast packet.
The invention can effectively prevent the controlled equipment from being interfered to cause error grouping by limiting the controlled equipment to be executed in a certain time of power-on.
Preferably, the packet identifier processing unit 202 continuously receives bluetooth broadcast packets, determines whether the number of times of receiving the packet bluetooth broadcast packets is greater than or equal to a threshold of the number of bluetooth broadcast packets of a preset successful packet within the packet limited time threshold, and if so, determines that the packet is successful, and stores the remote ID and the packet number for determining whether the subsequently received broadcast packet is legal, that is, the controlled device will respond only when the remote ID and the packet number in the transmitted bluetooth broadcast packet are both consistent with the stored information.
Therefore, the invention continuously sends the Bluetooth broadcast packets after the remote controller triggers the packets, the controlled equipment can complete the packets only by detecting the Bluetooth broadcast packets containing the packet identifiers for a few times, and the reliability of the packet setting can be ensured.
And the control identifier processing unit 203 is configured to, when determining that the bluetooth broadcast packet includes the control identifier according to the parsed bluetooth broadcast packet, determine whether the remote controller ID and the packet number in the bluetooth broadcast packet are consistent with the remote controller ID and the packet number stored in the controlled device, and if so, execute a related action according to the control identifier.
Preferably, the controlled device further includes another identifier processing unit, configured to perform, when it is determined that the bluetooth broadcast packet does not include the packet identifier or the control identifier according to the parsed bluetooth broadcast packet, other identifier processing such as a unbinding identifier on the bluetooth broadcast packet, which is not described herein again.
Fig. 3 is a flowchart illustrating steps of a method for implementing packet control based on bluetooth broadcast packets according to the present invention. As shown in fig. 3, the method for implementing packet control based on bluetooth broadcast packet of the present invention includes the following steps:
step S1, it is monitored whether the remote controller has a key pressed.
In the invention, the remote controller is a Bluetooth broadcast remote controller, namely a remote controller which contains a Bluetooth chip or an RF chip and sends a Bluetooth broadcast packet in a Bluetooth broadcast mode, a grouping key is arranged on the remote controller, the grouping key can be a single key, and also comprises a plurality of key combinations which are grouped keys, and when a user presses the grouping key on the remote controller, the pressing of the grouping key is monitored.
Step S2, when it is monitored that the grouping key is pressed, if the continuous pressing time of the grouping key exceeds the preset grouping setting time threshold, the remote controller ID, the grouping identification and the grouping number are filled in the Bluetooth broadcast packet and sent out in the form of the Bluetooth broadcast packet, if the continuous pressing time of the grouping key accords with the preset short pressing time threshold, the remote controller ID, the control identification and the grouping number are filled in the Bluetooth broadcast packet and sent out in the form of the Bluetooth broadcast packet.
That is, a grouping setting time threshold value is preset in the system of the remote controller, when a user presses a grouping key, a short pressing identifier is generated, when the user continuously presses the grouping key and the continuous pressing time exceeds the preset grouping setting time threshold value, the short pressing identifier is changed into a long pressing grouping identifier, the ID of the remote controller is obtained, the ID of the remote controller, the grouping identifier and the grouping number are filled into a Bluetooth broadcast packet, and the Bluetooth broadcast packet is sent out in the form of the Bluetooth broadcast packet.
Preferably, in step S2, the bluetooth broadcast packets including the remote controller ID, the packet identification, and the packet number are continuously transmitted with the packet key being continuously pressed, so that the controlled device determines the completion of the packet by counting the number of the bluetooth broadcast packets. Specifically, after the duration time of the group key exceeds the preset group setting time, the remote controller ID, the group identifier, and the group number are filled in the bluetooth broadcast packet and transmitted in the form of the bluetooth broadcast packet, it is continuously determined whether the group key is kept pressed, if yes, the bluetooth broadcast packet including the remote controller ID, the group identifier, and the group number is transmitted again, and if not, the process returns to step S1 to continuously monitor whether the key is pressed.
Meanwhile, a short press time threshold value is preset in the system of the remote controller, when a user presses a grouping key and monitors that the time for the user to continuously press the grouping key (namely the time for the grouping key to be pressed and loosened) is within the preset short press time, a corresponding control identifier is generated, the ID of the remote controller is obtained, the ID of the remote controller, the control identifier and a grouping number are filled into a Bluetooth broadcast packet and are sent out in the form of the Bluetooth broadcast packet, and the control identifier refers to an identifier for carrying out conventional control and can be a key value or a specially defined identifier for realizing a control function.
Preferably, in step S2, the bluetooth broadcast packet including the remote ID, the control ID and the packet number may be transmitted once or several times, and the step S1 is returned to continue waiting and detecting the key after the transmission is completed.
Preferably, in step S2, if it is detected that the control key is pressed, the obtained remote ID, control identifier and packet number of the last packet key are filled in the bluetooth broadcast packet and sent out.
Step S3, when receiving the bluetooth broadcast packet, the controlled device parses the bluetooth broadcast packet.
Specifically, after the controlled device is powered on and various initialized parameters are started, scanning of the bluetooth broadcast packet is started, when the bluetooth broadcast signal is scanned, the bluetooth broadcast packet is obtained and analyzed, and if the bluetooth broadcast signal is not scanned, scanning is continued.
Step S4, when the controlled device judges that the Bluetooth broadcast packet contains the packet identifier according to the analyzed Bluetooth broadcast packet, judging whether the receiving time exceeds the preset packet limit time threshold value, if not, acquiring and recording the ID and the packet number of the remote controller according to the Bluetooth broadcast packet; when the controlled equipment judges that the Bluetooth broadcast packet contains the control identification according to the analyzed Bluetooth broadcast packet, whether the remote controller ID and the group number in the Bluetooth broadcast packet are consistent with the remote controller ID and the group number stored in the controlled equipment is judged, and if so, relevant actions are executed according to the control identification.
That is, a packet-limited time threshold for setting a time when the controlled device can accept the packet setting after being powered on is preset in the controlled device system, that is, the packet setting can be accepted only within the time, and the packet application is not accepted beyond the time. And when the Bluetooth broadcast packet is judged to contain the packet identifier according to the analyzed Bluetooth broadcast packet, judging whether the time for receiving the Bluetooth broadcast packet exceeds the preset packet limited time threshold, if not, receiving the packet setting, and acquiring and recording the ID and the packet number of the remote controller according to the analyzed Bluetooth broadcast packet.
The invention can effectively prevent the controlled equipment from being interfered to cause error grouping by limiting the controlled equipment to be executed in a certain time of power-on.
Preferably, the controlled device continuously receives the bluetooth broadcast packets, determines whether the number of times of receiving the grouped bluetooth broadcast packets is greater than or equal to a threshold of the number of bluetooth broadcast packets of a preset successful group within the group limited time threshold, and if so, determines that the grouping is successful, and stores the remote controller ID and the group number for determining whether the subsequently received broadcast packets are legal, that is, the controlled device will respond only when the remote controller ID and the group number in the transmitted bluetooth broadcast packets are consistent with the stored information.
Therefore, the invention continuously sends the Bluetooth broadcast packets after the remote controller triggers the packets, the controlled equipment can complete the packets only by detecting the Bluetooth broadcast packets containing the packet identifiers for a few times, and the reliability of the packet setting can be ensured.
Preferably, when the bluetooth broadcast packet is judged to contain neither the packet identifier nor the control identifier according to the parsed bluetooth broadcast packet, other identifier processing is performed on the bluetooth broadcast packet.
Examples
Fig. 4 is a flowchart of the remote controller grouping setting operation in the embodiment of the present invention. As shown in fig. 4, the work flow of the remote controller grouping setting is as follows:
step S401, electrifying the remote controller and starting working;
step S402, judging whether a key is pressed down, if not, continuing to detect, and if so, going to step S403;
step S403, judging whether the pressed key is a grouping key, if not, going to step S407, and if so, going to step S404;
step S404, judging whether the continuous pressing time exceeds the grouping setting time, if not, continuing to wait and detecting the key, and if so, going to step S405.
Step S405, the remote controller ID, the grouping identification and the grouping number are filled in a Bluetooth broadcast packet and transmitted, the related data is transmitted in the form of the Bluetooth broadcast packet, and the transmission is completed to S406.
Step S406, judging whether the pressing state is kept, if not, waiting for the pressing of the key again. If so, S405 is reached, and the bluetooth broadcast packet containing the relevant information is transmitted again.
Step S407, judging whether the pressed key is a control key, if not, continuing to wait and detecting the key, and if so, going to step S408;
step S408, judging whether the continuous pressing time accords with the short pressing time, if not, continuing to wait and detecting the key, and if so, going to step S409.
Step S409, the remote controller ID, the control identification and the packet number are filled in a Bluetooth broadcast packet and sent, relevant data are sent out in the form of the Bluetooth broadcast packet, at the moment, the data can be sent once or for a plurality of times, and the key is continuously waited and detected after the sending is finished.
Fig. 5 is a flowchart illustrating the operation of the controlled device detecting the signal of the remote control according to the embodiment of the present invention. In this embodiment, the workflow of the controlled device to detect the remote controller signal is as follows:
step S501, starting, generally, the controlled equipment is powered on and started;
step S502, starting Bluetooth scanning, initializing various parameters and starting Bluetooth broadcast packet scanning.
Step S503, judging whether the scanning has the Bluetooth broadcast signal, if not, continuing the scanning. If yes, the process goes to S504.
Step S504, the remote controller processing flow is called, and after the process is finished, the Bluetooth broadcast packet scanning is continued.
Fig. 6 is a flowchart of the remote control processing flow of the controlled device according to the embodiment of the present invention. In this embodiment, the working process of the remote controller processing flow of the controlled device is as follows:
step S601, the remote controller processing flow begins and is an entrance of the remote controller processing flow;
step S602, judging whether the Bluetooth broadcast packet contains a packet identifier, if not, going to step S604, and if so, going to step S603;
step S603, judging whether the grouping limit time is exceeded, if so, completing the calling in S606; if not, the step goes to S605;
step S604, judging whether the Bluetooth broadcast packet contains a control identifier, if not, going to S609, and if so, going to S607;
step S605, recording the remote controller ID and the packet number, and if the number of times of receiving the packet bluetooth broadcast packet is greater than or equal to the threshold of the number of successfully grouped bluetooth broadcast packets under the condition that the packet limit time is not exceeded, successfully grouping the packet, and storing the remote controller ID and the packet number for determining whether the later received broadcast packet is legal, and responding only if the remote controller ID and the packet number in the transmitted broadcast packet are consistent with the stored information.
And step S606, finishing the calling, exiting the calling program and waiting for the next calling.
Step S607, judging whether the remote controller ID and the group number in the transmitted Bluetooth broadcast packet are consistent with the remote controller ID and the group number stored in the controlled equipment, if not, going to step S606, completing the calling, and if yes, going to step S608;
step S608, according to the control identification operation, relevant actions are executed, and then S606 is executed;
and step S609, other identification processing is carried out, if the grouping identification and the control identification are not contained, other identification processing is carried out, and S606 is carried out after the other identification processing is finished.
It can be seen that the invention can effectively prevent the controlled device from being interfered to cause error grouping by limiting the controlled device to be executed in a certain time when being powered on, and simultaneously, the invention changes the key identification from short pressing identification to long pressing identification after the group key is pressed to the time threshold value of group setting, continuously sends the Bluetooth broadcast packet containing the remote controller ID, the group identification and the group number in the mode of the Bluetooth broadcast packet under the condition of continuously pressing the group key to prevent error triggering of the short pressing group, and completes grouping by continuously sending the Bluetooth broadcast packet after the group key is triggered, the controlled device only needs to detect the Bluetooth broadcast packet containing the group identification a few times, thereby ensuring the reliability of group setting, after completing grouping, the remote controller sends control commands each time and contains the remote controller ID and the group number, so that the controlled device only responds to the stored remote controller ID and the group number, the purpose of realizing grouping control by a single remote controller is realized.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Modifications and variations can be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the present invention. Therefore, the scope of the invention should be determined from the following claims.
Claims (10)
1. A remote controller for implementing packet control based on Bluetooth broadcast packet, on which a packet key is provided, comprising:
the key monitoring unit is used for monitoring whether a key of the remote controller is pressed down;
the group setting processing unit is used for judging whether the continuous pressing time of the group key exceeds a preset group setting time threshold value or not when the key monitoring unit monitors that the group key is pressed down, and filling a Bluetooth broadcast packet with a remote controller ID, a group identifier and a group number and sending the Bluetooth broadcast packet in the form of the Bluetooth broadcast packet when the continuous pressing time of the group key exceeds the preset group setting time threshold value;
and the control processing unit is used for filling the remote controller ID, the control identification and the grouping number into the Bluetooth broadcast packet and sending the Bluetooth broadcast packet in the form of the Bluetooth broadcast packet when the key monitoring unit monitors that the grouping key is pressed down and judges that the continuous pressing time of the grouping key meets a preset short pressing time threshold value.
2. The remote controller according to claim 1, wherein the packet setting processing unit continuously determines whether the packet key is kept pressed after the packet key is continuously pressed for a time longer than a preset packet setting time threshold value to fill the bluetooth broadcast packet with a remote controller ID, a packet identifier, and a packet number and transmits the packet in the form of the bluetooth broadcast packet, and re-transmits the bluetooth broadcast packet including the remote controller ID, the packet identifier, and the packet number if the packet key is continuously pressed.
3. The remote controller according to claim 2, wherein the remote controller implements packet control based on bluetooth broadcast packet, and comprises: when the continuous key pressing time of the grouping key exceeds a preset grouping setting time threshold value, the grouping setting processing unit changes the key identification from a short-press identification to a long-press grouping identification, and fills the long-press grouping identification, the remote controller ID and the grouping number into a Bluetooth broadcast packet to be sent out.
4. The remote controller according to claim 1, wherein the remote controller implements packet control based on bluetooth broadcast packet, and comprises: the group identification is a key value or a specially defined identification for the group, and the control identification is a key value or a specially defined identification for realizing the control function.
5. The remote controller according to claim 1, wherein the remote controller implements packet control based on bluetooth broadcast packet, and comprises: when the key monitoring unit monitors that the control key is pressed down, the control processing unit acquires the ID of the remote controller, the control identification and the packet number of the packet key operated last time, fills the packet in the Bluetooth broadcast packet and sends the packet.
6. The remote controller according to claim 1, wherein the remote controller implements packet control based on bluetooth broadcast packet, and comprises: the control processing unit sends a single time or a plurality of times to the Bluetooth broadcast packet containing the remote controller ID, the control identification and the packet number.
7. A controlled device for implementing packet control based on bluetooth broadcast packets, comprising:
the Bluetooth broadcast packet analyzing unit is used for analyzing the Bluetooth broadcast packet when the Bluetooth broadcast packet is received;
the packet identifier processing unit is used for judging whether the receiving time of the Bluetooth broadcast packet exceeds a preset packet limited time threshold value or not when judging that the Bluetooth broadcast packet contains the packet identifier according to the analyzed Bluetooth broadcast packet, and if not, acquiring and recording the ID and the packet number of the remote controller according to the Bluetooth broadcast packet;
and the control identifier processing unit is used for judging whether the remote controller ID and the group number in the Bluetooth broadcast packet are consistent with the remote controller ID and the group number stored in the controlled equipment or not when judging that the Bluetooth broadcast packet contains the control identifier according to the analyzed Bluetooth broadcast packet, and executing related actions according to the control identifier if the remote controller ID and the group number are consistent.
8. The controlled device according to claim 7, wherein the controlled device implements packet control based on bluetooth broadcast packet, and wherein: the grouping identification processing unit judges whether the times of receiving the grouping Bluetooth broadcast packets are greater than or equal to a Bluetooth broadcast packet quantity threshold of a preset successful grouping within the grouping limited time threshold, if so, the grouping success is judged, and the ID and the grouping number of the remote controller are stored for judging whether the subsequently received broadcast packets are legal.
9. The controlled device according to claim 8, wherein the controlled device implements packet control based on bluetooth broadcast packet, and wherein: the controlled device also comprises other identification processing units, and the other identification processing units are used for carrying out other identification processing on the Bluetooth broadcast packet when judging that the Bluetooth broadcast packet does not contain the grouping identification or the control identification according to the analyzed Bluetooth broadcast packet.
10. A method for realizing packet control based on Bluetooth broadcast packet includes the following steps:
step S1, monitoring whether the remote controller has a key pressed;
step S2, when it is monitored that the grouping key is pressed, if the continuous pressing time of the grouping key exceeds the preset grouping setting time threshold, the remote controller ID, the grouping identification and the grouping number are filled into the Bluetooth broadcast packet and sent out in the form of the Bluetooth broadcast packet; if the continuous pressing time of the grouping key accords with a preset short pressing time threshold, filling the remote controller ID, the control identification and the grouping number into a Bluetooth broadcast packet and sending out the Bluetooth broadcast packet in a form of the Bluetooth broadcast packet;
step S3, when the controlled device receives the Bluetooth broadcast packet, the controlled device analyzes the Bluetooth broadcast packet;
step S4, when the controlled device judges that the Bluetooth broadcast packet contains the packet identifier according to the analyzed Bluetooth broadcast packet, judging whether the receiving time exceeds the preset packet limit time threshold value, if not, acquiring and recording the ID and the packet number of the remote controller according to the Bluetooth broadcast packet; when the controlled equipment judges that the Bluetooth broadcast packet contains the control identification according to the analyzed Bluetooth broadcast packet, whether the remote controller ID and the group number in the Bluetooth broadcast packet are consistent with the remote controller ID and the group number stored in the controlled equipment is judged, and if so, relevant actions are executed according to the control identification.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110286151.8A CN113096373A (en) | 2021-03-17 | 2021-03-17 | Remote controller, controlled equipment and method for realizing packet control based on Bluetooth broadcast packet |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110286151.8A CN113096373A (en) | 2021-03-17 | 2021-03-17 | Remote controller, controlled equipment and method for realizing packet control based on Bluetooth broadcast packet |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113096373A true CN113096373A (en) | 2021-07-09 |
Family
ID=76668312
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110286151.8A Pending CN113096373A (en) | 2021-03-17 | 2021-03-17 | Remote controller, controlled equipment and method for realizing packet control based on Bluetooth broadcast packet |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113096373A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114120609A (en) * | 2021-10-27 | 2022-03-01 | 深圳市芯中芯科技有限公司 | Remote controller pairing, binding and pairing system and method based on Bluetooth broadcast |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101227750A (en) * | 2007-01-16 | 2008-07-23 | Smk株式会社 | RF communication system |
CN101369945A (en) * | 2007-08-16 | 2009-02-18 | 索尼株式会社 | Remote control system, receiving device and electronic apparauts |
CN101647321A (en) * | 2007-03-27 | 2010-02-10 | 皇家飞利浦电子股份有限公司 | Control circuit, system for operating a device and device for programming such a control circuit |
CN201557297U (en) * | 2009-11-13 | 2010-08-18 | 康佳集团股份有限公司 | Control device for LED color lamp |
CN102063781A (en) * | 2009-11-13 | 2011-05-18 | 康佳集团股份有限公司 | One-to-many group-divisible remote control device and method |
CN103985234A (en) * | 2014-04-23 | 2014-08-13 | 杭州微纳科技有限公司 | Remote control method based on bluetooth broadcast packet |
CN205830085U (en) * | 2016-06-06 | 2016-12-21 | 深圳市杰矽科技有限公司 | A kind of 2.4G Intelligent Light-control System |
CN106327826A (en) * | 2016-08-19 | 2017-01-11 | 深圳迈睿智能科技有限公司 | Control method and remote control system for setting wireless networking by means of remote control |
CN108443840A (en) * | 2017-12-29 | 2018-08-24 | 深圳市创荣发电子有限公司 | A kind of function key gives tacit consent to the anti-error method pressed |
-
2021
- 2021-03-17 CN CN202110286151.8A patent/CN113096373A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101227750A (en) * | 2007-01-16 | 2008-07-23 | Smk株式会社 | RF communication system |
CN101647321A (en) * | 2007-03-27 | 2010-02-10 | 皇家飞利浦电子股份有限公司 | Control circuit, system for operating a device and device for programming such a control circuit |
CN101369945A (en) * | 2007-08-16 | 2009-02-18 | 索尼株式会社 | Remote control system, receiving device and electronic apparauts |
CN201557297U (en) * | 2009-11-13 | 2010-08-18 | 康佳集团股份有限公司 | Control device for LED color lamp |
CN102063781A (en) * | 2009-11-13 | 2011-05-18 | 康佳集团股份有限公司 | One-to-many group-divisible remote control device and method |
CN103985234A (en) * | 2014-04-23 | 2014-08-13 | 杭州微纳科技有限公司 | Remote control method based on bluetooth broadcast packet |
CN205830085U (en) * | 2016-06-06 | 2016-12-21 | 深圳市杰矽科技有限公司 | A kind of 2.4G Intelligent Light-control System |
CN106327826A (en) * | 2016-08-19 | 2017-01-11 | 深圳迈睿智能科技有限公司 | Control method and remote control system for setting wireless networking by means of remote control |
CN108443840A (en) * | 2017-12-29 | 2018-08-24 | 深圳市创荣发电子有限公司 | A kind of function key gives tacit consent to the anti-error method pressed |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114120609A (en) * | 2021-10-27 | 2022-03-01 | 深圳市芯中芯科技有限公司 | Remote controller pairing, binding and pairing system and method based on Bluetooth broadcast |
CN114120609B (en) * | 2021-10-27 | 2023-11-14 | 深圳市芯中芯科技有限公司 | Remote controller pairing, binding and pairing system and method based on Bluetooth broadcasting |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230245653A1 (en) | Image display apparatus and method of controlling the same | |
US5614906A (en) | Method for selecting a remote control command set | |
EP2356643B1 (en) | System and method for capturing remote control device command signals | |
US20120005632A1 (en) | Execute a command | |
US20100123834A1 (en) | System and Method for Capturing Remote Control Device Command Signals | |
US8380131B2 (en) | Frequency selection system including a wireless microphone and a receiver | |
CN110415455B (en) | Method and device for selecting storage space occupying intelligent storage cabinet | |
CN102842213A (en) | Remote control terminal and information processing apparatus | |
CN108040273B (en) | Method for controlling game of set top box, remote control system and handheld electronic device | |
CN113096373A (en) | Remote controller, controlled equipment and method for realizing packet control based on Bluetooth broadcast packet | |
EP2835463A1 (en) | Stitchwork status checking system, stitchwork status checking apparatus, stitchwork status checking method and stitchwork status checking program | |
CN100399372C (en) | Integral remote control method for household electrical equipment | |
WO2022188329A1 (en) | Bluetooth broadcast packet-based code pairing remote control, controlled device, and method | |
EP2835464A1 (en) | Stitchwork status checking system, stitchwork status checking apparatus, stitchwork status checking method and stitchwork status checking program | |
CN113064683A (en) | Electric control equipment control interface display method and system, terminal and electric control equipment | |
WO2010097744A1 (en) | Code set determination for a remote control | |
CN112219176B (en) | Remote control movable platform control method, device and computer readable storage medium | |
CN100385471C (en) | Studying remote control method and device for household electrical appliances | |
CN115599337A (en) | Audio data transmission method and electronic equipment | |
CN113932422A (en) | Test method, test device and control device for air conditioner | |
CN110312094B (en) | Signal receiving apparatus, signal output control system, and signal output control method | |
CN109274509B (en) | Broadcast state determination method and device, electronic equipment and storage medium | |
CN112073739A (en) | Mobile recording and broadcasting control system and method | |
CN105185092B (en) | Terminal control method and system | |
KR100686073B1 (en) | Remote control system and control method of the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210709 |