CN110198533A - A kind of method and BLE bluetooth equipment of long-range control BLE bluetooth equipment - Google Patents
A kind of method and BLE bluetooth equipment of long-range control BLE bluetooth equipment Download PDFInfo
- Publication number
- CN110198533A CN110198533A CN201810159546.XA CN201810159546A CN110198533A CN 110198533 A CN110198533 A CN 110198533A CN 201810159546 A CN201810159546 A CN 201810159546A CN 110198533 A CN110198533 A CN 110198533A
- Authority
- CN
- China
- Prior art keywords
- attribute
- bluetooth equipment
- ble bluetooth
- attribute type
- control
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
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/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/11—Allocation or use of connection identifiers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The present invention is suitable for technical field of bluetooth communication, provide the method and BLE bluetooth equipment of a kind of long-range control BLE bluetooth equipment, the described method includes: obtaining customized Service Properties table, receive the control data bag of the 2nd BLE bluetooth equipment transmission, parse control data bag, obtain attribute type, if finding attribute type in customized Service Properties table, corresponding configuration format is then obtained according to attribute type, attribute value is substituted into configuration format, operational order is generated, and corresponding operation is executed according to operational order.The present invention in customized Service Properties table by finding the corresponding configuration format of attribute type, attribute value is substituted into configuration format, generate operational order, and corresponding operation is executed according to operational order, to solve the problems, such as mode by manually being controlled, there are operating efficiency is low and high labor cost.
Description
Technical field
The invention belongs to technical field of bluetooth communication, more particularly to a kind of long-range control BLE (Bluetooth Low
Energy, low-power consumption bluetooth) bluetooth equipment method and BLE bluetooth equipment.
Background technique
With the social horizontal continuous development with science and technology, the application field of bluetooth is more and more wider, when the long-range control of needs
When BLE bluetooth equipment processed, control content is usually sent to the corresponding terminal of user (for example, mobile phone), then user is according to end
Control content on end carries out control bluetooth equipment.
There are problems that operating efficiency is low and high labor cost by the mode manually controlled in the prior art.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of methods of long-range control BLE bluetooth equipment and BLE bluetooth to set
It is standby, by solve the problems, such as in the prior art by manually being controlled in a manner of there are operating efficiency is low and high labor cost.
The first aspect of the embodiment of the present invention provides a kind of method of long-range control BLE bluetooth equipment, which is characterized in that
Applied to the first BLE bluetooth equipment, the method for the long-range control BLE bluetooth equipment includes:
Obtain customized Service Properties table.
Receive the control data bag of the 2nd BLE bluetooth equipment transmission.
The control data bag is parsed, attribute type and attribute value are obtained.
If finding the attribute type in the customized Service Properties table, according to attribute type acquisition pair
The configuration format answered.
The attribute value is substituted into the configuration format, generates operational order, and execute accordingly according to operational order
Operation.
The second aspect of the embodiment of the present invention provides a kind of BLE bluetooth equipment, comprising:
Information module is obtained, for obtaining customized Service Properties table.
Receiving module, for receiving the control data bag of the 2nd BLE bluetooth equipment transmission.
Parsing module obtains attribute type and attribute value for parsing the control data bag.
Configuration format module is obtained, if for finding the attribute type in the customized Service Properties table,
Corresponding configuration format is obtained according to the attribute type.
Processing module generates operational order, and refer to according to operation for substituting into the attribute value in the configuration format
It enables and executes corresponding operation.
The third aspect of the embodiment of the present invention provides a kind of BLE bluetooth equipment, including memory, processor and storage
In the memory and the computer program that can run on the processor, the processor execute the computer program
The step of Shi Shixian method as described above.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage
Media storage has the step of computer program, the computer program realizes method as described above when being executed by processor.
Existing beneficial effect is the embodiment of the present invention compared with prior art: the present embodiment is by obtaining customized service
Attribute list receives the control data bag that the 2nd BLE bluetooth equipment is sent, and parses control data bag, obtains attribute type, if certainly
It defines in Service Properties table and finds attribute type, then corresponding configuration format is obtained according to attribute type, attribute value is substituted into
In the configuration format, operational order is generated, and corresponding operation is executed according to operational order.The present embodiment passes through customized
The corresponding configuration format of attribute type is found in Service Properties table, attribute value is substituted into configuration format, generates operational order,
And corresponding operation is executed according to operational order, to efficiently solve, by the mode that is manually controlled, that there are operating efficiencies is low
And the problem of high labor cost, long-range control BLE bluetooth equipment is effectively realized, operating efficiency is improved.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some
Embodiment for those of ordinary skill in the art without creative efforts, can also be attached according to these
Figure obtains other attached drawings.
Fig. 1 is the implementation process schematic diagram of the method for long-range control BLE bluetooth equipment provided by one embodiment of the present invention;
Fig. 2 is the schematic diagram of bluetooth protocol repertory provided by one embodiment of the present invention;
Fig. 3 is the specific implementation flow schematic diagram of step S103 in Fig. 1 provided by one embodiment of the present invention;
Fig. 4 is the structural schematic diagram of BLE bluetooth equipment provided by one embodiment of the present invention;
Fig. 5 is the structural schematic diagram of parsing module in Fig. 4 provided by one embodiment of the present invention;
Fig. 6 is the structural schematic diagram of BLE bluetooth equipment provided by one embodiment of the present invention.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed
Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific
The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity
The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
Embodiment 1:
Fig. 1 shows the implementation process of the method for the long-range control BLE bluetooth equipment of one embodiment of the present of invention offer,
The process executing subject of the embodiment of the present invention can be the first BLE bluetooth equipment, and details are as follows for process:
In step s101, customized Service Properties table is obtained.
In an embodiment of the invention, before step S101, comprising:
1) baseband communication is established with the 2nd BLE bluetooth equipment.
2) after being successfully established baseband communication, the control of logic-based link and adapting protocol are built with the 2nd BLE bluetooth equipment
Vertical logic channel connection.
3) after being successfully established logic channel connection, customized Service Properties table is read from the 2nd BLE bluetooth equipment.
In one embodiment, as shown in Fig. 2, low-power consumption bluetooth protocol stack includes host (HOST) and controller
(Controller)。
Wherein, host machine part includes: logic link control and adapting protocol (Logical Link Control and
Adaptation Protocol, L2CAP), safety management (Security Manager, SM), attribute agreement (Attribute
Protocol, ATT), general-purpose accessing configuration file (Generic Access Profile, GAP) and general-purpose attribute configuration file
(Generic Attribute Profile, GATT).
Wherein, controller part include physical layer (Physical Layer, PHY), link layer (Link Layer, LL) and
Host Control Interface layer (Host Controller Interface, HCI).
In one embodiment, physical layer includes base band (Baseband) layer and radio frequency (Radio Frequency) layer.
In the present embodiment, when the first BLE bluetooth equipment sends data, baseband layer will be believed from the data on base band upper layer
Breath carries out channel coding, and is transmitted to radio layer and is sent.When the first BLE bluetooth equipment receives data, radio layer is by solution
It recalls to complex data and is uploaded to baseband layer, baseband layer carries out channel decoding to data again, to base band upper layer transport.
In the present embodiment, baseband layer can manage ACL (Asynchronous Connection Less, it is asynchronous without even
Connect) physical link.
In the present embodiment, it is that the first BLE bluetooth equipment and the 2nd BLE bluetooth equipment pass through physics chain that baseband communication is practical
Road communication, the first BLE bluetooth equipment and the 2nd BLE bluetooth equipment establish ACL physical link, receive the 2nd BLE bluetooth equipment hair
The packet data package sent, baseband layer are managed ACL physical link.
In the present embodiment, ACL physical link is directive sending data packet, it had both supported symmetrically to connect, and it is not right also to support
Claim connection, both can be one-to-one, it can also be one-to-many.Main equipment baseband layer is responsible for controlling link bandwidth, and determines in piconet
Each of the symmetry of how many bandwidth and connection can be occupied from equipment.Data could be transmitted when only selected from equipment,
In, main equipment is the equipment initiated the connection, is the equipment for receiving connection from equipment.
In one embodiment, customized Service Properties table is remotely to control specification according to audio/video to generate, and is made by oneself
Adopted Service Properties table includes attribute handle value, standard attribute type and attribute value.
In the present embodiment, audio/video remotely control specification (Audio/Video Remote Control Profile,
AVRCP the feature of control stream media equipment, including pause, stopping, starting broadcasting, volume control and other classes) are defined how
The remote control operation of type.
In one embodiment, customized Service Properties table include preset quantity standard attribute type and with the mark
The quasi- one-to-one attribute handle value of attribute type.
In the present embodiment, customized Service Properties table further includes attribute value.
In the present embodiment, the 2nd BLE bluetooth equipment clustering audio/video remotely controls the feature of specification definition,
And by similar feature clustering be a service, a service may include several features, for example, will tune up volume characteristics with
Turning volume characteristics cluster down is volume service, corresponding according to the service of definition for each service one attribute handle value of distribution
Standard attribute type, attribute handle value and the customized Service Properties table of attribute value generation.
In the present embodiment, the 2nd BLE bluetooth equipment remotely controls the use of the feature of specification definition according to audio/video
Information generates configuration format, and configuration format is carried out with attribute handle value corresponding and each in customized Service Properties table
A standard attribute type is corresponding with an attribute value.
In the present embodiment, attribute handle value is the index of configuration format, can be found by attribute handle corresponding
Configuration format, attribute handle are equivalent to the storage address of configuration format, can be addressed to corresponding configuration format by attribute handle.
Standard attribute type is service name and feature name, such as temperature service and height-regulating temperature profile.Attribute value is characterized specifically
Value, such as temperature is turned up 1 degree.
In the present embodiment, audio/video can also be got from Custom Attributes table by attribute type remotely to control
The corresponding CID value of specification processed and PSM value, audio/video remotely controls the corresponding CID value of specification and PSM value is attribute value.
In the present embodiment, the first BLE bluetooth equipment connects advertisement by what the 2nd BLE bluetooth equipment of scanning was sent,
When receiving when connecting advertisement of the 2nd BLE bluetooth equipment, the first BLE bluetooth equipment can initiate the connection request, and the 2nd BLE is blue
After tooth equipment receives the connection request of the first BLE bluetooth equipment, prepare to receive first data that the first BLE bluetooth equipment is sent
Packet sets up ACL physical link after the completion of first data pack receiving and transmitting confirms, advertisement is the second bluetooth equipment to default
The data packet of BLE bluetooth equipment broadcast in region, can connect advertisement can be by the second indigo plant for the BLE equipment in predeterminable area
The data packet of tooth device broadcasts and the second bluetooth equipment establish connection.
In the present embodiment, the corresponding CID of attribute agreement (Channel ID, channel logo) value is as the first channel logo
Value, the first BLE bluetooth equipment are initiated the logic channel that channel logo is the first Channel Identification Value and are connected, wherein channel logo is
The logic channel of first Channel Identification Value is used for transmission the data packet generated based on ATT agreement, the 2nd BLE bluetooth equipment response the
The logic channel connection that one BLE bluetooth equipment issues, is built by logic link control and adapting protocol and the 2nd BLE bluetooth equipment
The L2CAP channel that vertical logic channel, i.e. channel logo are the first channel logo, wherein the corresponding CID value of attribute agreement is defaulted as
4。
In one embodiment, it after the first BLE bluetooth equipment gets customized Service Properties table, disconnects and second
The channel logo that BLE bluetooth equipment is established is the connection of the L2CAP channel of the first channel logo.
In step s 102, the control data bag that the 2nd BLE bluetooth equipment is sent is received.
In one embodiment, step S102 includes:
1) it obtains audio/video and remotely controls the corresponding CID value of specification, and as second channel ident value.
2) it obtains audio/video and remotely controls the corresponding PSM of specification (Protocol/Service Multiplexer, association
Discuss service multiplexing) value.
3) control of logic-based link and adapting protocol, establishing channel logo with the 2nd BLE bluetooth equipment is second channel
The logic channel of ident value.
4) after being successfully established the logic channel that the channel logo is the second channel ident value, the 2nd BLE is received
The control data bag that bluetooth equipment is sent.
In the present embodiment, the 2nd BLE bluetooth equipment based on audio/video remotely control specification definition data format with
And corresponding attribute type and corresponding attribute value generation control instruction are operated, logically link control is provided with adapting protocol
Data format, data format as defined in logic link control and adapting protocol includes length and the position of PSM value, and control is referred to
Order remotely controls the corresponding PSM value of specification with audio/video and is packaged into control data bag.Then initiate channel logo be audio/
Video Remote controls the logic channel of the corresponding CID value of specification, after the first BLE bluetooth equipment receives Logical Channel Requests,
Respond request simultaneously establishes logic channel with the 2nd BLE bluetooth equipment, wherein channel logo is that the logic of second channel ident value is believed
Road indicates that the protocol type of transmission is that audio/video remotely controls specification, and audio/video remotely controls the corresponding PSM value of specification
It is used to indicate logic link control and adapting protocol upper-layer protocol the corresponding PSM value of specification is remotely controlled by audio/video and know
Control instruction corresponding protocol type in road is that audio/video remotely controls specification, to remotely control specification according to audio/video
Carry out parsing control instruction.
By taking a concrete application scene as an example, it is desirable to device temperature are turned up 1 degree, then operate corresponding attribute type as temperature
Temperature is turned up in degree service, and attribute value is 1 degree, and specification definition is remotely controlled according to attribute type, attribute value and audio/video
Data format generate control instruction.
In the present embodiment, by being identified to logic channel, logic channel is enable to transmit various protocols, thus real
The multiplexing for having showed logic channel improves the utilization rate of channel.
In step s 103, control data bag is parsed, attribute type and attribute value are obtained.
In the present embodiment, after the first BLE bluetooth equipment receives control data bag, by control data bag and logical links
Control is matched with the data format that adapting protocol defines, and is extracted control instruction and audio/video and is remotely controlled specification pair
The PSM value answered remotely controls the corresponding PSM value acquisition audio/video of specification according to audio/video and remotely controls specification definition
Data format, the data format that audio/video is remotely controlled to specification definition are matched with control instruction, extract Attribute class
Type and attribute value.
In one embodiment, command format and the action message that specification definition is remotely controlled according to audio/video are direct
Control instruction is generated, action message is used to indicate the first BLE bluetooth equipment and executes corresponding operation according to action message, according to patrolling
Link control and data format as defined in adapting protocol are collected, logic link control includes with data format as defined in adapting protocol
Control instruction and audio/video are remotely controlled the corresponding PSM value of specification and are packaged into control data by the length of PSM value and position
Packet.Then initiating channel logo is the logic channel that audio/video remotely controls the corresponding CID value of specification, when the first BLE bluetooth
After equipment receives Logical Channel Requests, respond request simultaneously establishes logic channel with the 2nd BLE bluetooth equipment, when the first BLE indigo plant
After tooth equipment receives control data bag, data format that control data bag and logic link control and adapting protocol are defined into
Row matching, extracts control instruction and audio/video and remotely controls the corresponding PSM value of specification, remotely controlled according to audio/video
The corresponding protocol type of the corresponding PSM value identification control instruction of specification is that audio/video remotely controls specification, passes through audio/view
The long-range control specification parsing control instruction of frequency, extracts action message, corresponding operation is executed according to action message, to realize
By AVRCP agreement the first BLE bluetooth equipment is directly controlled, bluetooth equipment energy consumption can be effectively reduced.
In step S104, if the attribute type is found in customized Service Properties table, according to attribute type
Obtain corresponding configuration format.
In an embodiment of the invention, the customized Service Properties table include preset quantity standard attribute type with
And with the one-to-one attribute handle value of the standard attribute type, step S104 includes:
If 1) find standard attribute type identical with attribute type in customized Service Properties table, obtain identical
The corresponding attribute handle value of standard attribute type as objective attribute target attribute handle value.
2) configuration format corresponding with objective attribute target attribute handle value is obtained.
In the present embodiment, search whether there is standard attribute identical with attribute type in customized Service Properties table
Type, when finding standard attribute type identical with attribute type in customized Service Properties table, then obtain and attribute
The corresponding attribute handle value of the identical standard attribute handle value of type, and using attribute handle value as objective attribute target attribute handle value,
The corresponding configuration format of objective attribute target attribute handle value is searched in local data base.
In step s105, attribute value is substituted into configuration format, generates operational order, and phase is executed according to operational order
The operation answered.
In the present embodiment, attribute value is substituted into configuration format, generates operational order, is held according to the operational order of generation
Row corresponding operation, for example, volume is tuned up, to realize the long-range control of the first BLE bluetooth equipment.
By taking a concrete application scene as an example, attribute value is 1 degree, when attribute type is temperature service and height-regulating room temperature
When, it has searched whether that standard attribute type is temperature service and room temperature is turned up in customized Service Properties table, has made by oneself
Found in adopted Service Properties table standard attribute be type attribute temperature service and be turned up room temperature when, obtain corresponding attribute
Handle value is 0x0002, then objective attribute target attribute handle value is 0x0002, in the local database, obtains objective attribute target attribute handle value
The corresponding configuration format of 0x0002 substitutes into attribute value in configuration format, generates operational order, and execute corresponding operation, from
And room temperature is turned up 1 degree.
In one embodiment, if not finding attribute type in customized Service Properties table, parsing failure is shown.
In the present embodiment, if not finding attribute type in customized Service Properties table, parsing failure is shown, and
Failure result is sent to the 2nd BLE bluetooth equipment.
Preferably, if attribute type is sent to second to find attribute type in customized Service Properties table
BLE bluetooth equipment, the 2nd BLE bluetooth equipment judge whether attribute type meets audio/video and remotely control specification, if meeting,
An attribute handle value then is distributed for attribute type, and is added in customized Service Properties table.
It in the present embodiment, will by finding the corresponding configuration format of attribute type in customized Service Properties table
Attribute value substitutes into configuration format, operational order is generated, and execute corresponding operation according to operational order, to efficiently solve
There are problems that operating efficiency is low and high labor cost by the mode manually controlled, effectively realizes long-range control BLE
Bluetooth equipment improves operating efficiency.
In the present embodiment, specification is remotely controlled by audio/video remotely to control BLE bluetooth equipment, improve
The safety of communication process, reduces the energy consumption of bluetooth equipment, and reduce the cost of exploitation.
As shown in figure 3, in one embodiment of the invention, step S103 is specifically included in embodiment corresponding to Fig. 1:
In step s 201, the corresponding data format of logical link control and adaptation protocol is obtained.
In the present embodiment, data format corresponding to logical link control and adaptation protocol is locally being obtained.
In step S202, by control data bag data format progress corresponding with logical link control and adaptation protocol
Match, extracts control instruction.
In the present embodiment, by control data bag data format corresponding with the logical link control and adaptation protocol of acquisition
It is matched, and extracts control instruction and audio/video and remotely control the corresponding PSM value of specification.
In step S203, obtains audio/video and remotely control the corresponding data format of specification.
In the present embodiment, show that the logic channel established is used for transmission the corresponding agreement of channel logo according to channel logo
Type, the first BLE bluetooth equipment and the 2nd BLE bluetooth equipment are believed by establishing the logic that channel logo is second channel ident value
Road connection, the protocol type that can be transmitted is that audio/video remotely controls specification, due on logical link control and adaptation protocol
Layer protocol can not understand the corresponding protocol type of data by channel logo, so needing to identify that data are corresponding by PSM
Type, the first BLE bluetooth equipment is remotely controlled the corresponding PSM value of specification and can be controlled out with Direct Recognition by audio/video to be referred to
Enabling corresponding protocol type is that audio/video remotely controls specification, and it is corresponding remotely to control specification from local acquisition audio/video
Data format.
In step S204, the control instruction and the audio/video are remotely controlled into the corresponding data format of specification
It is matched, extracts attribute type and attribute value.
In the present embodiment, the data format that audio/video is remotely controlled to specification definition is compared with control instruction,
Extract the attribute type and attribute value of attribute.
In the present embodiment, by by control data bag data format corresponding with logical link control and adaptation protocol into
Row matching, obtains control instruction, by the way that control instruction remotely to be controlled to specification corresponding data format progress with audio/video
Match, obtain attribute type and attribute value, to have laid a good foundation for subsequent operation.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process
Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit
It is fixed.
Embodiment 2:
Fig. 4 shows the BLE bluetooth equipment 100 of one embodiment of the present of invention offer, for executing reality corresponding to Fig. 1
Apply the method and step in example comprising:
Information module 110 is obtained, for obtaining customized Service Properties table.
Receiving module 120, for receiving the control data bag of the 2nd BLE bluetooth equipment transmission.
Parsing module 130 obtains attribute type and attribute value for parsing control data bag.
Configuration format module 140 is obtained, if for finding attribute type in customized Service Properties table, according to category
Property type obtain corresponding configuration format.
Processing module 150 generates operational order, and refer to according to operation for substituting into the attribute value in configuration format
It enables and executes corresponding operation.
In one embodiment, information module is obtained further include:
Baseband communication unit, for establishing baseband communication with the 2nd BLE bluetooth equipment;
Channel communication unit, for after being successfully established the baseband communication, the control of logic-based link and adapting protocol,
Logic channel is established with the 2nd BLE bluetooth equipment to connect;
Read information unit, for when be successfully established the logic channel connect after, from the 2nd BLE bluetooth equipment
Read the customized Service Properties table.
In one embodiment, customized Service Properties table include preset quantity standard attribute type and with the mark
The quasi- one-to-one attribute handle value of attribute type.
In one embodiment, obtaining configuration format module 140 includes:
Template(-let) is obtained, if for finding standard attribute identical with attribute type in customized Service Properties table
Type then obtains attribute handle value corresponding with identical standard attribute type as objective attribute target attribute handle value.
Protocol element is obtained, for obtaining configuration format corresponding with objective attribute target attribute handle value.
In one embodiment, BLE bluetooth equipment 100 further include:
Display module, if showing solution for not finding the attribute type in the customized Service Properties table
Analysis failure.
As shown in figure 5, in one embodiment, parsing module 130 specifically includes in embodiment corresponding to Fig. 4:
First obtains format unit 131, for obtaining the corresponding data format of logical link control and adaptation protocol.
First extracts data cell 132, is used for control data bag number corresponding with logical link control and adaptation protocol
It is matched according to format, extracts control instruction.
Second obtains format unit 133, remotely controls the corresponding data format of specification for obtaining audio/video.
Second extracts data cell 134, for control instruction and the audio/video remotely to be controlled the corresponding number of specification
It is matched according to format, extracts attribute type and attribute value.
In one embodiment, BLE bluetooth equipment 100 further includes other function module/unit, for realizing embodiment 1
In method and step in each embodiment.
Embodiment 3:
Fig. 6 is the schematic diagram for the BLE bluetooth equipment that one embodiment of the invention provides.As shown in fig. 6, the BLE of the embodiment
Bluetooth equipment 6 includes: processor 60, memory 61 and is stored in the memory 61 and can transport on the processor 60
Capable computer program 62.The processor 60 realizes each reality as described in example 1 above when executing the computer program 62
The step of applying, such as step S101 shown in FIG. 1 to step S105.Alternatively, the processor 60 executes the computer journey
The function of each module/unit in each system embodiment as described in example 2 above, such as module shown in Fig. 4 are realized when sequence 62
110 to 150 function.
Illustratively, the computer program 62 can be divided into one or more module/units, it is one or
Multiple module/units are stored in the memory 61, and are executed by the processor 60, to complete the present invention.Described one
A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for
Implementation procedure of the computer program 62 in the BLE bluetooth equipment 6 is described.For example, the computer program 62 can be with
It is divided into acquisition information module, receiving module, parsing module, obtains configuration format module and position deviation obtains module.Respectively
Module concrete function is as follows:
Information module is obtained, for obtaining customized Service Properties table.
Receiving module, for receiving the control data bag of the 2nd BLE bluetooth equipment transmission.
Parsing module obtains attribute type and attribute value for parsing control data bag.
Configuration format module is obtained, if for finding attribute type in customized Service Properties table, according to attribute
Type obtains corresponding configuration format.
Processing module generates operational order, and hold according to operational order for substituting into the attribute value in configuration format
Row corresponding operation.
The BLE bluetooth equipment 6 can be the calculating such as desktop PC, notebook, palm PC and cloud server
Equipment.The BLE bluetooth equipment 6 may include, but be not limited only to, processor 60, memory 61.Those skilled in the art can manage
Solution, Fig. 6 is only the example of BLE bluetooth equipment 6, does not constitute the restriction to BLE bluetooth equipment 6, may include than illustrating more
More or less component perhaps combines certain components or different components, such as the BLE bluetooth equipment can also include
Input-output equipment, network access equipment, bus etc..
Alleged processor 60 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng.
The memory 61 can be the internal storage unit of the BLE bluetooth equipment 6, such as BLE bluetooth equipment 6 is hard
Disk or memory.The memory 61 is also possible to the External memory equipment of the BLE bluetooth equipment 6, such as the BLE bluetooth is set
The plug-in type hard disk being equipped on standby 6, intelligent memory card (Smart Media Card, SMC), secure digital (Secure
Digital, SD) card, flash card (Flash Card) etc..Further, the memory 61 can also both include the BLE blue
The internal storage unit of tooth equipment 6 also includes External memory equipment.The memory 61 for store the computer program with
And other programs and data needed for the BLE bluetooth equipment.The memory 61 can be also used for temporarily storing defeated
Out or the data that will export.
Embodiment 4:
The embodiment of the invention also provides a kind of computer readable storage medium, computer-readable recording medium storage has meter
Calculation machine program is realized the step in each embodiment as described in example 1 above, such as is schemed when computer program is executed by processor
Step S101 shown in 1 to step S105.Alternatively, realizing when the computer program is executed by processor such as institute in embodiment 2
The function of each module/unit in each system embodiment stated, such as the function of module 110 to 150 shown in Fig. 4.
The computer program can be stored in a computer readable storage medium, and the computer program is by processor
When execution, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, the computer program includes computer program code,
The computer program code can be source code form, object identification code form, executable file or certain intermediate forms etc..Institute
State computer-readable medium may include: can carry the computer program code any entity or device, recording medium,
USB flash disk, mobile hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), arbitrary access
Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It needs
It is bright, the content that the computer-readable medium includes can according in jurisdiction make laws and patent practice requirement into
Row increase and decrease appropriate, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electricity
Carrier signal and telecommunication signal.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment
The part of load may refer to the associated description of other embodiments.
The steps in the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.
Module or unit in system of the embodiment of the present invention can be combined, divided and deleted according to actual needs.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/bluetooth equipment and method, it can be with
It realizes by another way.For example, device described above/bluetooth equipment embodiment is only schematical, for example, institute
The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as
Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately
A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device
Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality
Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each
Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified
Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all
It is included within protection scope of the present invention.
Claims (10)
1. a kind of method of long-range control BLE bluetooth equipment, which is characterized in that it is applied to the first BLE bluetooth equipment, it is described long-range
Control BLE bluetooth equipment method include:
Obtain customized Service Properties table;
Receive the control data bag of the 2nd BLE bluetooth equipment transmission;
The control data bag is parsed, attribute type and attribute value are obtained;
If finding the attribute type in the customized Service Properties table, obtained according to the attribute type corresponding
Configuration format;
The attribute value is substituted into the configuration format, generates operational order, and execute accordingly according to the operational order
Operation.
2. the method for long-range control BLE bluetooth equipment as described in claim 1, which is characterized in that described to obtain customized clothes
It is engaged in front of attribute list, comprising:
Baseband communication is established with the 2nd BLE bluetooth equipment;
After being successfully established the baseband communication, the control of logic-based link and adapting protocol, with the 2nd BLE bluetooth equipment
Establish logic channel connection;
After being successfully established logic channel connection, the customized service is read from the 2nd BLE bluetooth equipment and is belonged to
Property table.
3. the method for long-range control BLE bluetooth equipment as described in claim 1, which is characterized in that the parsing control
Data packet obtains attribute type and attribute value, comprising:
Obtain the corresponding data format of the logical link control and adaptation protocol;
Control data bag data format corresponding with the logical link control and adaptation protocol is matched, control is extracted
System instruction;
It obtains audio/video and remotely controls the corresponding data format of specification;
The control instruction and the audio/video are remotely controlled the corresponding data format of specification to match, described in extraction
Attribute type and the attribute value.
4. the method for long-range control BLE bluetooth equipment as described in claim 1, which is characterized in that the customized service belongs to
Property table include preset quantity standard attribute type and with the one-to-one attribute handle value of the standard attribute type;
If described find the attribute type in the customized Service Properties table, according to attribute type acquisition pair
The configuration format answered, comprising:
If finding standard attribute type identical with the attribute type in the customized Service Properties table, obtain with
The corresponding attribute handle value of the identical standard attribute type is as objective attribute target attribute handle value;
Obtain the configuration format corresponding with the objective attribute target attribute handle value.
5. the method for long-range control BLE bluetooth equipment as described in claim 1, which is characterized in that the method also includes:
If not finding the attribute type in the customized Service Properties table, parsing failure is shown.
6. a kind of BLE bluetooth equipment characterized by comprising
Information module is obtained, for obtaining customized Service Properties table;
Receiving module, for receiving the control data bag of the 2nd BLE bluetooth equipment transmission;
Parsing module obtains attribute type and attribute value for parsing the control data bag;
Configuration format module is obtained, if for finding the attribute type, basis in the customized Service Properties table
The attribute type obtains corresponding configuration format;
Processing module generates operational order, and refer to according to the operation for substituting into the attribute value in the configuration format
It enables and executes corresponding operation.
7. BLE bluetooth equipment as claimed in claim 6, which is characterized in that the parsing module includes:
First obtains format unit, for obtaining the corresponding data format of the logical link control and adaptation protocol;
First extracts data cell, is used for control data bag number corresponding with the logical link control and adaptation protocol
It is matched according to format, extracts control instruction;
Second obtains format unit, remotely controls the corresponding data format of specification for obtaining audio/video;
Second extracts data cell, for the control instruction and the audio/video remotely to be controlled the corresponding data of specification
Format is matched, and the attribute type and the attribute value are extracted.
8. BLE bluetooth equipment as claimed in claim 6, which is characterized in that the customized Service Properties table includes present count
The standard attribute type of amount and with the one-to-one attribute handle value of the standard attribute type;
The acquisition configuration format module includes:
Template(-let) is obtained, if for finding standard identical with the attribute type in the customized Service Properties table
Attribute type then obtains attribute handle value corresponding with the identical standard attribute type as objective attribute target attribute handle value;
Configuration format unit is obtained, for obtaining the configuration format corresponding with the objective attribute target attribute handle value.
9. a kind of BLE bluetooth equipment, including memory, processor and storage are in the memory and can be in the processor
The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to
The step of method of any one of 5 long-range control BLE bluetooth equipments.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists
In realization remotely controls bluetooth equipment as described in any one of claim 1 to 5 when the computer program is executed by processor
The step of method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810159546.XA CN110198533B (en) | 2018-02-26 | 2018-02-26 | Method for remotely controlling BLE Bluetooth device and BLE Bluetooth device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810159546.XA CN110198533B (en) | 2018-02-26 | 2018-02-26 | Method for remotely controlling BLE Bluetooth device and BLE Bluetooth device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110198533A true CN110198533A (en) | 2019-09-03 |
CN110198533B CN110198533B (en) | 2022-04-22 |
Family
ID=67750645
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810159546.XA Active CN110198533B (en) | 2018-02-26 | 2018-02-26 | Method for remotely controlling BLE Bluetooth device and BLE Bluetooth device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110198533B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021159239A1 (en) * | 2020-02-10 | 2021-08-19 | 深圳市汇顶科技股份有限公司 | Video transmission method and device |
WO2022165765A1 (en) * | 2021-02-05 | 2022-08-11 | Oppo广东移动通信有限公司 | Message exchange method and apparatus in internet of things, and computer device and storage medium |
CN115119539A (en) * | 2021-01-22 | 2022-09-27 | 华为技术有限公司 | Architecture framework for services that record physical layer characteristics |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101075828A (en) * | 2007-07-20 | 2007-11-21 | 中兴通讯股份有限公司 | Method for establishing connection between terminal and audio-frequency apparatus |
CN101488783A (en) * | 2008-01-17 | 2009-07-22 | 中兴通讯股份有限公司 | Method for controlling playing volume of Bluetooth media |
US20100079607A1 (en) * | 2008-09-30 | 2010-04-01 | Samsung Electronics Co., Ltd. | Method and system for managing an imaging device by an electronic device located remotely to the imaging device |
WO2010148900A1 (en) * | 2009-12-14 | 2010-12-29 | 中兴通讯股份有限公司 | Method and apparatus for switching audio channels and system and apparatus for media playing |
CN102064857A (en) * | 2009-11-18 | 2011-05-18 | 三星电子株式会社 | Method and apparatus for remote controlling bluetooth device |
CN102256007A (en) * | 2011-06-03 | 2011-11-23 | 深圳市同洲电子股份有限公司 | Method and device for controlling audio playing list according to Bluetooth earphone command and mobile terminal |
CN103118176A (en) * | 2013-01-16 | 2013-05-22 | 广东好帮手电子科技股份有限公司 | Method and system for achieving mobile phone voice control function through on-board host computer |
US20160198288A1 (en) * | 2015-01-02 | 2016-07-07 | Voxx International Corporation | Vehicle entertainment unit and method of controlling the same |
WO2017223165A1 (en) * | 2016-06-24 | 2017-12-28 | Dolby Laboratories Licensing Corporation | Wireless audio source switching |
-
2018
- 2018-02-26 CN CN201810159546.XA patent/CN110198533B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101075828A (en) * | 2007-07-20 | 2007-11-21 | 中兴通讯股份有限公司 | Method for establishing connection between terminal and audio-frequency apparatus |
CN101488783A (en) * | 2008-01-17 | 2009-07-22 | 中兴通讯股份有限公司 | Method for controlling playing volume of Bluetooth media |
US20100079607A1 (en) * | 2008-09-30 | 2010-04-01 | Samsung Electronics Co., Ltd. | Method and system for managing an imaging device by an electronic device located remotely to the imaging device |
CN102064857A (en) * | 2009-11-18 | 2011-05-18 | 三星电子株式会社 | Method and apparatus for remote controlling bluetooth device |
WO2010148900A1 (en) * | 2009-12-14 | 2010-12-29 | 中兴通讯股份有限公司 | Method and apparatus for switching audio channels and system and apparatus for media playing |
CN102256007A (en) * | 2011-06-03 | 2011-11-23 | 深圳市同洲电子股份有限公司 | Method and device for controlling audio playing list according to Bluetooth earphone command and mobile terminal |
CN103118176A (en) * | 2013-01-16 | 2013-05-22 | 广东好帮手电子科技股份有限公司 | Method and system for achieving mobile phone voice control function through on-board host computer |
US20160198288A1 (en) * | 2015-01-02 | 2016-07-07 | Voxx International Corporation | Vehicle entertainment unit and method of controlling the same |
WO2017223165A1 (en) * | 2016-06-24 | 2017-12-28 | Dolby Laboratories Licensing Corporation | Wireless audio source switching |
Non-Patent Citations (2)
Title |
---|
SHICHAOGE: "蓝⽛之⼗⼀ AVRCP协议", 《HTTPS://BLOG.CSDN.NET/SHICHAOG/ARTICLE/DETAILS/52180723?UTM_SOURCE=ITDADAO&UTM_MEDIUM=REFERRAL》 * |
肖辉: "基于Android的蓝牙音频流播放器软件系统的研究", 《信息科技辑》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021159239A1 (en) * | 2020-02-10 | 2021-08-19 | 深圳市汇顶科技股份有限公司 | Video transmission method and device |
CN115119539A (en) * | 2021-01-22 | 2022-09-27 | 华为技术有限公司 | Architecture framework for services that record physical layer characteristics |
CN115119539B (en) * | 2021-01-22 | 2023-05-16 | 华为技术有限公司 | Method, apparatus and storage medium for recording service of physical layer characteristics |
WO2022165765A1 (en) * | 2021-02-05 | 2022-08-11 | Oppo广东移动通信有限公司 | Message exchange method and apparatus in internet of things, and computer device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110198533B (en) | 2022-04-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103747441B (en) | Wireless network access method and access device | |
CN109212983A (en) | Intelligent home furnishing control method, gateway and intelligent home control system | |
CN105635943B (en) | Low-power-consumption Bluetooth beacon data interaction device, beacon device and method | |
US20160132029A1 (en) | Method for configuring and controlling smart home products | |
CN101141348A (en) | Intelligent domestic system and safety implementing method | |
CN109041140B (en) | Method for rapidly switching wireless network, intelligent hardware and terminal equipment | |
CN110198533A (en) | A kind of method and BLE bluetooth equipment of long-range control BLE bluetooth equipment | |
CN105474669A (en) | Method and apparatus for providing persistent USB service for wireless USB devices | |
CN103957580A (en) | Rapid WIFI networking matching method and module for smart hardware | |
WO2019080719A1 (en) | Data processing method and device, storage medium, processor, and system | |
CN103716161B (en) | It is capable of the method and device of smart machine certification in server of remote control | |
CN111083654A (en) | Method for realizing control of wireless passive switch, wireless passive switch and proxy node | |
CN110266582A (en) | A kind of information push method, system, server and communication terminal | |
CN110505516A (en) | A kind of throwing screen control method, device and system | |
WO2018196463A1 (en) | Method and apparatus for network access, storage medium, and processor | |
WO2014169589A1 (en) | Intelligent terminal synchronous operation method and device | |
CN112637931A (en) | Method and device for establishing network connection | |
CN109510743B (en) | Rapid clustering method for intelligent sound box system | |
CN105246129B (en) | The network-building method and device of a kind of intelligent terminal | |
WO2022242207A1 (en) | Voice information processing method and system, and apparatus for processing voice information | |
CN110971533B (en) | Method, server apparatus, client apparatus, and medium for data communication | |
CN111010323A (en) | Network distribution method and system of intelligent equipment | |
CN110167193A (en) | WiFi matches network method and WiFi equipment automatically | |
CN110875945A (en) | Method, apparatus and medium for task processing on a generic service entity | |
CN113132997A (en) | Communication method, device and system of intelligent household equipment |
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 | ||
CB02 | Change of applicant information |
Address after: 510555 No. 107 Bowen Road, Huangpu District, Guangzhou, Guangdong Applicant after: Guangzhou Ankai Microelectronics Co.,Ltd. Address before: 3 / F, C1 area, innovation building, 182 science Avenue, Science City, Guangzhou, Guangdong 510663 Applicant before: ANYKA (GUANGZHOU) MICROELECTRONICS TECHNOLOGY Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |