A kind of low-power consumption bluetooth data communications method, equipment and system
Technical field
Embodiment of the present invention is related to Bluetooth technology field, more particularly to a kind of low-power consumption bluetooth data communications method,
Equipment and system.
Background technology
Bluetooth (Bluetooth):It is a kind of wireless technology standard, fixing equipment, mobile device and building can be achieved personal
Short-range data between the net of domain is exchanged (using the UHF radio waves of 2.4~2.485GHz ISM band).Bluetooth technology is most
Just formulated by telecommunications giant Ericsson in 1994, be the alternative solution as RS232 data wires at that time.Bluetooth can be connected
Multiple equipment, overcomes the problem of data syn-chronization.
In traditional Bluetooth communication, generally require to set up connection between two electronic equipments with blue tooth interface,
Data channel is set up, is carried out data transmission by the data channel of the foundation.During carrying out data transmission, pass through indigo plant
The data of transmission are encrypted tooth wireless interaction public key, and so Yi Dan opening after encryption, miscellaneous equipment is to be intercepted
Communication between two bluetooth equipments.
This Bluetooth communication method can directly dock two bluetooth equipments, high with transmission stability, the features such as safe.
But this Blue-tooth communication method needs that electronic equipment is kept into Bluetooth communication connection always, and such a Blue-tooth communication method communicates
It is complex, often compare consumption electricity.When carrying out the small data transmission not high to security requirement, often do not apply to.
The content of the invention
Embodiment of the present invention provides kind of low-power consumption bluetooth data communications method, equipment and a system, and communication is simple, saves
Electric energy.
In order to solve the above technical problems, the technical scheme that embodiment of the present invention is used is:A kind of low-power consumption bluetooth
Data communications method, including:
Data to be sent are obtained,
The data to be sent are carried on broadcast bag data, and sent by broadcast channel, wherein, the number to be sent
Carried according to by the reserved field in the broadcast bag data.
Embodiment of the present invention use another technical scheme be:A kind of low-power consumption bluetooth data communications method, including:
Scan broadcast singal;
The broadcast packet in the broadcast channel of broadcast singal is obtained, and further obtains the data in broadcast packet, wherein, it is described
Data in broadcast bag data are carried by reserved field.
Embodiment of the present invention use another technical scheme be:A kind of low-power consumption bluetooth processing equipment is provided, including:
First process chip, for obtaining data to be sent;
First radio circuit, for the data to be sent to be carried on into broadcast bag data, and is sent by broadcast channel,
Wherein, the data to be sent are carried by the reserved field in the broadcast bag data.
Embodiment of the present invention use another technical scheme be:A kind of low-power consumption bluetooth processing equipment is provided, it is wrapped
Include:
Second radio circuit, for scanning broadcast singal;
Second radio circuit is additionally operable to obtain the broadcast packet in the broadcast channel of broadcast singal, and further obtains wide
The data in bag are broadcast, wherein, the data in the broadcast bag data are carried by reserved field.
Embodiment of the present invention use another technical scheme be:A kind of low-power consumption bluetooth communication system is provided, it is wrapped
Include slave unit and main equipment;
Slave unit includes:First process chip and the first radio circuit;
First process chip, for obtaining data to be sent;The triggering from button or the triggering of event are received, institute is obtained
State button triggering or the corresponding director data of event triggering;
First radio circuit, for the data to be sent to be carried on into broadcast bag data, and is sent by broadcast channel,
Wherein, the data to be sent are carried by the reserved field in the broadcast bag data;
First radio circuit, is additionally operable to receive the response bag that main equipment is sent;After receiving the response bag, then this
Communications reception, slave unit enters park mode, does not such as receive response bag, then slave unit proceeds scan operation;
First process chip is additionally operable to wake up from resting state, into working condition;
Main equipment includes:Second radio circuit and second processing chip;
Second radio circuit, for scanning broadcast singal;
Second radio circuit, is additionally operable to obtain the broadcast packet in the broadcast channel of broadcast singal, and further obtains broadcast
Data in bag, wherein, the data in the broadcast bag data are carried by reserved field.
The beneficial effect of embodiment of the present invention is:The situation of prior art is different from, embodiment of the present invention is for right
The unidirectional small data quantity communication that privacy is not required, can be carried out directly in broadcast channel.So need to pass in no data
Resting state can be kept when sending, so as to reach the purpose for saving electricity.
Brief description of the drawings
Fig. 1 is application scenarios schematic diagram provided in an embodiment of the present invention;
Fig. 2 is a kind of flow chart for low-power consumption bluetooth communication means that real first embodiment of the invention is provided;
Fig. 3 is the structural representation of broadcast packet provided in an embodiment of the present invention;
Fig. 4 is the structural representation of the specified packet of manufacturer shown in Fig. 3;
Fig. 5 is the structural representation of the head field shown in Fig. 4;
Fig. 6 is a kind of flow chart for low-power consumption bluetooth communication means that second embodiment of the invention is provided;
Fig. 7 is a kind of structural representation for low-power consumption bluetooth slave unit that third embodiment of the invention is provided;
Fig. 8 is a kind of structural representation for low-power consumption bluetooth main equipment that fourth embodiment of the invention is provided;
Fig. 9 is a kind of structural representation for low-power consumption bluetooth communication system that fifth embodiment of the invention is provided;
Figure 10 is a kind of structural scheme of mechanism for bluetooth equipment that the present invention is provided.
Embodiment
In order that the object, technical solution and advantage of the application are more clearly understood, it is real below in conjunction with accompanying drawing and the application
Example is applied, the application is further elaborated.It should be appreciated that specific the embodiment of the present application described herein is only to solve
The application is released, is not used to limit the application.
Fig. 1 is that the embodiment of the present application provides a kind of possible application scene of low-power consumption bluetooth data communications method.At some
Possible application scene, as shown in figure 1, the application scenarios include intelligent bulbs 11, smart mobile phone 12.Smart mobile phone 12 obtains pending
The data sent, and by the way that the data are carried on into broadcast data packet, and sent by broadcast channel.Intelligent bulbs 11 are scanned simultaneously
The packet in broadcast channel is obtained, parsing packet is instructed, and the corresponding operation of execute instruction.Example, intelligent hand
Machine 12 obtains the instruction turned on light, and the data turned on light are carried in broadcast data packet, then sent by broadcast channel.Intelligent lamp
Bubble 11 scans and receives the data in broadcast channel, is instructed after parsing packet, and execute instruction is to be turned on light.
In the prior art, bulb need to such as be opened, then needs smart mobile phone 12 being connected pass with intelligent bulbs foundation
System, smart mobile phone 12 is ceaselessly shaken hands with the both sides of intelligent bulbs 11, to ensure both sides all in connection communication state, rather than
Disconnect connectionless state.Communication process has a ciphering process, by bluetooth wireless interaction public key, to obtain a private key
Ciphering process is reached, so Yi Dan opening after encryption, miscellaneous equipment is can not to carry out intercepting the communication between bluetooth.So
Communication is safer, but brings the problem of power consumption is larger.
Referring again to Fig. 1, in the possible application scene that the embodiment of the present application is provided, obtain pending by smart mobile phone 12
The data sent, and by the way that the data are carried on into broadcast data packet, and sent by broadcast channel.Intelligent bulbs 11 are scanned simultaneously
The packet in broadcast channel is obtained, parsing packet is instructed, and receives smart mobile phone after the corresponding operation of execute instruction
12 packets replied enter resting state.Therefore, using this method, lead to for the unidirectional small data quantity not required privacy
Letter, can be carried out directly in broadcast channel.So intelligent bulbs can keep resting state when no data need transmission,
So as to reach the purpose for saving electricity.
Embodiment one
Refering to Fig. 2, the first embodiment of the present invention there is provided a kind of low-power consumption bluetooth data communications method, methods described
Executive agent is slave unit, and methods described includes:
Step 21:Obtain data to be sent;
The triggering from button or the triggering of event are received, the button triggering or the corresponding finger of event triggering is obtained
Make data.
Example, obtaining some needs the information of interaction, such as presses some key, and then sends trigger signal, then obtains
The key assignments of this key, the key assignments is the data to be sent obtained.Or voice signal is checked, the voice signal enters to act
Part is triggered, and obtains the content of voice signal, and the content of the voice signal is the data to be sent obtained.
Step 22:The data to be sent are carried on broadcast bag data, and sent by broadcast channel, wherein, it is described
Data to be sent are carried by the reserved field in the broadcast bag data.
Refering to Fig. 3, the broadcast packet is advertising bags, and it includes preceding top guide (Preamble), synchronous head
(Access Address), protocol Data Unit (PDU) and check word (CRC).
The size of the preceding top guide is 1 byte, for carrying for synchronous information.
The size of the synchronous head is 4 bytes, the address information for carrying digital channel, and the value of the address information is
Fixed.It is known that the packet for carrying the address information is advertising bags by the address information, by not
Same digital channel numerical value can distinguish different communication equipment.
The size of the protocol Data Unit can be 2 bytes to 257 bytes.
The protocol Data Unit further comprises:Packet header (Header) and packet (payload).
The packet header further comprises:Packet type, the first reserved field, transmission address style, reception address style, length
Section and the second reserved field.
The size of the Packet type is 4, and entrained information is used for the type for representing broadcast packet.First reserved word
Section is system default field, and its size is 2.The size for sending address style is 1, and entrained information is used to represent
Send the type of the address of equipment.The size for receiving address style is 1, and entrained information is used to represent receiving device
Address type.The size of the length section is 6, and entrained information table shows the length of packet.Described second retains
Field is system default field, and its size is 2.
Further, the Packet type includes:ADV_IND、ADV_DIRECT_IND、ADV_NONCONN_IND、SCAN_
REQ、SCAN_RSP、CONNECT_REQ、ADV_SCAN_IND.The ADV_IND is when the value of Packet type is set into 0000
Type.The ADV_DIRECT_IND is the type when value of Packet type is set into 0001.The ADV_NONCONN_IND is
The type when value of Packet type is set into 0010.The SCAN_REQ is the type when value of Packet type is set into 0011.
The SCAN_REQ is the type when value of Packet type is set into 0100.The ADV_SCAN_IND is to set the value of Packet type
Type when being set to 0110.
The size of the packet can be 0 to 255 byte, and it further comprises:Broadcast address section and inclusive segment.Institute
The size for stating broadcast address is 6 bytes, and entrained information is used for the address information for representing the passage of broadcast.The inclusive segment
Size is 0 byte to 31 bytes, the information that entrained information sends for needs.
The size of the check word is 3 bytes, and entrained information is used for the accuracy for detecting transmission data.
When needing by broadcast transmission data, by the protocol Data Unit middle wrapping head in above-mentioned advertising bags
Packet type is set to 0000, Packet type is set to ADV_IND, can illustrate that this equipment is with attachable information for broadcasting
It can be connected, and the address of the physics with this equipment in the broadcast.
The data message sent is needed to be included among the inclusive segment, refering to Fig. 4, the inclusive segment further comprises factory
Business specifies packet (Manufacturer Specific Data).The manufacturer formulates packet and further comprised:Length section,
Type section, vendor id, head field and data segment need to be sent.
The size of the length section is 1 byte, for representing that manufacturer formulates the length of packet data.The type section
Size is 1 byte, and entrained information is used for the type for representing that manufacturer formulates packet.The size of the head field is 1 byte.
The size of the vendor id is 2 bytes.
The reserved field need to send data segment to be described, and it is used to carry the data message that need to be sent.Example, it is necessary to
The director data of transmission, such as:The data such as turn on light, turn off the light, which are all deposited in, described need to send data segment.Data to be sent are then to need hair
Send the data carried in data segment.
The value of the type section is preset as " 0xFF ".
Refering to Fig. 5, the head field further comprises:Model selection section (Mode enable) and several sections of series
(Sequence Number)。
The size of the model selection section is 1, when its value is 0, illustrates that communication pattern is not opened, must be by common mode
Reason need to send the content entrained by data segment.When its value is 1, then it represents that data below are the contents of communication, parse the institute
The content of data segment need to be sent by stating, and parsing obtains operational order, and control signal is sent according to the operational order.
When sending data by broadcast channel, led to by choosing the channel of 3 2.4G specified in Bluetooth protocol
Letter, can only send advertising bags on 3 channels, and 3 channels are 37,38,39 channels.
Rf channel |
Rf frequency |
Broadcast channel label |
0 |
2402MHz |
37 |
12 |
2426MHz |
38 |
39 |
2480MHz |
39 |
As described in upper table, the rf frequency of rf channel 0 is 2402MHZ, and its broadcast channel is marked as 37;Rf channel 12
Rf frequency be 2426MHZ, its broadcast channel is marked as 38;The rf frequency of rf channel 39 is 2480MHZ, and it broadcasts letter
Track label is 39.
In these three above-mentioned physical channels, one or more is arbitrarily chosen, for broadcasting.Identical broadcast data,
In each broadcast channel by, only send once.
The data to be sent are being carried on broadcast bag data, and also include after being sent by broadcast channel:Receive
The response bag that main equipment is sent.After receiving the response bag, then this communications reception, slave unit enters park mode, such as
Response bag is not received, then slave unit proceeds scan operation.
Also include before the data to be sent are carried on into broadcast bag data, and are sent by broadcast channel:From not
Waken up in dormancy state, into working condition.
Bluetooth connection is divided into connection status and connectionless state.Communicating pair is needed not stop to be held in connection status
Hand, to ensure both sides all in connection communication state, rather than disconnects connectionless state.Connectionless state is typically exactly one section of dormancy
Time, then recur and communicate, and dormancy time can be carried out according to the situation for needing power saving it is self-defined, it is necessary to can be with during many power savings
Many dormancy are for a period of time.
Described waken up from resting state includes:Timing wake-up and event wake up.
The timing wake-up is one preset time of setting, after a preset time period, actively from resting state
It is middle to wake up.The preset time is the random times such as 1ms, 1s, 2s.Example, preset time is 1s, carry out communication one section when
Between, sleep a preset time period, sleep 1s after, from resting state wake up, into working condition.
The event triggering that the event wakes up to be occurred, working condition is entered from resting state.Example, press certain
Individual key, and then trigger signal is sent, the action pushed button triggers for event, receives the trigger signal of the event, from
Resting state enters working condition.Or voice signal is checked, the voice signal carries out event triggering, from resting state
Enter working condition.
Therefore, using this method, communicated for the unidirectional small data quantity not required privacy, can be directly in broadcast letter
Carried out in road.Resting state so can be kept when no data need transmission, so as to reach the purpose for saving electricity.
Embodiment two
Refering to Fig. 6, the second embodiment of the present invention there is provided a kind of low-power consumption bluetooth data communications method, methods described
Executive agent is main equipment, and methods described includes:
Step 61:Scan broadcast singal;
The scanning broadcast singal is regularly to be scanned broadcast singal.When pre-setting one scan period and interval
Between section, after sweep time section is scanned across, be scanned again after the section cycle one interval time of interval.Example, it is described
Sweep time section is 1s, and interval time section is 5ms, then is scanned 1s, after the 5ms of interval, is scanned, follows repeatedly again
Ring.Alternatively, interval time section can be set to 0, then persistently carries out the scanning of broadcast singal.
Step 62:The broadcast packet in the broadcast channel of broadcast singal is obtained, and further obtains the data in broadcast packet, its
In, the data in the broadcast bag data are carried by reserved field.
Refering to Fig. 3, the broadcast packet is advertising bags, and it includes preceding top guide (Preamble), synchronous head
(Access Address), protocol Data Unit (PDU) and check word (CRC).
The size of the preceding top guide is 1 byte, for carrying for synchronous information.
The size of the synchronous head is 4 bytes, the address information for carrying digital channel, and the value of the address information is
Fixed.It is known that the packet for carrying the address information is advertising bags by the address information, by not
Same digital channel numerical value can distinguish different communication equipment.
The size of the protocol Data Unit can be 2 bytes to 257 bytes.
The protocol Data Unit further comprises:Packet header (Header) and packet (payload).
The packet header further comprises:Packet type, the first reserved field, transmission address style, reception address style, length
Section and the second reserved field.
The size of the Packet type is 4, and entrained information is used for the type of Presentation protocol data unit.Described first
Reserved field is system default field, and its size is 2.The size for sending address style is 1, and entrained information is used
Type in the address for representing to send equipment.The size for receiving address style is 1, and entrained information connects for expression
The type of the address of receiving unit.The size of the length section is 6, and entrained information table shows the length of packet.Described
Two reserved fields are system default field, and its size is 2.
Further, the Packet type includes:ADV_IND、ADV_DIRECT_IND、ADV_NONCONN_IND、SCAN_
REQ、SCAN_RSP、CONNECT_REQ、ADV_SCAN_IND.The ADV_IND is when the value of Packet type is set into 0000
Type.The ADV_DIRECT_IND is the type when value of Packet type is set into 0001.The ADV_NONCONN_IND is
The type when value of Packet type is set into 0010.The SCAN_REQ is the type when value of Packet type is set into 0011.
The SCAN_REQ is the type when value of Packet type is set into 0100.The ADV_SCAN_IND is to set the value of Packet type
Type when being set to 0110.
The size of the packet can be 0 to 255 byte, and it further comprises:Broadcast address section and inclusive segment.Institute
The size for stating broadcast address is 6 bytes, and entrained information is used for the address information for representing the passage of broadcast.The inclusive segment
Size is 0 byte to 31 bytes, the information that entrained information sends for needs.
The size of the check word is 3 bytes, and entrained information is used for the accuracy for detecting transmission data.
When scanning and obtaining the data of broadcast singal transmission, wrapped in the protocol Data Unit in above-mentioned advertising bags
The Packet type of head is set to 0000, and Packet type is set to ADV_IND, can illustrate this equipment with attachable information for broadcasting
It can be connected, and the address of the physics with this equipment in the broadcast.
The data message of reception is included among the inclusive segment, and refering to Fig. 4, the inclusive segment further comprises that manufacturer refers to
Determine packet (Manufacturer Specific Data).The manufacturer formulates packet and further comprised:Length section, type
Section, vendor id, head field and data segment need to be sent.
The size of the length section is 1 byte, for representing that manufacturer formulates the length of packet data.The type section
Size is 1 byte, and entrained information is used for the type for representing that manufacturer formulates packet.The size of the head field is 1 byte.
The size of the vendor id is 2 bytes.
The reserved field need to send data segment to be described, and it is used to carry the data message that need to be sent.Example, it is necessary to
The director data of transmission, such as:The data such as turn on light, turn off the light, which are all deposited in, described need to send data segment.
The value of the type section is preset as " 0xFF ".
Refering to Fig. 5, the head field further comprises:Model selection section (Mode enable) and several sections of series
(Sequence Number)。
The size of the model selection section is 1, when its value is 0, illustrates that communication pattern is not opened, must be by common mode
Reason need to send the content entrained by data segment.When its value is 1, then it represents that data below are the contents of communication, parse the institute
The content of data segment need to be sent by stating, and parsing obtains operational order, and control signal is sent according to the operational order.
When obtaining the data of broadcast channel, communicated by the channel from 3 2.4G specified in Bluetooth protocol, only
Advertising bags can be obtained from 3 channels, 3 channels are 37,38,39 channels.
Rf channel |
Rf frequency |
Broadcast channel label |
0 |
2402MHz |
37 |
12 |
2426MHz |
38 |
39 |
2480MHz |
39 |
As described in upper table, the rf frequency of rf channel 0 is 2402MHZ, and its broadcast channel is marked as 37;Frequency domain channel 12
Rf frequency is 2426MHZ, and its broadcast channel is marked as 38;The rf frequency of frequency domain channel 39 is 2480MHZ, its broadcast channel mark
Number be 39.
In these three above-mentioned physical channels, one or more is arbitrarily chosen, for broadcasting.Identical broadcast data,
In each broadcast channel by, only send once.
Broadcast packet in the broadcast channel for obtaining broadcast singal, and further after the data in acquisition broadcast packet, also
Including:Whether the value of judgment model selection section is 1, when the value of such as model selection section is 1, sends response bag to slave unit.From setting
It is standby receive the response bag after, into park mode, such as do not receive response bag, then slave unit proceeds scanning broadcast letter
Number.When value such as model selection section is 0, then the step of repeat step 61, are scanned broadcast singal again.
After response bag to slave unit is sent, analysis judgement is carried out to several sections of numerical value of series, is such as judged as correct
Serial number, then parse to the data in the broadcast packet of reception.Such as it is judged as incorrect serial number, then repeat step 61
Step, is scanned broadcast singal again.
Therefore, using this method, communicated for the unidirectional small data quantity not required privacy, can be directly in broadcast letter
Carried out in road.Resting state so can be kept when no data need transmission, so as to reach the purpose for saving electricity.
Embodiment three
Refering to Fig. 7, there is provided a kind of low-power consumption bluetooth data communication slave unit, methods described for the third embodiment of the present invention
Including:
First process chip 71:For obtaining data to be sent;
The triggering from button or the triggering of event are received, the button triggering or the corresponding finger of event triggering is obtained
Make data.
Example, obtaining some needs the information of interaction, such as presses some key, and then sends trigger signal, then obtains
The key assignments of this key, the key assignments is the data to be sent obtained.Or voice signal is checked, the voice signal enters to act
Part is triggered, and obtains the content of voice signal, and the content of the voice signal is the data to be sent obtained.
First radio circuit 72:The data to be sent are carried on broadcast bag data, and sent by broadcast channel, its
In, the data to be sent are carried by the reserved field in the broadcast bag data.
Refering to Fig. 3, the broadcast packet is advertising bags, and it includes preceding top guide (Preamble), synchronous head
(Access Address), protocol Data Unit (PDU) and check word (CRC).
The size of the preceding top guide is 1 byte, for carrying for synchronous information.
The size of the synchronous head is 4 bytes, the address information for carrying digital channel, and the value of the address information is
Fixed.It is known that the packet for carrying the address information is advertising bags by the address information, by not
Same digital channel numerical value can distinguish different communication equipment.
The size of the protocol Data Unit can be 2 bytes to 257 bytes.
The protocol Data Unit further comprises:Packet header (Header) and packet (payload).
The packet header further comprises:Packet type, the first reserved field, transmission address style, reception address style, length
Section and the second reserved field.
The size of the Packet type is 4, and entrained information is used for the type of Presentation protocol data unit.Described first
Reserved field is system default field, and its size is 2.The size for sending address style is 1, and entrained information is used
Type in the address for representing to send equipment.The size for receiving address style is 1, and entrained information connects for expression
The type of the address of receiving unit.The size of the length section is 6, and entrained information table shows the length of packet.Described
Two reserved fields are system default field, and its size is 2.
Further, the Packet type includes:ADV_IND、ADV_DIRECT_IND、ADV_NONCONN_IND、SCAN_
REQ、SCAN_RSP、CONNECT_REQ、ADV_SCAN_IND.The ADV_IND is when the value of Packet type is set into 0000
Type.The ADV_DIRECT_IND is the type when value of Packet type is set into 0001.The ADV_NONCONN_IND is
The type when value of Packet type is set into 0010.The SCAN_REQ is the type when value of Packet type is set into 0011.
The SCAN_REQ is the type when value of Packet type is set into 0100.The ADV_SCAN_IND is to set the value of Packet type
Type when being set to 0110.
The size of the packet can be 0 to 255 byte, and it further comprises:Broadcast address section and inclusive segment.Institute
The size for stating broadcast address is 6 bytes, and entrained information is used for the address information for representing the passage of broadcast.The inclusive segment
Size is 0 byte to 31 bytes, the information that entrained information sends for needs.
The size of the check word is 3 bytes, and entrained information is used for the accuracy for detecting transmission data.
When needing by broadcast transmission data, by the protocol Data Unit middle wrapping head in above-mentioned advertising bags
Packet type is set to 0000, Packet type is set to ADV_IND, can illustrate that this equipment is with attachable information for broadcasting
It can be connected, and the address of the physics with this equipment in the broadcast.
The data message sent is needed to be included among the inclusive segment, refering to Fig. 4, the inclusive segment further comprises factory
Business specifies packet (Manufacturer Specific Data).The manufacturer formulates packet and further comprised:Length section,
Type section, vendor id, head field and data segment need to be sent.
The size of the length section is 1 byte, for representing that manufacturer formulates the length of packet data.The type section
Size is 1 byte, and entrained information is used for the type for representing that manufacturer formulates packet.The size of the head field is 1 byte.
The size of the vendor id is 2 bytes.
The reserved field need to send data segment to be described, and it is used to carry the data message that need to be sent.Example, it is necessary to
The director data of transmission, such as:The data such as turn on light, turn off the light, which are all deposited in, described need to send data segment.
The value of the type section is preset as " 0xFF ".
Refering to Fig. 5, the head field further comprises:Model selection section (Mode enable) and several sections of series
(Sequence Number)。
The size of the model selection section is 1, when its value is 0, illustrates that communication pattern is not opened, must be by common mode
Reason need to send the content entrained by data segment.When its value is 1, then it represents that data below are the contents of communication, parse the institute
The content of data segment need to be sent by stating, and parsing obtains operational order, and control signal is sent according to the operational order.
When sending data by broadcast channel, led to by choosing the channel of 3 2.4G specified in Bluetooth protocol
Letter, can only send advertising bags on 3 channels, and 3 channels are 37,38,39 channels.
Rf channel |
Rf frequency |
Broadcast channel label |
0 |
2402MHz |
37 |
12 |
2426MHz |
38 |
39 |
2480MHz |
39 |
As described in upper table, the rf frequency of rf channel 0 is 2402MHZ, and its broadcast channel is marked as 37;Frequency domain channel 12
Rf frequency is 2426MHZ, and its broadcast channel is marked as 38;The rf frequency of frequency domain channel 39 is 2480MHZ, its broadcast channel mark
Number be 39.
In these three above-mentioned physical channels, one or more is arbitrarily chosen, for broadcasting.Identical broadcast data,
In each broadcast channel by, only send once.
Alternatively, the first radio circuit 72 is additionally operable to receive the response bag that main equipment is sent.Receive the response bag it
Afterwards, then this communications reception, slave unit enters park mode, does not such as receive response bag, then slave unit proceeds scan operation.
Alternatively, the first process chip 71 is additionally operable to wake up from resting state, into working condition.
Bluetooth connection is divided into connection status and connectionless state.Communicating pair is needed not stop to be held in connection status
Hand, to ensure both sides all in connection communication state, rather than disconnects connectionless state.Connectionless state is typically exactly one section of dormancy
Time, then recur and communicate, and dormancy time can be carried out according to the situation for needing power saving it is self-defined, it is necessary to can be with during many power savings
Many dormancy are for a period of time.
The timing wake-up submodule is used to set a preset time, after a preset time period, actively from
Waken up in resting state.The preset time is the random times such as 1ms, 1s, 2s.Example, preset time is 1s, is being led to
After letter a period of time, a preset time period of sleeping, sleep 1s, waken up from resting state, into working condition.
The event wakes up submodule, and when the event for being occurred is triggered, working condition is entered from resting state.Show
Example, some key is pressed, and then trigger signal is sent, the action pushed button triggers for event, receives the event
Trigger signal, working condition is entered from resting state.Or voice signal is checked, the voice signal carries out event and touched
Hair, working condition is entered from resting state.
Therefore, using this method, communicated for the unidirectional small data quantity not required privacy, can be directly in broadcast letter
Carried out in road.Resting state so can be kept when no data need transmission, so as to reach the purpose for saving electricity.
Example IV
Refering to Fig. 8, the fourth embodiment of the present invention there is provided a kind of low-power consumption bluetooth primary data communication device, including:
Second radio circuit 81:For scanning broadcast singal;
The scanning broadcast singal is regularly to be scanned broadcast singal.When pre-setting one scan period and interval
Between section, after sweep time section is scanned across, be scanned again after the section cycle one interval time of interval.Example, it is described
Sweep time section is 1s, and interval time section is 5ms, then is scanned 1s, after the 5ms of interval, is scanned, follows repeatedly again
Ring.Alternatively, interval time section can be set to 0, then persistently carries out the scanning of broadcast singal.
Second radio circuit 81 is additionally operable to obtain the broadcast packet in the broadcast channel of broadcast singal, and further obtains broadcast
Data in bag, wherein, the data in the broadcast bag data are carried by reserved field.
The reserved field is advertising bags, and it includes preceding top guide (Preamble), synchronous head (Access
Address), protocol Data Unit (PDU) and check word (CRC).
The size of the preceding top guide is 1 byte, for carrying for synchronous information.
The size of the synchronous head is 4 bytes, the address information for carrying digital channel, and the value of the address information is
Fixed.It is known that the packet for carrying the address information is advertising bags by the address information, by not
Same digital channel numerical value can distinguish different communication equipment.
The size of the protocol Data Unit can be 2 bytes to 257 bytes.
The protocol Data Unit further comprises:Packet header (Header) and packet (payload).
The packet header further comprises:Packet type, the first reserved field, transmission address style, reception address style, length
Section and the second reserved field.
The size of the Packet type is 4, and entrained information is used for the type of Presentation protocol data unit.Described first
Reserved field is system default field, and its size is 2.The size for sending address style is 1, and entrained information is used
Type in the address for representing to send equipment.The size for receiving address style is 1, and entrained information connects for expression
The type of the address of receiving unit.The size of the length section is 6, and entrained information table shows the length of packet.Described
Two reserved fields are system default field, and its size is 2.
Further, the Packet type includes:ADV_IND、ADV_DIRECT_IND、ADV_NONCONN_IND、SCAN_
REQ、SCAN_RSP、CONNECT_REQ、ADV_SCAN_IND.The ADV_IND is when the value of Packet type is set into 0000
Type.The ADV_DIRECT_IND is the type when value of Packet type is set into 0001.The ADV_NONCONN_IND is
The type when value of Packet type is set into 0010.The SCAN_REQ is the type when value of Packet type is set into 0011.
The SCAN_REQ is the type when value of Packet type is set into 0100.The ADV_SCAN_IND is to set the value of Packet type
Type when being set to 0110.
The size of the packet can be 0 to 255 byte, and it further comprises:Broadcast address section and inclusive segment.Institute
The size for stating broadcast address is 6 bytes, and entrained information is used for the address information for representing the passage of broadcast.The inclusive segment
Size is 0 byte to 31 bytes, the information that entrained information sends for needs.
The size of the check word is 3 bytes, and entrained information is used for the accuracy for detecting transmission data.
When scanning and obtaining the data of broadcast singal transmission, wrapped in the protocol Data Unit in above-mentioned advertising bags
The Packet type of head is set to 0000, and Packet type is set to ADV_IND, can illustrate this equipment with attachable information for broadcasting
It can be connected, and the address of the physics with this equipment in the broadcast.
The data message of reception is included among the inclusive segment, and refering to Fig. 4, the inclusive segment further comprises that manufacturer refers to
Determine packet (Manufacturer Specific Data).The manufacturer formulates packet and further comprised:Length section, type
Section, vendor id, head field and data segment need to be sent.
The size of the length section is 1 byte, for representing that manufacturer formulates the length of packet data.The type section
Size is 1 byte, and entrained information is used for the type for representing that manufacturer formulates packet.The size of the head field is 1 byte.
The size of the vendor id is 2 bytes.
The reserved field need to send data segment to be described, and it is used to carry the data message that need to be sent.Example, it is necessary to
The director data of transmission, such as:The data such as turn on light, turn off the light, which are all deposited in, described need to send data segment.
The value of the type section is preset as " 0xFF ".
Refering to Fig. 5, the head field further comprises:Model selection section (Mode enable) and several sections of series
(Sequence Number)。
The size of the model selection section is 1, when its value is 0, illustrates that communication pattern is not opened, must be by common mode
Reason need to send the content entrained by data segment.When its value is 1, then it represents that data below are the contents of communication, parse the institute
The content of data segment need to be sent by stating, and parsing obtains operational order, and control signal is sent according to the operational order.
When obtaining the data of broadcast channel, communicated by the channel from 3 2.4G specified in Bluetooth protocol, only
Advertising bags can be obtained from 3 channels, 3 channels are 37,38,39 channels.
Rf channel |
Rf frequency |
Broadcast channel label |
0 |
2402MHz |
37 |
12 |
2426MHz |
38 |
39 |
2480MHz |
39 |
As described in upper table, the rf frequency of rf channel 0 is 2402MHZ, and its broadcast channel is marked as 37;Frequency domain channel 12
Rf frequency is 2426MHZ, and its broadcast channel is marked as 38;The rf frequency of frequency domain channel 39 is 2480MHZ, its broadcast channel mark
Number be 39.
In these three above-mentioned physical channels, one or more is arbitrarily chosen, for broadcasting.Identical broadcast data,
In each broadcast channel by, only send once.
The low-power consumption bluetooth communication master device also includes:Second processing chip 82, the value of section is selected for judgment model
Whether it is 1, when the value of such as model selection section is 1, sends response bag to slave unit.Slave unit is received after the response bag,
Into park mode, response bag is not such as received, then slave unit proceeds to scan broadcast singal.Value such as model selection section is 0
When, surface sweeping broadcast singal is carried out again.
Alternatively, second processing chip 82 is additionally operable to after response bag to slave unit is sent, to several sections of numerical value of series
Analysis judgement is carried out, is such as judged as correct serial number, then the data in the broadcast packet of reception is parsed.Such as it is judged as not
Correct series number, then the step of repeat step 51, are scanned broadcast singal again.
Therefore, using this method, communicated for the unidirectional small data quantity not required privacy, can be directly in broadcast letter
Carried out in road.Resting state so can be kept when no data need transmission, so as to reach the purpose for saving electricity.
Embodiment five
Refering to Fig. 9, a kind of low-power consumption bluetooth communication system that the embodiment of the present application is provided, it includes main equipment 91 and from setting
Standby 92.
Main equipment includes:Second radio circuit 911 and second processing chip 912.
Second radio circuit 911:For scanning broadcast singal;
Second radio circuit 912 is additionally operable to obtain the broadcast packet in the broadcast channel of broadcast singal, and further obtains wide
The data in bag are broadcast, wherein, the data in the broadcast bag data are carried by reserved field.
The main equipment 91 also includes:Second processing chip 912, whether the value that section is selected for judgment model is 1, such as mould
When the value of formula selection section is 1, response bag is sent to slave unit.Slave unit is received after the response bag, into park mode,
As do not received response bag, then slave unit proceeds to scan broadcast singal.When value such as model selection section is 0, swept again
Face broadcast singal.
Alternatively, second processing chip 912 is additionally operable to after response bag to slave unit is sent, to several sections of numerical value of series
Analysis judgement is carried out, is such as judged as correct serial number, then the data in the broadcast packet of reception is parsed.Such as it is judged as not
Correct series number, then the step of repeat step 51, are scanned broadcast singal again.
Slave unit includes:First process chip 921 and the first radio circuit 922.
First process chip 921:For obtaining data to be sent;
The triggering from button or the triggering of event are received, the button triggering or the corresponding finger of event triggering is obtained
Make data.
First radio circuit 922:The data to be sent are carried on broadcast bag data, and sent by broadcast channel,
Wherein, the data to be sent are carried by the reserved field in the broadcast bag data.
First radio circuit 922 is additionally operable to receive the response bag that main equipment is sent.After receiving the response bag, then this
Secondary communications reception, slave unit enters park mode, does not such as receive response bag, then slave unit proceeds scan operation.
First process chip 921 is additionally operable to wake up from resting state, into working condition.
Therefore, using this method, communicated for the unidirectional small data quantity not required privacy, can be directly in broadcast letter
Carried out in road.Resting state so can be kept when no data need transmission, so as to reach the purpose for saving electricity.
Embodiment six
Figure 10 is a kind of hardware of the bluetooth equipment 100 for low-power consumption bluetooth data communications method that the embodiment of the present application is provided
Structural representation, as shown in Figure 10, the bluetooth equipment 100 include:
In one or more processors 101, memory 102, radio circuit 103, Figure 10 by taking a processor 101 as an example.
Processor 101 and memory 102 can be connected by bus or other modes, to be connected by bus in Figure 10
Exemplified by.
Memory 102 is as a kind of non-volatile computer readable storage medium storing program for executing, available for storage non-volatile software journey
Sequence, non-volatile computer executable program and module.Processor 101 by run storage in the memory 102 it is non-easily
The property lost software program, instruction and module, so as to perform various function application and data processing, that is, realize that the above method is implemented
A kind of low-power consumption bluetooth data communications method of example.
Memory 102 can include storing program area and storage data field, wherein, storing program area can store operation system
Application program required for system, at least one function;Storage data field can be stored to be filled according to a kind of low-power consumption bluetooth data communication
That puts uses created data etc..In addition, memory 102 can include high-speed random access memory, it can also include non-
Volatile memory, for example, at least one disk memory, flush memory device or other non-volatile solid state memory parts.
One or more of modules are stored in the memory 102, when by one or more of processors
During 101 execution, the low-power consumption bluetooth data communications method in above-mentioned any means embodiment is performed, for example, performing above description
Fig. 2 in method and step 21, the method and step 61 in Fig. 6.
Radio frequency is the electromagnetic wave that can be used for radio communication with certain wavelength.Radio circuit 103 is for producing radio frequency
High-frequency circuit, it is made up of passive element, active device and passive network.The input signal of radio circuit 103 is to pass through
One inputs amplification module by matched filter network.Amplification module typically uses the common emitter configuration of transistor, and it inputs resistance
It is anti-to match with the output impedance of the wave filter before low-noise amplifier, so as to ensure optimal transmission power and most
Small reflectance factor.In addition, the output impedance of low-noise amplifier must match with the frequency mixer input impedance of its rear end, equally
It can guarantee that the signal of amplifier output complete, unreflected can be input in frequency mixer.
Radio circuit 103 is used to data being carried on broadcast packet, and is sent by broadcast channel;Or believe from broadcast
Broadcast packet is received in road.
Specifically, radio circuit 103 can be used for performing step 22, the step 62 in Fig. 6 in Fig. 2 of foregoing description.
The said goods can perform the method that the embodiment of the present application is provided, and possesses the corresponding functional module of execution method and has
Beneficial effect.Not ins and outs of detailed description in the present embodiment, reference can be made to the method that the embodiment of the present application is provided.
The electronic equipment of the embodiment of the present application exists in a variety of forms, includes but is not limited to:
(1) mobile communication equipment:The characteristics of this kind equipment is that possess mobile communication function, and to provide speech, data
Communicate as main target.This Terminal Type includes:Smart mobile phone (such as iPhone), multimedia handset, feature mobile phone, and it is low
Hold mobile phone etc..
(2) super mobile personal computer equipment:This kind equipment belongs to the category of personal computer, there is calculating and processing work(
Can, typically also possess mobile Internet access characteristic.This Terminal Type includes:PDA, MID and UMPC equipment etc., such as iPad.
(3) portable entertainment device:This kind equipment can show and play content of multimedia.The kind equipment includes:Audio,
Video player (such as iPod), handheld device, e-book, and intelligent toy and portable car-mounted navigation equipment.
(4) other electronic installations with data interaction function.
The embodiment of the present application provides a kind of non-volatile computer readable storage medium storing program for executing, the computer-readable storage medium
Matter is stored with computer executable instructions, and the computer executable instructions are executed by one or more processors, such as in Figure 10
A processor 101, may be such that said one or multiple processors can perform the low-power consumption in above-mentioned any means embodiment
Bluetooth data communication method, for example, performing the method and step 61 in the method and step 21 in Fig. 2 described above, Fig. 6.
Device embodiment described above is only schematical, wherein the unit illustrated as separating component can
To be or may not be physically separate, the part shown as unit can be or may not be physics list
Member, you can with positioned at a place, or can also be distributed on multiple NEs.It can be selected according to the actual needs
In some or all of module realize the purpose of this embodiment scheme.
Through the above description of the embodiments, those of ordinary skill in the art can be understood that each embodiment
The mode of general hardware platform can be added to realize by software, naturally it is also possible to pass through hardware.Those of ordinary skill in the art can
Realize that all or part of flow in above-described embodiment method can be by computer program to instruct the hard of correlation with understanding
Part is completed, and described program can be stored in a computer read/write memory medium, the program is upon execution, it may include as above
State the flow of the embodiment of each method.Wherein, described storage medium can be magnetic disc, CD, read-only memory (Read-
Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
Embodiments of the present invention are the foregoing is only, are not intended to limit the scope of the invention, it is every to utilize this
Equivalent structure or equivalent flow conversion that description of the invention and accompanying drawing content are made, or directly or indirectly it is used in other correlations
Technical field, is included within the scope of the present invention.