CN105846863A - Bluetooth based operation method and device - Google Patents
Bluetooth based operation method and device Download PDFInfo
- Publication number
- CN105846863A CN105846863A CN201610379870.3A CN201610379870A CN105846863A CN 105846863 A CN105846863 A CN 105846863A CN 201610379870 A CN201610379870 A CN 201610379870A CN 105846863 A CN105846863 A CN 105846863A
- Authority
- CN
- China
- Prior art keywords
- bluetooth
- layer
- signal
- described terminal
- operation information
- 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
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000006870 function Effects 0.000 claims description 91
- 230000004044 response Effects 0.000 claims description 40
- 238000013459 approach Methods 0.000 claims description 10
- 241001062009 Indigofera Species 0.000 claims description 8
- 230000006399 behavior Effects 0.000 claims description 7
- 230000008569 process Effects 0.000 abstract description 18
- 238000004891 communication Methods 0.000 abstract description 11
- 238000005516 engineering process Methods 0.000 abstract description 6
- 230000008859 change Effects 0.000 abstract description 5
- 238000004806 packaging method and process Methods 0.000 abstract 3
- 238000010586 diagram Methods 0.000 description 6
- 238000005538 encapsulation Methods 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 238000010276 construction Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000003044 adaptive effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000005265 energy consumption Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B5/00—Near-field transmission systems, e.g. inductive or capacitive transmission systems
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Communication Control (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention relates to a Bluetooth based operation method and device, belongs to the field of communication technology, and aims at solving the problem that the development process is relatively complex when a Bluetooth module is adjusted in the prior art. A Bluetooth command packaging layer obtains an operation signal of a Bluetooth UI layer; according to the correspondence between the operation signal and operation information, the Bluetooth command packaging layer determines the operation information corresponding to the obtained operation signal; the Bluetooth command packaging layer sends the determined operation information to a Bluetooth protocol layer of a terminal; and according to the received operation information, the Bluetooth protocol layer carries out operation corresponding to the operation information. According to the invention, when the Bluetooth module is adjusted, it is only required to redefine the binding relation between operation information and operation but not change the Bluetooth UI layer; the operation method can be adapt to more types of Bluetooth modules, the development period is shorter, and the development process is simpler.
Description
Technical field
The present invention relates to communication technical field, particularly to a kind of operational approach based on bluetooth and equipment.
Background technology
Bluetooth (Bluetooth) is the radio of a kind of holding equipment short haul connection (usually within 10m)
Technology, can be at mobile phone, PDA (panel computer), wireless headset, notebook computer, related peripherals
Etc. carrying out wireless messages exchange between numerous equipment, this short-range wireless communication technology makes multiple intelligence
Terminal can be coupled together by bluetooth.
At present, along with constantly popularizing of intelligent television, most intelligent televisions add bluetooth radio function,
Make intelligent television pass through bluetooth, carry out wireless connections with other intelligent terminal or external equipment.And more
Carry out the most intelligent televisions and use (SuSE) Linux OS, in prior art, the intelligence of (SuSE) Linux OS
TV, when realizing Bluetooth function, uses flow process as shown in Figure 1: UI (User Interface, Yong Hujie
Face) layer is by function call mode, by calling profile (configuration file) different in Bluetooth protocol layer
Realize the function of bluetooth.Such as, the Bluetooth protocol layer that bluetooth module producer provides includes audio/video
Agreement and ble (bluetooth low energy, bluetooth low energy consumption) agreement, perform to open bluetooth at UI layer
During order, for audio/video agreement, need to call initialization function, initial configuration file letter successively
Number, call back function and open bluetooth function;For ble agreement, need to call successively initialization function, just
Beginningization configuration file function, call back function and open bluetooth function.Therefore, between UI layer and Bluetooth protocol layer
Need to define the substantial amounts of function that calls to realize Bluetooth function.
The bluetooth manufacturer used due to the intelligent television of (SuSE) Linux OS is the most unalterable, is providing
When the manufacturer of bluetooth module changes, the especially bluetooth protocol repertory at bluetooth module is not increased income or half-open
In the scene in source, after changing bluetooth module, calling function between UI layer and Bluetooth protocol layer needs again to determine
Justice, owing to UI layer function is the most integrated, after have changed original UI layer functions structure, in addition it is also necessary to carry out
Substantial amounts of reperformance test works so that the construction cycle when adjusting bluetooth module is the longest.
In sum, it is currently based on UI layer and directly invokes the method that function realizes Bluetooth function, to bluetooth
When module is adjusted so that the process of exploitation is more complicated.
Summary of the invention
The present invention provides a kind of operational approach based on bluetooth and equipment, is applied to the bluetooth that bluetooth manufacturer provides
In the scene that module is not increased income or partly increased income, directly invoke function in order to solve prior art based on UI layer
The method realizing Bluetooth function, when being adjusted bluetooth module so that the process of exploitation is more complicated
Problem.
The embodiment of the present invention provides a kind of operational approach based on bluetooth, including:
The Bluetooth command encapsulated layer of terminal obtains the operation signal of the bluetooth users interface UI layer of described terminal;
The Bluetooth command encapsulated layer of described terminal, according to operation signal and the corresponding relation of operation information, determines and obtains
The operation information that the described operation signal got is corresponding;
The described operation information determined is sent to the indigo plant of described terminal by the Bluetooth command encapsulated layer of described terminal
Tooth protocol layer;
The Bluetooth protocol layer of described terminal, according to the described operation information received, performs described operation information pair
The operation answered.
Owing to the terminal of the embodiment of the present invention includes Bluetooth command encapsulated layer, and this Bluetooth command encapsulated layer
Include operating signal and the corresponding relation of operation information;Bluetooth command encapsulated layer obtain operation signal after,
Operation signal according to storage and the corresponding relation of operation information, determine the operation that the operation signal of acquisition is corresponding
Information;The operation information determined is sent to Bluetooth protocol layer, Bluetooth protocol layer bluetooth by Bluetooth command encapsulated layer
In protocol layer, storage has the binding relationship of operation information and operation, and Bluetooth protocol layer is according to the operation letter received
Breath, performs the operation that operation information is corresponding.Wherein, the Bluetooth protocol layer that different vendor provides operates information
Different, i.e. when bluetooth manufacturer difference, for the operation of same bluetooth UI layer with the binding relationship of operation
Signal, the operation of corresponding Bluetooth protocol layer is different.After bluetooth manufacturer changes, due to prior art
Using UI layer to directly invoke the method that function realizes Bluetooth function, the operation corresponding at operation signal becomes
After change, need to redefine between bluetooth UI layer and Bluetooth protocol layer all calls function;And the present invention
Embodiment is after bluetooth manufacturer changes, it is only necessary to according to operating information and operation in new Bluetooth protocol layer
Binding relationship, the operation signal of new operation information and UI layer is carried out Reseal, obtains new indigo plant
Tooth order encapsulated layer, therefore, the embodiment of the present invention, when being adjusted bluetooth module, only need to redefine
Operation information and the binding relationship of operation, bluetooth UI layer is not required to do any change, the behaviour of the embodiment of the present invention
Make method can adaptive further types of bluetooth module, when being adjusted bluetooth module, the construction cycle is relatively
Short, the process of exploitation is fairly simple.
The opposing party is quick, and the embodiment of the present invention provides a kind of operation equipment based on bluetooth, including:
It is positioned at the acquisition module of the Bluetooth command encapsulated layer of terminal, for obtaining the bluetooth UI layer of described terminal
Operation signal;
It is positioned at the Bluetooth command encapsulated layer cover half block really of described terminal, for according to operation signal and operation letter
The corresponding relation of breath, determines the operation information that the described operation signal got is corresponding;
It is positioned at the sending module of the Bluetooth command encapsulated layer of described terminal, for by the described operation information determined
It is sent to the Bluetooth protocol layer of described terminal;
It is positioned at the control module of the Bluetooth protocol layer of described terminal, for according to the described operation letter received
Breath, performs the operation that described operation information is corresponding.
Accompanying drawing explanation
Fig. 1 is intelligent television Bluetooth function implementation method schematic diagram in background technology;
Fig. 2 is embodiment of the present invention Bluetooth function implementation method schematic diagram;
Fig. 3 is embodiment of the present invention flow chart based on bluetooth;
Fig. 4 is the overall flow figure of embodiment of the present invention operational approach based on bluetooth;
Fig. 5 is the structural representation of embodiment of the present invention operation based on bluetooth equipment.
Detailed description of the invention
The Bluetooth command encapsulated layer of the terminal of the embodiment of the present invention obtains the bluetooth users interface UI of described terminal
The operation signal of layer;The Bluetooth command encapsulated layer of described terminal is according to operation signal and the corresponding pass of operation information
System, determines the operation information that the described operation signal got is corresponding;The Bluetooth command encapsulated layer of described terminal
The described operation information determined is sent to the Bluetooth protocol layer of described terminal;The Bluetooth protocol layer of described terminal
According to the described operation information received, perform the operation that described operation information is corresponding.
Owing to the terminal of the embodiment of the present invention includes Bluetooth command encapsulated layer, and the encapsulation of this Bluetooth command
Layer includes operating signal and the corresponding relation of operation information;Bluetooth command encapsulated layer is obtaining operation signal
After, according to operation signal and the corresponding relation of operation information of storage, determine that the operation signal of acquisition is corresponding
Operation information;The operation information determined is sent to Bluetooth protocol layer by Bluetooth command encapsulated layer, and bluetooth is assisted
In view layer Bluetooth protocol layer, storage has the binding relationship of operation information and operation, and Bluetooth protocol layer is according to reception
The operation information arrived, performs the operation that operation information is corresponding.Wherein, the Bluetooth protocol that different vendor provides
Information is operated different with the binding relationship of operation, i.e. when bluetooth manufacturer difference, for same indigo plant in Ceng
The operation signal of tooth UI layer, the operation of corresponding Bluetooth protocol layer is different.In bluetooth, manufacturer changes
After, owing to prior art uses UI layer to directly invoke the method that function realizes Bluetooth function, at operation signal
After corresponding operation changes, need all tune redefining between bluetooth UI layer and Bluetooth protocol layer
Use function;And the embodiment of the present invention is after bluetooth manufacturer changes, it is only necessary to according to new Bluetooth protocol
Operate information and the binding relationship of operation in Ceng, the operation signal of new operation information and UI layer is carried out weight
New encapsulation, obtains new Bluetooth command encapsulated layer, and therefore, bluetooth module is being carried out by the embodiment of the present invention
During adjustment, only need to redefine the binding relationship of operation information and operation, bluetooth UI layer is not required to do any changing
Dynamic, the operational approach of the embodiment of the present invention can adaptive further types of bluetooth module, to bluetooth module
When being adjusted, the construction cycle is shorter, and the process of exploitation is fairly simple.
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with this
Accompanying drawing in bright embodiment, is clearly and completely described the technical scheme in the embodiment of the present invention,
Obviously, described embodiment is a part of embodiment of the present invention rather than whole embodiments.Based on
Embodiment in the present invention, those of ordinary skill in the art are obtained under not making creative work premise
The every other embodiment obtained, broadly falls into the scope of protection of the invention.
Below in conjunction with Figure of description, the embodiment of the present invention is described in further detail.
As in figure 2 it is shown, the schematic diagram of embodiment of the present invention Bluetooth function implementation method.Including bluetooth UI layer,
Communication layers one, Bluetooth command encapsulated layer, communication layers two and Bluetooth protocol layer.
Wherein, bluetooth UI layer is a single process, and Bluetooth command encapsulated layer and Bluetooth protocol layer are same
One process.Owing to bluetooth UI layer is different processes from Bluetooth command encapsulated layer, Bluetooth protocol layer, no
Cannot directly communicate with between process, therefore, the communication between bluetooth UI layer and Bluetooth command encapsulated layer
Layer one can communicate in the way of using shared drive.Between Bluetooth command encapsulated layer and Bluetooth protocol layer
Communication layers two can be in the way of using function call, it is achieved between Bluetooth command encapsulated layer and Bluetooth protocol layer
Communication.
It should be noted that communication layers two and Bluetooth protocol layer are that Bluetooth protocol manufacturer is predefined.Bluetooth
Order encapsulated layer is the operation information provided according to Bluetooth protocol manufacturer, operation information and bluetooth UI layer is sent out
The operation signal sent is bound, and carries out encapsulation process, is encapsulated as Bluetooth command encapsulated layer.
Embodiment of the present invention Bluetooth control commands includes but not limited to:
Open Bluetooth switch, close Bluetooth switch, scanning device, pairing connect, disconnect, Hui Lian;
Embodiment of the present invention Bluetooth operation order also includes order in particular cases, such as about
Audio/video operates, including:
Increase volume, reduce volume, play, close, suspend, next song bent, upper.
The all corresponding operation signal of each Bluetooth control commands of the embodiment of the present invention, is determining that needs are held
During row Bluetooth control commands, bluetooth UI layer generates the operation signal that this control command is corresponding.Such as, open
The operation signal that the control command of Bluetooth switch is corresponding is BT_OPEN_CMD;Close the control of Bluetooth switch
The operation signal of system order correspondence is BT_CLOSE_CMD;The operation that the control command of scanning device is corresponding
Signal is BT_SCAN_CMD.
The Bluetooth command encapsulated layer encapsulation of the embodiment of the present invention is operation signal and the correspondence of operation information
Relation.
Optionally, the operation information of the embodiment of the present invention is for calling function.
Such as, when operating signal and being BT_OPEN_CMD, corresponding operation information is bt_open () letter
Number;When operating signal and being BT_CLOSE_CMD, corresponding operation information is bt_close () function;
When operating signal and being BT_SCAN_CMD, corresponding operation information is bt_scan () function.
Below with the process of an example explanation Bluetooth command encapsulated layer encapsulation.
Such as, Bluetooth control commands include opening Bluetooth switch, close Bluetooth switch, scanning device, broadcasting,
Suspend;The operation signal opening Bluetooth switch order corresponding is BT_OPEN_CMD, and operates signal
Operation information corresponding for BT_OPEN_CMD is bt_open () function;Close Bluetooth switch order corresponding
Operation signal is BT_CLOSE_CMD, and operates operation letter corresponding for signal BT_CLOSE_CMD
Breath is bt_close () function;Operation signal corresponding to scanning device is BT_SCAN_CMD, and operates
Operation information corresponding for signal BT_SCAN_CMD is bt_scan () function;Play corresponding operation signal
For BT_PLAY_CMD, and to operate operation information corresponding for signal BT_PLAY_CMD be bt_play ()
Function;Suspending corresponding operation signal is BT_STOP_CMD, and operates signal BT_STOP_CMD
Corresponding operation information is bt_stop () function.
Then it is packaged processing, the most as shown in table 1 by operation signal and operation information:
Table 1
Operation signal | Operation information |
BT_OPEN_CMD | Bt_open () function |
BT_CLOSE_CMD | Bt_close () function |
BT_SCAN_CMD | Bt_scan () function |
BT_PLAY_CMD | Bt_play () function |
BT_Stop_CMD | Bt_stop () function |
As it is shown on figure 3, embodiment of the present invention operational approach based on bluetooth, including:
Step 301, the Bluetooth command encapsulated layer of terminal obtain the behaviour of the bluetooth users interface UI layer of described terminal
Make signal;
Step 302, the Bluetooth command encapsulated layer of described terminal close according to operation signal and the corresponding of operation information
System, determines the operation information that the described operation signal got is corresponding;
The described operation information determined is sent to described by step 303, the Bluetooth command encapsulated layer of described terminal
The Bluetooth protocol layer of terminal;
Step 304, described terminal Bluetooth protocol layer according to the described operation information received, perform described
The operation that operation information is corresponding.
The Bluetooth command encapsulated layer of the terminal of the embodiment of the present invention is the process identical with Bluetooth protocol layer, and
Bluetooth command encapsulated layer includes the corresponding relation operating signal with operation information.Bluetooth command encapsulated layer is obtaining
After getting the operation signal of bluetooth UI layer, according to operation signal and the corresponding relation of operation information, determine this
The operation information that control signal is corresponding, and the operation information determined is sent to Bluetooth protocol layer.
The Bluetooth protocol layer of the embodiment of the present invention receive Bluetooth command encapsulated layer send operation information after,
Perform the operation that described operation information is corresponding.
Concrete, the Bluetooth protocol layer of described terminal, according to operation information and the binding relationship of operation, determines institute
State at least one operation that operation information is corresponding;The Bluetooth protocol layer of described terminal performs the operation determined.
The Bluetooth protocol layer of the embodiment of the present invention has pre-defined the binding relationship of operation information and operation, each
The corresponding one or more operations of individual operation information.
It should be noted that when operation information is for calling function, operation corresponding to operation information is that son calls
Function.
Such as, when Bluetooth control commands is for opening Bluetooth switch, the operation signal that bluetooth UI layer generates is
BT_OPEN_CMD, and at operation signal BT_OPEN_CMD pair of Bluetooth command encapsulated layer definition
The operation information answered is for calling function bt_open () function;Assume that Bluetooth protocol layer includes ble agreement and hh
Agreement, when performing to open Bluetooth operation, for ble agreement, what bt_open () function was corresponding calls sub-letter
Number includes: the first initialization function, the first initial configuration function, the first call back function, first open letter
Number;For hh agreement, what bt_open () function was corresponding call subfunction includes: the second initialization function,
Second initial configuration function, the second call back function, second open function;Then operation letter in Bluetooth protocol layer
The most corresponding eight operations (son calls function) of breath bt_open () function.
Optionally, the signal that the Bluetooth command encapsulated layer of terminal is shared from the bluetooth UI layer with described terminal is deposited
Storage space obtains the operation signal of described bluetooth UI layer storage.
The operation signal of the bluetooth UI layer of the embodiment of the present invention, is when terminal determines that needs perform operation,
The bluetooth UI layer of terminal generates the operation signal that the Bluetooth operation needing to perform is corresponding, and by described operation letter
Number it is stored in the signal memory space shared with described Bluetooth command encapsulated layer.
Owing to the Bluetooth command encapsulated layer of the embodiment of the present invention is different processes from the bluetooth UI layer of terminal.
And the user's space of process is the most independent, it is however generally that can not access mutually, therefore in terminal
Bluetooth command encapsulated layer when needing to obtain the operation signal that bluetooth UI layer generates, need the bluetooth UI layer will be raw
The signal memory space that the operation signal write Bluetooth command encapsulated layer become is shared with bluetooth UI layer, so that blue
Tooth order encapsulated layer can get the operation signal that bluetooth UI layer generates.
Communication mode between Bluetooth command encapsulated layer and the bluetooth UI layer of the embodiment of the present invention includes but does not limits
In following manner:
1, pipeline (pipe);
2, message queue (message queue);
3, socket (socket);
4, shared drive (shared memory);
5, semaphore (semaphore).
Optionally, embodiment of the present invention Bluetooth command encapsulated layer and bluetooth UI layer use the mode of shared drive
Communicate.
And the signal memory space that the Bluetooth command encapsulated layer of the embodiment of the present invention is shared with bluetooth UI layer,
It is shared drive region.
Operation signal write, after generating operation signal, is shared by the bluetooth UI layer of embodiment of the present invention terminal
Region of memory;The Bluetooth command encapsulated layer continuous access shared drive region of terminal, from shared drive region
After getting operation signal, according to operation signal and the corresponding relation of operation information, determine this operation signal pair
The operation information answered, after determining operation information, is sent to Bluetooth protocol layer by this operation information;Bluetooth is assisted
View layer, according to the described operation information received, performs the operation that described operation information is corresponding.
Additionally, the Bluetooth protocol layer of described terminal is according to the described operation information received, perform described operation
After the operation that information is corresponding, Bluetooth protocol layer also needs to perform following operation:
The Bluetooth protocol layer of described terminal generates the response signal that described operation signal is corresponding;The indigo plant of described terminal
Described response signalisation is given the bluetooth UI layer of described terminal by tooth protocol layer.
Wherein, the response signal of the embodiment of the present invention includes responding into function signal and response failure signal.
Concrete, the Bluetooth protocol layer of terminal judges whether that all operations is carried out successfully;The most then generate
Respond into function signal;Otherwise, response failure signal is generated.
Owing to the Bluetooth protocol layer of embodiment of the present invention terminal is after receiving operation information, determine operation information
At least one corresponding operation.When the operation that operation information is corresponding is multiple, need determining operation information
After corresponding multiple operations are performed both by successfully, generate and respond into function signal;If multiple behaviour that operation information is corresponding
Middle existence operation is not carried out successfully, then generate response failure signal.
In enforcement, when multiple operation that the information of operation is corresponding, Bluetooth protocol layer predefines operation information pair
The execution sequence of the multiple operations answered, and Bluetooth protocol layer is when performing multiple operation, can be according to determining
Execution sequence performs successively.If the preceding operation of order performs failure, the most no longer perform operation below, and
Determine that operation corresponding to this operation information performs failure, generate response failure signal.
Such as, when operation information is for calling function bt_open () function, set in advance in Bluetooth protocol layer
The operation that bt_open () function is corresponding is followed successively by: initialization function, initial configuration function, call back function,
Open function.Then Bluetooth protocol layer is when the operation that execution bt_open () function is corresponding, first calls initialization
Function, if initialization function calls successfully, then continues to call initial configuration function;At initial configuration letter
After number calls successfully, continue to call call back function;After call back function calls successfully, continue to call and open letter
Number;After opening function call success, generate and respond into function signal.
If it addition, initialization function malloc failure malloc, then not continuing to call the operation that bt_open () function is corresponding,
And generate response failure signal.
The Bluetooth protocol layer of the embodiment of the present invention after determining the response signal that this operation signal is corresponding, terminal
Bluetooth protocol layer will response signalisation to the bluetooth UI layer of terminal.
Concrete, the embodiment of the present invention uses following manner will respond signalisation to bluetooth UI layer.
Optionally, the Bluetooth protocol layer of described terminal is by the bluetooth of the write of described response signal with described terminal
In the signal memory space that UI layer is shared, so that the bluetooth UI layer of described terminal is from described signal memory space
Middle acquisition described response signal.
In enforcement, the Bluetooth protocol layer of terminal is after generating response signal, in being written to response signal share
Deposit region.And Bluetooth protocol layer is when being written to shared drive region by response signal, it is by shared drive
Operation signal in region is rewritten as responding signal.
Such as, the operation signal that the bluetooth UI layer of terminal writes in shared drive region is
BT_OPEN_CMD;After the Bluetooth command encapsulated layer of terminal gets BT_OPEN_CMD operation signal,
Determine the operation information that BT_OPEN_CMD operation signal is corresponding, and this operation information is sent to terminal
Bluetooth protocol layer, Bluetooth protocol layer after receiving operation information, determine also operation information corresponding at least
One operation, and perform the operation determined.If the Bluetooth protocol layer of terminal judges that all operations is carried out successfully,
Then generating and respond into function signal BT_OPEN_SUCCESS, the Bluetooth protocol layer of terminal is by shared section key
BT_OPEN_CMD in territory is rewritten as BT_OPEN_SUCCESS.
It should be noted that the terminal of the embodiment of the present invention determines when needs perform operation, the bluetooth of terminal
UI layer generates the operation signal that the Bluetooth operation needing to perform is corresponding.Bluetooth due to embodiment of the present invention terminal
UI layer is a process, and this sequence lasts reads the information in shared drive region, if from shared drive
Region reads the response signal that operation signal is corresponding, however, it is determined that this response signal is for responding into function signal, then
The bluetooth UI layer of terminal performs to need operation to be performed;If it is determined that this response signal is response failure signal,
Then the bluetooth UI layer of terminal determines needs operation to be performed to perform failure.
Such as, the operation signal that the bluetooth UI layer of terminal writes in shared drive region is
BT_OPEN_CMD;After the Bluetooth command encapsulated layer of terminal gets BT_OPEN_CMD operation signal,
Determine operation information the bt_open () function that BT_OPEN_CMD operation signal is corresponding, and by this bt_open ()
Function is sent to the Bluetooth protocol layer of terminal, and Bluetooth protocol layer, after receiving bt_open () function, determines also
At least one operation that bt_open () function is corresponding, and perform the operation determined.If each operation is performed both by
Success, then the Bluetooth protocol layer of terminal generates and responds into function signal BT_OPEN_SUCCESS, terminal
BT_OPEN_CMD in shared drive region is rewritten as by Bluetooth protocol layer
BT_OPEN_SUCCESS;The bluetooth UI layer of terminal is reading BT_OPEN_SUCCESS response
After signal, perform to open the bluetooth icon in the operation of Bluetooth switch, i.e. operation interface and open;If there is behaviour
Make to perform failure, then the Bluetooth protocol layer of terminal generates response failure signal BT_OPEN_ERROR, eventually
The bluetooth of end needs layer to be rewritten as by the BT_OPEN_CMD in shared drive region
BT_OPEN_ERROR;The bluetooth UI layer of terminal is reading BT_OPEN_ERROR response signal
After, the bluetooth UI layer of terminal determines opens bluetooth failure.
As shown in Figure 4, the overall flow figure of embodiment of the present invention operational approach based on bluetooth.
Step 401, terminal determine that, when needs perform operation, the bluetooth UI layer of terminal generates the indigo plant needing to perform
The operation signal that tooth operation is corresponding;
This operation signal is write Bluetooth command encapsulated layer and bluetooth UI by step 402, the bluetooth UI layer of terminal
In the signal memory space that layer is shared;
Step 403, the Bluetooth command encapsulated layer of terminal obtain the storage of bluetooth UI layer from signal memory space
Operation signal;
Step 404, terminal Bluetooth command encapsulated layer according to operation signal and operation information corresponding relation,
Determine the operation information that the described operation signal got is corresponding;
The operation information determined is sent to the bluetooth association of terminal by step 405, the Bluetooth command encapsulated layer of terminal
View layer;
Step 406, terminal Bluetooth protocol layer according to the described operation information received, perform described operation
At least one operation that information is corresponding;
Step 407, the Bluetooth protocol layer of terminal judge whether that all operations is carried out successfully, if so, performing
Step 408, if it is not, perform step 409;
Step 408, the Bluetooth protocol layer of terminal generate and respond into function signal;
Step 409, the Bluetooth protocol layer of terminal generate response failure signal;
The described function signal that responds into is notified to the bluetooth of described terminal by step 410, the Bluetooth protocol layer of terminal
UI layer;
Operation signal in signal memory space is rewritten as responding into by step 411, the Bluetooth protocol layer of terminal
Function signal;
Step 412, the bluetooth UI layer of terminal obtain described response from described signal memory space and successfully believe
Number;
Described response failure signal is notified to the bluetooth of described terminal by step 413, the Bluetooth protocol layer of terminal
UI layer;
Operation signal in signal memory space is rewritten as response and loses by step 414, the Bluetooth protocol layer of terminal
Lose signal;
Step 415, the bluetooth UI layer of terminal obtain described response from described signal memory space and unsuccessfully believe
Number.
Based on same inventive concept, the embodiment of the present invention also provides for a kind of operation equipment based on bluetooth, due to
The principle operational approach based on bluetooth to the embodiment of the present invention that this equipment solves problem is similar, therefore this equipment
Enforcement may refer to the enforcement of method, repeat no more in place of repetition.
As it is shown in figure 5, embodiment of the present invention operation based on bluetooth equipment, including:
It is positioned at the acquisition module 501 of the Bluetooth command encapsulated layer of terminal, uses for obtaining the bluetooth of described terminal
The operation signal of interface, family UI layer;
It is positioned at the Bluetooth command encapsulated layer cover half block 502 really of described terminal, for according to operation signal and behaviour
Make the corresponding relation of information, determine the operation information that the described operation signal got is corresponding;
It is positioned at the sending module 503 of the Bluetooth command encapsulated layer of described terminal, for by the described operation determined
Information is sent to the Bluetooth protocol layer of described terminal;
It is positioned at the control module 504 of the Bluetooth protocol layer of described terminal, for according to the described operation received
Information, performs the operation that described operation information is corresponding.
Optionally, described control module 504, specifically for:
According to operation information and the binding relationship of operation, determine at least one behaviour that described operation information is corresponding
Make;Perform the operation determined.
Optionally, described control module 504, it is additionally operable to:
Generate the response signal that described operation signal is corresponding;Described response signalisation is given the indigo plant of described terminal
Tooth UI layer.
Optionally, described control module 504, specifically for:
Judge whether that all operations is carried out successfully;The most then generate and respond into function signal;Otherwise, generate
Response failure signal.
Optionally, described control module 504, specifically for:
In the signal memory space that the bluetooth UI layer of the write of described response signal with described terminal is shared, with
The bluetooth UI layer making described terminal obtains described response signal from described signal memory space.
Optionally, described acquisition module 501, specifically for:
The storage of described bluetooth UI layer is obtained from the signal memory space shared with the bluetooth UI layer of described terminal
Operation signal.
Above by reference to the method illustrated according to the embodiment of the present application, device (system) and/or computer program product
Block diagram and/or the flow chart of product describe the application.Should be understood that and can realize frame by computer program instructions
The combination of the block of figure and/or a block of flowchart illustration and block diagram and/or flowchart illustration.Can be by this
A little computer program instructions are supplied to general purpose computer, the processor of special-purpose computer and/or other number able to programme
According to processing means, to produce machine so that process dress via computer processor and/or other programmable data
The instruction putting execution creates the method for realizing function/action specified in block diagram and/or flow chart block.
Correspondingly, it is also possible to implement with hardware and/or software (including firmware, resident software, microcode etc.)
The application.Further, the application can take computer can use or on computer-readable recording medium
The form of computer program, it has the computer realized in media as well and can use or computer-readable
Program code, with used by instruction execution system or combined command perform system and use.In the application
Hereinafter, computer can use or computer-readable medium can be arbitrary medium, it can comprise, stores,
Communication, transmission or the program of transmission, to be used by instruction execution system, device or equipment, or combined command
Execution system, device or equipment use.
Obviously, those skilled in the art can carry out various change and modification without deviating from this to the present invention
Bright spirit and scope.So, if the present invention these amendment and modification belong to the claims in the present invention and
Within the scope of its equivalent technologies, then the present invention is also intended to comprise these change and modification.
Claims (10)
1. an operational approach based on bluetooth, it is characterised in that the method includes:
The Bluetooth command encapsulated layer of terminal obtains the operation signal of the bluetooth users interface UI layer of described terminal;
The Bluetooth command encapsulated layer of described terminal, according to operation signal and the corresponding relation of operation information, determines and obtains
The operation information that the described operation signal got is corresponding;
The described operation information determined is sent to the indigo plant of described terminal by the Bluetooth command encapsulated layer of described terminal
Tooth protocol layer;
The Bluetooth protocol layer of described terminal, according to the described operation information received, performs described operation information pair
The operation answered.
2. the method for claim 1, it is characterised in that the Bluetooth protocol layer of described terminal according to
The described operation information received, performs the operation that described operation information is corresponding, including:
The Bluetooth protocol layer of described terminal, according to operation information and the binding relationship of operation, determines described operation letter
At least one operation that breath is corresponding;
The Bluetooth protocol layer of described terminal performs the operation determined.
3. the method for claim 1, it is characterised in that the Bluetooth protocol layer of described terminal performs
After the operation that described operation information is corresponding, also include:
The Bluetooth protocol layer of described terminal generates the response signal that described operation signal is corresponding;
Described response signalisation is given the bluetooth UI layer of described terminal by the Bluetooth protocol layer of described terminal.
4. method as claimed in claim 3, it is characterised in that the Bluetooth protocol layer of described terminal generates
The response signal that described operation signal is corresponding, including:
The Bluetooth protocol layer of described terminal judges whether that all operations is carried out successfully;
The most then generate and respond into function signal;Otherwise, response failure signal is generated.
5. method as claimed in claim 3, it is characterised in that the Bluetooth protocol layer of described terminal is by institute
State the bluetooth UI layer responding signalisation to described terminal, including:
The bluetooth UI layer of the write of described response signal with described terminal is shared by the Bluetooth protocol layer of described terminal
Signal memory space in so that the bluetooth UI layer of described terminal obtains institute from described signal memory space
State response signal.
6. the method as described in Claims 1 to 5 is arbitrary, it is characterised in that the Bluetooth command of described terminal
Encapsulated layer obtains the operation signal of bluetooth UI layer, including:
The signal storage sky that the Bluetooth command encapsulated layer of described terminal is shared from the bluetooth UI layer with described terminal
The operation signal of described bluetooth UI layer storage is obtained between.
7. an operation equipment based on bluetooth, it is characterised in that including:
It is positioned at the acquisition module of the Bluetooth command encapsulated layer of terminal, for obtaining the bluetooth UI layer of described terminal
Operation signal;
It is positioned at the Bluetooth command encapsulated layer cover half block really of described terminal, for according to operation signal and operation letter
The corresponding relation of breath, determines the operation information that the described operation signal got is corresponding;
It is positioned at the sending module of the Bluetooth command encapsulated layer of described terminal, for by the described operation information determined
It is sent to the Bluetooth protocol layer of described terminal;
It is positioned at the control module of the Bluetooth protocol layer of described terminal, for according to the described operation letter received
Breath, performs the operation that described operation information is corresponding.
8. equipment as claimed in claim 7, it is characterised in that described control module, specifically for:
According to operation information and the binding relationship of operation, determine at least one behaviour that described operation information is corresponding
Make;Perform the operation determined.
9. equipment as claimed in claim 7, it is characterised in that described control module, is additionally operable to:
Generate the response signal that described operation signal is corresponding;Described response signalisation is given the indigo plant of described terminal
Tooth UI layer.
10. the equipment as described in as arbitrary in claim 7~9, it is characterised in that described acquisition module, specifically
For:
The storage of described bluetooth UI layer is obtained from the signal memory space shared with the bluetooth UI layer of described terminal
Operation signal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610379870.3A CN105846863B (en) | 2016-05-31 | 2016-05-31 | A kind of operating method and equipment based on bluetooth |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610379870.3A CN105846863B (en) | 2016-05-31 | 2016-05-31 | A kind of operating method and equipment based on bluetooth |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105846863A true CN105846863A (en) | 2016-08-10 |
CN105846863B CN105846863B (en) | 2019-07-05 |
Family
ID=56596001
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610379870.3A Active CN105846863B (en) | 2016-05-31 | 2016-05-31 | A kind of operating method and equipment based on bluetooth |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105846863B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106385273A (en) * | 2016-09-13 | 2017-02-08 | 北京叮叮关爱科技有限公司 | Response-based bluetooth communication module and bluetooth communication method |
CN107257540A (en) * | 2017-07-04 | 2017-10-17 | 飞天诚信科技股份有限公司 | It is a kind of to realize the method and device that bluetooth equipment is matched with mobile device |
CN112445548A (en) * | 2019-09-02 | 2021-03-05 | 广州皓醒湾科技有限公司 | Method and system for processing Bluetooth device operation command and readable storage medium |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2001033340A2 (en) * | 1999-10-26 | 2001-05-10 | At Home Corporation | Method and system for restricting access to user resources |
EP1333617A2 (en) * | 2002-01-31 | 2003-08-06 | Kabushiki Kaisha Toshiba | VoIP (Voice over Internet Protocol) -compliant cable modem |
CN101068351A (en) * | 2007-05-25 | 2007-11-07 | 中兴通讯股份有限公司 | Mobile terminal digital television data transmitting method |
JP2008293486A (en) * | 2007-04-25 | 2008-12-04 | Hitachi Ltd | Source code analysis device, analysis program, and analysis method |
CN101415251A (en) * | 2008-11-25 | 2009-04-22 | 中兴通讯股份有限公司 | Apparatus for implementing data transmission based on Bluetooth |
CN101447808A (en) * | 2007-11-27 | 2009-06-03 | 中兴通讯股份有限公司 | Bluetooth file transmission system |
JP2010020794A (en) * | 2009-09-25 | 2010-01-28 | Mitsubishi Electric Corp | Starting method of operation program, starting program of operation program, and information transmitting device |
CN102035669A (en) * | 2009-09-29 | 2011-04-27 | 鸿富锦精密工业(深圳)有限公司 | Function calling system and method |
CN102082969A (en) * | 2010-10-29 | 2011-06-01 | 广东星海数字家庭产业技术研究院有限公司 | External Bluetooth equipment driving system for set-top box |
CN102082968A (en) * | 2010-10-29 | 2011-06-01 | 广东星海数字家庭产业技术研究院有限公司 | Multi-hardware compatible bluetooth device driving system |
CN102685196A (en) * | 2010-12-22 | 2012-09-19 | 北京华夏未来信息技术有限公司 | Method and virtual application system for improving user experience in virtual application environment |
CN102915113A (en) * | 2012-08-24 | 2013-02-06 | 深圳创维-Rgb电子有限公司 | Method and apparatus for supporting data input |
CN105025292A (en) * | 2015-07-06 | 2015-11-04 | 深圳Tcl数字技术有限公司 | Television set and system and method for factory debugging |
CN105141686A (en) * | 2015-08-19 | 2015-12-09 | 贵阳朗玛信息技术股份有限公司 | Method and device for achieving bluetooth communication |
CN105472462A (en) * | 2015-11-12 | 2016-04-06 | Tcl王牌电器(惠州)有限公司 | Television function processing method and system |
CN105491135A (en) * | 2015-12-11 | 2016-04-13 | 小米科技有限责任公司 | Data connection establishing method and device |
-
2016
- 2016-05-31 CN CN201610379870.3A patent/CN105846863B/en active Active
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2001033340A2 (en) * | 1999-10-26 | 2001-05-10 | At Home Corporation | Method and system for restricting access to user resources |
EP1333617A2 (en) * | 2002-01-31 | 2003-08-06 | Kabushiki Kaisha Toshiba | VoIP (Voice over Internet Protocol) -compliant cable modem |
JP2008293486A (en) * | 2007-04-25 | 2008-12-04 | Hitachi Ltd | Source code analysis device, analysis program, and analysis method |
CN101068351A (en) * | 2007-05-25 | 2007-11-07 | 中兴通讯股份有限公司 | Mobile terminal digital television data transmitting method |
CN101447808A (en) * | 2007-11-27 | 2009-06-03 | 中兴通讯股份有限公司 | Bluetooth file transmission system |
CN101415251A (en) * | 2008-11-25 | 2009-04-22 | 中兴通讯股份有限公司 | Apparatus for implementing data transmission based on Bluetooth |
JP2010020794A (en) * | 2009-09-25 | 2010-01-28 | Mitsubishi Electric Corp | Starting method of operation program, starting program of operation program, and information transmitting device |
CN102035669A (en) * | 2009-09-29 | 2011-04-27 | 鸿富锦精密工业(深圳)有限公司 | Function calling system and method |
CN102082969A (en) * | 2010-10-29 | 2011-06-01 | 广东星海数字家庭产业技术研究院有限公司 | External Bluetooth equipment driving system for set-top box |
CN102082968A (en) * | 2010-10-29 | 2011-06-01 | 广东星海数字家庭产业技术研究院有限公司 | Multi-hardware compatible bluetooth device driving system |
CN102685196A (en) * | 2010-12-22 | 2012-09-19 | 北京华夏未来信息技术有限公司 | Method and virtual application system for improving user experience in virtual application environment |
CN102915113A (en) * | 2012-08-24 | 2013-02-06 | 深圳创维-Rgb电子有限公司 | Method and apparatus for supporting data input |
CN105025292A (en) * | 2015-07-06 | 2015-11-04 | 深圳Tcl数字技术有限公司 | Television set and system and method for factory debugging |
CN105141686A (en) * | 2015-08-19 | 2015-12-09 | 贵阳朗玛信息技术股份有限公司 | Method and device for achieving bluetooth communication |
CN105472462A (en) * | 2015-11-12 | 2016-04-06 | Tcl王牌电器(惠州)有限公司 | Television function processing method and system |
CN105491135A (en) * | 2015-12-11 | 2016-04-13 | 小米科技有限责任公司 | Data connection establishing method and device |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106385273A (en) * | 2016-09-13 | 2017-02-08 | 北京叮叮关爱科技有限公司 | Response-based bluetooth communication module and bluetooth communication method |
CN106385273B (en) * | 2016-09-13 | 2018-08-07 | 北京叮叮关爱科技有限公司 | Bluetooth communication based on response type and Bluetooth communication method |
CN107257540A (en) * | 2017-07-04 | 2017-10-17 | 飞天诚信科技股份有限公司 | It is a kind of to realize the method and device that bluetooth equipment is matched with mobile device |
US10880734B2 (en) | 2017-07-04 | 2020-12-29 | Feitian Technologies Co., Ltd. | Method for pairing Bluetooth device with mobile device and apparatus thereof |
CN112445548A (en) * | 2019-09-02 | 2021-03-05 | 广州皓醒湾科技有限公司 | Method and system for processing Bluetooth device operation command and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN105846863B (en) | 2019-07-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105763723B (en) | Mobile terminal and method for upgrading system | |
CN203289452U (en) | Wireless audio system based on acoustic wave communication pairing | |
CN101207412B (en) | Tv set for controlling blue tooth mobile phone | |
US20150055622A1 (en) | Communication method and apparatus for electronic device in mobile communication system | |
CN105557058A (en) | Electronic device and communication connecting method thereof | |
CN109842917A (en) | The transmission method and user terminal of system information block | |
CN102981613A (en) | Terminal and terminal control method | |
CN105718311A (en) | Intelligent system and implementing method thereof, peripheral applied to intelligent device | |
US11991612B2 (en) | Bluetooth data transmission method and apparatus, terminal and storage medium | |
CN105846863A (en) | Bluetooth based operation method and device | |
CN101286768A (en) | Remote controller for Bluetooth mobile phone | |
CN113556715B (en) | Device connection method and apparatus, computer readable medium and electronic device | |
CN106453512A (en) | Redis cluster information monitoring device and method | |
CN105718405B (en) | The method that the USB interface of mobile terminal and its processor is multiplexed | |
CN114500716A (en) | Cooperative call method, apparatus, device, storage medium and program product | |
CN108964997B (en) | Wireless frequency writing method for interphone | |
KR20170105055A (en) | System and method for realizing Bluetooth-dependent device function of embedded execution system | |
CN106878976A (en) | The data sharing method of mobile terminal and dual system | |
CN102868766A (en) | Method, system and device for achieving remote control | |
US9820186B2 (en) | Communication module and data segmentation transmission method using the same | |
CN105744505B (en) | Mobile terminal and its method for upgrading system | |
CN105611067B (en) | Mobile terminal and its upgrade method | |
CN201860397U (en) | Television with Bluetooth control module | |
CN105657732B (en) | Mobile terminal and its method for upgrading system | |
WO2021088816A1 (en) | Method and apparatus for measuring signal-to-interference-plus-noise ratio, device, and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: 266100 Zhuzhou Road, Laoshan District, Shandong, No. 151, No. Patentee after: Hisense Video Technology Co.,Ltd. Address before: 266100 Zhuzhou Road, Laoshan District, Shandong, No. 151, No. Patentee before: HISENSE ELECTRIC Co.,Ltd. |
|
CP01 | Change in the name or title of a patent holder |