CN105846863B - A kind of operating method and equipment based on bluetooth - Google Patents
A kind of operating method and equipment based on bluetooth Download PDFInfo
- Publication number
- CN105846863B CN105846863B CN201610379870.3A CN201610379870A CN105846863B CN 105846863 B CN105846863 B CN 105846863B CN 201610379870 A CN201610379870 A CN 201610379870A CN 105846863 B CN105846863 B CN 105846863B
- Authority
- CN
- China
- Prior art keywords
- bluetooth
- terminal
- signal
- protocol layer
- layers
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000011017 operating method Methods 0.000 title claims abstract description 14
- 238000000034 method Methods 0.000 claims abstract description 35
- 230000006870 function Effects 0.000 claims description 98
- 230000004044 response Effects 0.000 claims description 54
- 241001062009 Indigofera Species 0.000 claims description 5
- 230000008569 process Effects 0.000 abstract description 17
- 238000004891 communication Methods 0.000 abstract description 12
- 230000008859 change Effects 0.000 abstract description 5
- 238000011161 development Methods 0.000 abstract description 4
- 238000005516 engineering process Methods 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 8
- 230000006399 behavior Effects 0.000 description 6
- 238000004590 computer program Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000005538 encapsulation Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 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)
- Mobile Radio Communication Systems (AREA)
- Communication Control (AREA)
Abstract
The present invention relates to field of communication technology, in particular to a kind of operating method and equipment based on bluetooth, to solve the prior art when being adjusted to bluetooth module, so that the problem that the process of exploitation is more complicated.Bluetooth command encapsulated layer of the embodiment of the present invention obtains bluetooth UI layers of operation signal;Bluetooth command encapsulated layer determines the corresponding operation information of operation signal got according to the corresponding relationship of operation signal and operation information;Determining operation information is sent to the Bluetooth protocol layer of terminal by Bluetooth command encapsulated layer;Bluetooth protocol layer executes the corresponding operation of operation information according to the operation information received.Since the embodiment of the present invention is when being adjusted bluetooth module, the binding relationship of operation information and operation need to only be redefined, UI layers of bluetooth are not required to do any change, the operating method of the embodiment of the present invention can be adapted to further types of bluetooth module, when being adjusted to bluetooth module, development cycle is shorter, and the process of exploitation is fairly simple.
Description
Technical field
The present invention relates to field of communication technology, in particular to a kind of operating method and equipment based on bluetooth.
Background technique
Bluetooth (Bluetooth) is a kind of radio technology of holding equipment short haul connection (usually within 10m), energy
Wireless communication is carried out between numerous equipment such as mobile phone, PDA (tablet computer), wireless headset, laptop, related peripherals
Breath exchange, this short-range wireless communication technique allow a variety of intelligent terminals to pass through bluetooth connection.
Currently, bluetooth radio function is increased on most smart televisions, so that intelligence as the continuous of smart television is popularized
Energy TV is wirelessly connected by bluetooth with other intelligent terminals or external equipment.And more and more smart televisions
Using (SuSE) Linux OS, in the prior art, the smart television of (SuSE) Linux OS is when realizing Bluetooth function, using such as figure
Process shown in 1: UI (User Interface, user interface) layer is by function call mode, by calling Bluetooth protocol layer
Middle different profile (configuration file) realizes the function of bluetooth.For example, being wrapped in the Bluetooth protocol layer that bluetooth module producer provides
Audio/video agreement and ble (bluetooth low energy, bluetooth low energy consumption) agreement are included, is opened in UI layers of execution blue
When tooth order, for audio/video agreement, need successively to call initialization function, initial configuration documentation function, readjustment letter
Number and opening bluetooth function;For ble agreement, need successively to call initialization function, initial configuration documentation function, readjustment letter
Number and opening bluetooth function.Therefore, need to define a large amount of calling function between Bluetooth protocol layer to realize bluetooth function for UI layers
Energy.
Due to the bluetooth manufacturer that the smart television of (SuSE) Linux OS uses be not it is unalterable, provide bluetooth mould
When the manufacturer of block changes, especially in the scene that the bluetooth protocol repertory of bluetooth module is not increased income or half increases income, more
After changing bluetooth module, UI layers are called function needs to redefine between Bluetooth protocol layer, since UI layer function is more integrated,
After having changed original UI layer functions structure, it is also necessary to a large amount of reperformance test work is carried out, so that in adjustment bluetooth module
When development cycle it is very long.
In conclusion calling directly the method that function realizes Bluetooth function currently based on UI layers, carried out to bluetooth module
When adjustment, so that the process of exploitation is more complicated.
Summary of the invention
The present invention provides a kind of operating method and equipment based on bluetooth, and the bluetooth module applied to the offer of bluetooth manufacturer is not
In the scene of open source or half open source, the side that function realizes Bluetooth function is called directly based on UI layers to solve the prior art
Method, when being adjusted to bluetooth module, so that the problem that the process of exploitation is more complicated.
The embodiment of the present invention provides a kind of operating method based on bluetooth, comprising:
The Bluetooth command encapsulated layer of terminal obtains the operation signal at UI layers of the bluetooth users interface of the terminal;
The Bluetooth command encapsulated layer of the terminal is determined and is got according to the corresponding relationship of operation signal and operation information
The corresponding operation information of the operation signal;
The operation information of the determination is sent to the Bluetooth protocol of the terminal by the Bluetooth command encapsulated layer of the terminal
Layer;
The Bluetooth protocol layer of the terminal executes the corresponding behaviour of the operation information according to the operation information received
Make.
Include due to including Bluetooth command encapsulated layer in the terminal of the embodiment of the present invention, and in the Bluetooth command encapsulated layer
The corresponding relationship of operation signal and operation information;Bluetooth command encapsulated layer is believed after obtaining operation signal according to the operation of storage
Number and operation information corresponding relationship, determine obtain the corresponding operation information of operation signal;Bluetooth command encapsulated layer will determine
Operation information be sent to Bluetooth protocol layer, the binding that operation information and operation are stored in Bluetooth protocol layer Bluetooth protocol layer is closed
System, Bluetooth protocol layer execute the corresponding operation of operation information according to the operation information received.Wherein, different vendor provides
Operation information is different with the binding relationship of operation in Bluetooth protocol layer, i.e., in bluetooth manufacturer difference, for the same bluetooth UI
The operation of the operation signal of layer, corresponding Bluetooth protocol layer is different.After bluetooth manufacturer changes, since the prior art uses
UI layers call directly the method that function realizes Bluetooth function, and after the corresponding operation of operation signal changes, it is fixed to need again
Adopted bluetooth UI layers all calling functions between Bluetooth protocol layer;And the embodiment of the present invention is after bluetooth manufacturer changes,
It only needs according to the binding relationship of operation information and operation in new Bluetooth protocol layer, by the operation of new operation information and UI layer
Signal is Resealed, and obtains new Bluetooth command encapsulated layer, therefore, the embodiment of the present invention is adjusted to bluetooth module
When, the binding relationship of operation information and operation need to be only redefined, UI layers of bluetooth are not required to do any change, the embodiment of the present invention
Operating method can be adapted to further types of bluetooth module, and when being adjusted to bluetooth module, the development cycle is shorter, exploitation
Process is fairly simple.
Another party is quick, and the embodiment of the present invention provides a kind of operation equipment based on bluetooth, comprising:
Positioned at the acquisition module of the Bluetooth command encapsulated layer of terminal, UI layers of bluetooth of the operation for obtaining the terminal is believed
Number;
Positioned at the determining module of the Bluetooth command encapsulated layer of the terminal, for pair according to operation signal and operation information
It should be related to, determine the corresponding operation information of the operation signal got;
Positioned at the sending module of the Bluetooth command encapsulated layer of the terminal, for the operation information of the determination to be sent to
The Bluetooth protocol layer of the terminal;
Positioned at the control module of the Bluetooth protocol layer of the terminal, for executing according to the operation information received
The corresponding operation of the operation information.
Detailed description of the invention
Fig. 1 is smart television Bluetooth function implementation method schematic diagram in background technique;
Fig. 2 is Bluetooth function of embodiment of the present invention implementation method schematic diagram;
Fig. 3 is flow chart of the embodiment of the present invention based on bluetooth;
Fig. 4 is the overall flow figure of operating method of the embodiment of the present invention based on bluetooth;
Fig. 5 is the structural schematic diagram of operation equipment of the embodiment of the present invention based on bluetooth.
Specific embodiment
The Bluetooth command encapsulated layer of the terminal of the embodiment of the present invention obtains the behaviour at UI layers of the bluetooth users interface of the terminal
Make signal;The Bluetooth command encapsulated layer of the terminal is determined and is got according to the corresponding relationship of operation signal and operation information
The corresponding operation information of the operation signal;The operation information of the determination is sent to by the Bluetooth command encapsulated layer of the terminal
The Bluetooth protocol layer of the terminal;The Bluetooth protocol layer of the terminal executes the behaviour according to the operation information received
Make the corresponding operation of information.
Include due to including Bluetooth command encapsulated layer in the terminal of the embodiment of the present invention, and in the Bluetooth command encapsulated layer
The corresponding relationship of operation signal and operation information;Bluetooth command encapsulated layer is believed after obtaining operation signal according to the operation of storage
Number and operation information corresponding relationship, determine obtain the corresponding operation information of operation signal;Bluetooth command encapsulated layer will determine
Operation information be sent to Bluetooth protocol layer, the binding that operation information and operation are stored in Bluetooth protocol layer Bluetooth protocol layer is closed
System, Bluetooth protocol layer execute the corresponding operation of operation information according to the operation information received.Wherein, different vendor provides
Operation information is different with the binding relationship of operation in Bluetooth protocol layer, i.e., in bluetooth manufacturer difference, for the same bluetooth UI
The operation of the operation signal of layer, corresponding Bluetooth protocol layer is different.After bluetooth manufacturer changes, since the prior art uses
UI layers call directly the method that function realizes Bluetooth function, and after the corresponding operation of operation signal changes, it is fixed to need again
Adopted bluetooth UI layers all calling functions between Bluetooth protocol layer;And the embodiment of the present invention is after bluetooth manufacturer changes,
It only needs according to the binding relationship of operation information and operation in new Bluetooth protocol layer, by the operation of new operation information and UI layer
Signal is Resealed, and obtains new Bluetooth command encapsulated layer, therefore, the embodiment of the present invention is adjusted to bluetooth module
When, the binding relationship of operation information and operation need to be only redefined, UI layers of bluetooth are not required to do any change, the embodiment of the present invention
Operating method can be adapted to further types of bluetooth module, and when being adjusted to bluetooth module, the development cycle is shorter, exploitation
Process is fairly simple.
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
The embodiment of the present invention is described in further detail with reference to the accompanying drawings of the specification.
As shown in Fig. 2, the schematic diagram of Bluetooth function implementation method of the embodiment of the present invention.Including UI layers of bluetooth, communication layers one,
Bluetooth command encapsulated layer, communication layers two and Bluetooth protocol layer.
Wherein, bluetooth UI layers are an individual process, and Bluetooth command encapsulated layer and Bluetooth protocol layer are the same process.
Since UI layers of bluetooth and Bluetooth command encapsulated layer, Bluetooth protocol layer are different processes, between different processes can not direct communication,
Therefore, it can be communicated by the way of shared drive in UI layers of the bluetooth communication layers one between Bluetooth command encapsulated layer.
Communication layers two between Bluetooth command encapsulated layer and Bluetooth protocol layer can realize Bluetooth command envelope by the way of function call
Fill the communication between layer and Bluetooth protocol layer.
It should be noted that communication layers two and Bluetooth protocol layer are that Bluetooth protocol manufacturer is predetermined.Bluetooth command envelope
Filling layer is the operation information provided according to Bluetooth protocol manufacturer, and operation information and UI layers of the bluetooth operation signal sent are tied up
It is fixed, and encapsulation process is carried out, it is encapsulated as Bluetooth command encapsulated layer.
Bluetooth control commands of the embodiment of the present invention include but is not limited to:
Open Bluetooth switch, close Bluetooth switch, scanning device, pairing connect, disconnect, Hui Lian;
Bluetooth operation order of the embodiment of the present invention further includes order in special circumstances, for example is grasped about audio/video
Make, comprising:
Increase volume, reduce volume, broadcasting, closing, pause, next track, last track.
Each Bluetooth control commands of the embodiment of the present invention correspond to an operation signal, need to be implemented bluetooth in determination
When control command, UI layers of the bluetooth corresponding operation signal of the generation control command.For example, opening the control command pair of Bluetooth switch
The operation signal answered is BT_OPEN_CMD;The corresponding operation signal of control command for closing Bluetooth switch is BT_CLOSE_CMD;
The corresponding operation signal of the control command of scanning device is BT_SCAN_CMD.
What the Bluetooth command encapsulated layer of the embodiment of the present invention encapsulated is the corresponding relationship of operation signal and operation information.
Optionally, the operation information of the embodiment of the present invention is to call function.
For example, corresponding operation information is bt_open () function when operation signal is BT_OPEN_CMD;Believe in operation
Number be BT_CLOSE_CMD when, corresponding operation information be bt_close () function;When operation signal is BT_SCAN_CMD,
Corresponding operation information is bt_scan () function.
Illustrate the process of Bluetooth command encapsulated layer encapsulation with an example below.
For example, Bluetooth control commands include opening Bluetooth switch, closing Bluetooth switch, scanning device, broadcasting, pause;It beats
Opening the corresponding operation signal of Bluetooth switch order is BT_OPEN_CMD, and the corresponding operation of operation signal BT_OPEN_CMD is believed
Breath is bt_open () function;Closing the corresponding operation signal of Bluetooth switch order is BT_CLOSE_CMD, and operation signal
The corresponding operation information of BT_CLOSE_CMD is bt_close () function;The corresponding operation signal of scanning device is BT_SCAN_
CMD, and the corresponding operation information of operation signal BT_SCAN_CMD is bt_scan () function;Play corresponding operation signal
For BT_PLAY_CMD, and the corresponding operation information of operation signal BT_PLAY_CMD is bt_play () function;Pause corresponds to
Operation signal be BT_STOP_CMD, and the corresponding operation information of operation signal BT_STOP_CMD be bt_stop () letter
Number.
Operation signal and operation information are then packaged processing, specific as shown in table 1:
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 shown in figure 3, operating method of the embodiment of the present invention based on bluetooth, comprising:
Step 301, terminal Bluetooth command encapsulated layer obtain the terminal UI layers of bluetooth users interface operation signal;
Step 302, the terminal Bluetooth command encapsulated layer according to the corresponding relationship of operation signal and operation information, determine
The corresponding operation information of the operation signal got;
Step 303, the terminal Bluetooth command encapsulated layer the operation information of the determination is sent to the terminal
Bluetooth protocol layer;
Step 304, the Bluetooth protocol layer of the terminal execute the operation information according to the operation information received
Corresponding operation.
The Bluetooth command encapsulated layer of the terminal of the embodiment of the present invention is process identical with Bluetooth protocol layer, and bluetooth is ordered
Enable the corresponding relationship in encapsulated layer including operation signal and operation information.Bluetooth command encapsulated layer is getting UI layers of bluetooth of behaviour
After making signal, according to the corresponding relationship of operation signal and operation information, the corresponding operation information of control signal is determined, and will be true
Fixed operation information is sent to Bluetooth protocol layer.
The Bluetooth protocol layer of the embodiment of the present invention executes institute after the operation information for receiving the transmission of Bluetooth command encapsulated layer
State the corresponding operation of operation information.
Specifically, binding relationship of the Bluetooth protocol layer of the terminal according to operation information and operation, determines the operation
At least one corresponding operation of information;The Bluetooth protocol layer of the terminal executes determining operation.
The Bluetooth protocol layer of the embodiment of the present invention has pre-defined the binding relationship of operation information and operation, each operation
The corresponding one or more operations of information.
It should be noted that the corresponding operation of operation information calls function for son when operation information is to call function.
For example, Bluetooth control commands are when opening Bluetooth switch, the operation signal of UI layers of bluetooth generation is BT_OPEN_
CMD, and be calling function bt_ in the corresponding operation information of operation signal BT_OPEN_CMD that Bluetooth command encapsulated layer defines
Open () function;Assuming that Bluetooth protocol layer includes that ble agreement and hh agreement are assisted when executing opening Bluetooth operation for ble
View, the corresponding calling subfunction of bt_open () function includes: the first initialization function, the first initial configuration function, first
Call back function, first open function;For hh agreement, the corresponding calling subfunction of bt_open () function includes: second initial
Change function, the second initial configuration function, the second call back function, the second opening function;Then operation information bt_ in Bluetooth protocol layer
Open () function corresponds to eight operations (sub- calling function) altogether.
Optionally, the Bluetooth command encapsulated layer of terminal is from UI layers of bluetooth of the terminal shared signal memory space
Obtain the operation signal of the bluetooth UI layers of storage.
UI layers of bluetooth of operation signal of the embodiment of the present invention is the indigo plant of terminal when terminal determines and needs to be implemented operation
UI layers of tooth generate the corresponding operation signal of Bluetooth operation needed to be implemented, and the operation signal are stored in and is ordered with the bluetooth
In the signal memory space for enabling encapsulated layer shared.
Since the Bluetooth command encapsulated layer of the embodiment of the present invention is different processes from UI layers of bluetooth of terminal.And process
User's space be independent of each other, it is however generally that cannot access mutually, thus the Bluetooth command encapsulated layer of terminal need
When obtaining the operation signal of UI layers of bluetooth generation, need UI layers of the bluetooth operation signal by generation that Bluetooth command encapsulated layer is written
The signal memory spaces shared with UI layers of bluetooth, so that Bluetooth command encapsulated layer can get the operation letter of UI layers of bluetooth generation
Number.
Communication mode between the Bluetooth command encapsulated layer of the embodiment of the present invention and UI layers of bluetooth is including but not limited to following
Mode:
1, pipeline (pipe);
2, message queue (message queue);
3, socket (socket);
4, shared drive (shared memory);
5, semaphore (semaphore).
Optionally, Bluetooth command of embodiment of the present invention encapsulated layer is led to by the way of shared drive with UI layers of bluetooth
Letter.
And the Bluetooth command encapsulated layer of the embodiment of the present invention and bluetooth UI layers of shared signal memory space, it is as shared
Region of memory.
After generating operation signal shared section key is written in operation signal by UI layers of bluetooth of the terminal of that embodiment of the invention
Domain;The Bluetooth command encapsulated layer continuous access shared drive region of terminal, after getting operation signal from shared drive region,
According to the corresponding relationship of operation signal and operation information, determines the corresponding operation information of the operation signal, determining operation information
Afterwards, which is sent to Bluetooth protocol layer;Bluetooth protocol layer executes the behaviour according to the operation information received
Make the corresponding operation of information.
In addition, the Bluetooth protocol layer of the terminal executes the operation information pair according to the operation information received
After the operation answered, Bluetooth protocol layer also needs to be implemented following operation:
The Bluetooth protocol layer of the terminal generates the corresponding response signal of the operation signal;The Bluetooth protocol of the terminal
Layer notifies the response signal to UI layers of bluetooth of the terminal.
Wherein, the response signal of the embodiment of the present invention includes response pass signal and response failure signal.
Specifically, the Bluetooth protocol layer of terminal judges whether that all operations are carried out success;It is responded successfully if so, generating
Signal;Otherwise, response failure signal is generated.
Since the Bluetooth protocol layer of the terminal of that embodiment of the invention is after receiving operation information, determine that operation information is corresponding
At least one operation.When the corresponding operation of operation information is multiple, need determining that the corresponding multiple operations of operation information are equal
After running succeeded, response pass signal is generated;If there is operation in the corresponding multiple behaviour of operation information is not carried out success, give birth to
At response failure signal.
In implementation, in the corresponding multiple operations of operation information, it is corresponding more that Bluetooth protocol layer predefines operation information
A operation executes sequence, and Bluetooth protocol layer can successively be executed when executing multiple operations according to determining execution sequence.
If the preceding operation of sequence executes failure, subsequent operation is no longer executed, and determines that the corresponding operation of the operation information executes
Failure generates response failure signal.
For example, when operation information is to call function bt_open () function, preset bt_ in Bluetooth protocol layer
The corresponding operation of open () function is successively are as follows: initialization function, call back function, opens function at initial configuration function.It is then blue
Tooth protocol layer calls initialization function in the corresponding operation of execution bt_open () function first, if initialization function calls
Success then continues to call initial configuration function;After the success of initial configuration function call, continue to call call back function;?
After call back function calls successfully, continues to call and open function;After opening function call success, response pass signal is generated.
In addition, not continuing to call the corresponding operation of bt_open () function, and raw if initialization function malloc failure malloc
At response failure signal.
The Bluetooth protocol layer of the embodiment of the present invention is after determining the corresponding response signal of the operation signal, the bluetooth of terminal
Protocol layer notifies response signal to UI layers of bluetooth of terminal.
Specifically, the embodiment of the present invention is notified response signal to UI layers of bluetooth using following manner.
Optionally, the Bluetooth protocol layer of the terminal is shared by UI layers of bluetooth of response signal write-in and the terminal
Signal memory space in so that UI layers of the bluetooth of the terminal obtain the response signal from the signal memory space.
In implementation, response signal is written to shared drive region after generating response signal by the Bluetooth protocol layer of terminal.
And Bluetooth protocol layer is when being written to shared drive region for response signal, is to change the operation signal in shared drive region
It is written as response signal.
For example, UI layers of the bluetooth of the terminal operation signal in the write-in of shared drive region is BT_OPEN_CMD;The indigo plant of terminal
After tooth order encapsulated layer gets BT_OPEN_CMD operation signal, the corresponding operation letter of BT_OPEN_CMD operation signal is determined
It ceases, and the operation information is sent to the Bluetooth protocol layer of terminal, Bluetooth protocol layer after receiving operation information, also grasp by determination
Make at least one corresponding operation of information, and executes determining operation.If the Bluetooth protocol layer of terminal judges that all operations are all held
It goes successfully, then generates response pass signal BT_OPEN_SUCCESS, the Bluetooth protocol layer of terminal will be in shared drive region
BT_OPEN_CMD is rewritten as BT_OPEN_SUCCESS.
It should be noted that the terminal of the embodiment of the present invention determines when needing to be implemented operation, UI layers of bluetooth generation of terminal
The corresponding operation signal of the Bluetooth operation needed to be implemented.Since UI layers of bluetooth of the terminal of that embodiment of the invention be a process, and
And the sequence lasts read the information in shared drive region, if reading the corresponding response of operation signal from shared drive region
Signal, however, it is determined that the response signal is response pass signal, then executes the operation needed to be implemented for UI layers of the bluetooth of terminal;If it is determined that
The response signal is response failure signal, then the operation that the UI layers of determination of the bluetooth of terminal need to be implemented executes failure.
For example, UI layers of the bluetooth of the terminal operation signal in the write-in of shared drive region is BT_OPEN_CMD;The indigo plant of terminal
After tooth order encapsulated layer gets BT_OPEN_CMD operation signal, the corresponding operation information of BT_OPEN_CMD operation signal is determined
Bt_open () function, and the bt_open () function is sent to the Bluetooth protocol layer of terminal, Bluetooth protocol layer is receiving
After bt_open () function, also at least one corresponding operation of bt_open () function is determined, and execute determining operation.If every
One operation is performed both by success, then the Bluetooth protocol layer of terminal generates response pass signal BT_OPEN_SUCCESS, the indigo plant of terminal
BT_OPEN_CMD in shared drive region is rewritten as BT_OPEN_SUCCESS by tooth protocol layer;UI layers of bluetooth of terminal are being read
After getting BT_OPEN_SUCCESS response signal, the operation for opening Bluetooth switch is executed, i.e., the bluetooth icon in operation interface is beaten
It opens;Operation executes failure if it exists, then the Bluetooth protocol layer of terminal generates response failure signal BT_OPEN_ERROR, terminal
Bluetooth needs layer that the BT_OPEN_CMD in shared drive region is rewritten as BT_OPEN_ERROR;UI layers of bluetooth of terminal are being read
After getting BT_OPEN_ERROR response signal, UI layers of bluetooth of terminal, which determine, opens bluetooth failure.
As shown in figure 4, the overall flow figure of operating method of the embodiment of the present invention based on bluetooth.
When step 401, terminal determination need to be implemented operation, UI layers of bluetooth of terminal generate the Bluetooth operation pair needed to be implemented
The operation signal answered;
Step 402, UI layers of the bluetooth of terminal share operation signal write-in Bluetooth command encapsulated layer with bluetooth UI layer
In signal memory space;
Step 403, terminal Bluetooth command encapsulated layer obtained from signal memory space UI layers of bluetooth storage operation letter
Number;
Step 404, terminal Bluetooth command encapsulated layer according to the corresponding relationship of operation signal and operation information, determine and obtain
The corresponding operation information of the operation signal arrived;
Step 405, terminal Bluetooth command encapsulated layer determining operation information is sent to the Bluetooth protocol layer of terminal;
It is corresponding to execute the operation information according to the operation information received for step 406, the Bluetooth protocol layer of terminal
At least one operation;
Step 407, the Bluetooth protocol layer of terminal judge whether that all operations are carried out success, if so, step 408 is executed,
If it is not, executing step 409;
Step 408, the Bluetooth protocol layer of terminal generate response pass signal;
Step 409, the Bluetooth protocol layer of terminal generate response failure signal;
Step 410, the Bluetooth protocol layer of terminal notify the response pass signal to UI layers of bluetooth of the terminal;
Operation signal in signal memory space is rewritten as response pass signal by step 411, the Bluetooth protocol layer of terminal;
Step 412, UI layers of the bluetooth of terminal the response pass signal is obtained from the signal memory space;
Step 413, the Bluetooth protocol layer of terminal notify the response failure signal to UI layers of bluetooth of the terminal;
Operation signal in signal memory space is rewritten as response failure signal by step 414, the Bluetooth protocol layer of terminal;
Step 415, UI layers of the bluetooth of terminal the response failure signal is obtained from the signal memory space.
Based on the same inventive concept, the embodiment of the present invention also provides a kind of operation equipment based on bluetooth, due to the equipment
Operating method of the principle solved the problems, such as to the embodiment of the present invention based on bluetooth is similar, therefore the implementation side of may refer to of the equipment
The implementation of method, overlaps will not be repeated.
As shown in figure 5, operation equipment of the embodiment of the present invention based on bluetooth, comprising:
Positioned at the acquisition module 501 of the Bluetooth command encapsulated layer of terminal, for obtaining the bluetooth users interface of the terminal
UI layers of operation signal;
Positioned at the determining module 502 of the Bluetooth command encapsulated layer of the terminal, for according to operation signal and operation information
Corresponding relationship, determine the corresponding operation information of the operation signal that gets;
Positioned at the sending module 503 of the Bluetooth command encapsulated layer of the terminal, for the operation information of the determination to be sent out
Give the Bluetooth protocol layer of the terminal;
Positioned at the control module 504 of the Bluetooth protocol layer of the terminal, for holding according to the operation information received
The corresponding operation of the row operation information.
Optionally, the control module 504, is specifically used for:
According to the binding relationship of operation information and operation, at least one corresponding operation of the operation information is determined;It executes
Determining operation.
Optionally, the control module 504, is also used to:
Generate the corresponding response signal of the operation signal;The response signal is notified to the bluetooth UI of the terminal
Layer.
Optionally, the control module 504, is specifically used for:
Judge whether that all operations are carried out success;If so, generating response pass signal;Otherwise, response failure is generated
Signal.
Optionally, the control module 504, is specifically used for:
The response signal is written in UI layers of the bluetooth shared signal memory space with the terminal, so that the end
UI layers of bluetooth of end obtain the response signal from the signal memory space.
Optionally, the acquisition module 501, is specifically used for:
The operation of the bluetooth UI layers of storage is obtained from UI layers of bluetooth of the terminal shared signal memory space
Signal.
Above by reference to showing according to the method, apparatus (system) of the embodiment of the present application and/or the frame of computer program product
Figure and/or flow chart describe the application.It should be understood that can realize that block diagram and or flow chart is shown by computer program instructions
The combination of the block of a block and block diagram and or flow chart diagram for figure.These computer program instructions can be supplied to logical
With computer, the processor of special purpose computer and/or other programmable data processing units, to generate machine, so that via meter
The instruction that calculation machine processor and/or other programmable data processing units execute creates for realizing block diagram and or flow chart block
In specified function action method.
Correspondingly, the application can also be implemented with hardware and/or software (including firmware, resident software, microcode etc.).More
Further, the application can take computer usable or the shape of the computer program product on computer readable storage medium
Formula has the computer realized in the medium usable or computer readable program code, to be made by instruction execution system
It is used with or in conjunction with instruction execution system.In the present context, computer can be used or computer-readable medium can be with
It is arbitrary medium, may include, stores, communicates, transmits or transmit program, is made by instruction execution system, device or equipment
With, or instruction execution system, device or equipment is combined to use.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (8)
1. a kind of operating method based on bluetooth, which is characterized in that this method comprises:
The Bluetooth command encapsulated layer of terminal obtains the indigo plant from UI layers of bluetooth of the terminal shared signal memory space
The operation signal that UI layers of tooth user interface;
According to the corresponding relationship of operation signal and calling function, determination gets described the Bluetooth command encapsulated layer of the terminal
The corresponding calling function of operation signal;
The calling function of the determination is sent to the Bluetooth protocol layer of the terminal by the Bluetooth command encapsulated layer of the terminal;
The Bluetooth protocol layer of the terminal executes the corresponding operation of the calling function according to the calling function received.
2. the method as described in claim 1, which is characterized in that the Bluetooth protocol layer of the terminal is according to the tune received
With function, the corresponding operation of the calling function is executed, comprising:
The Bluetooth protocol layer of the terminal determines that the calling function is corresponding extremely according to the binding relationship for calling function and operation
A few operation;
The Bluetooth protocol layer of the terminal executes determining operation.
3. the method as described in claim 1, which is characterized in that the Bluetooth protocol layer of the terminal executes the calling function pair
After the operation answered, further includes:
The Bluetooth protocol layer of the terminal generates the corresponding response signal of the operation signal;
The Bluetooth protocol layer of the terminal notifies the response signal to UI layers of bluetooth of the terminal.
4. method as claimed in claim 3, which is characterized in that the Bluetooth protocol layer of the terminal generates the operation signal pair
The response signal answered, comprising:
The Bluetooth protocol layer of the terminal judges whether that all operations are carried out success;
If so, generating response pass signal;Otherwise, response failure signal is generated.
5. method as claimed in claim 3, which is characterized in that the Bluetooth protocol layer of the terminal notifies the response signal
To UI layers of bluetooth of the terminal, comprising:
The Bluetooth protocol layer of the terminal stores response signal write-in and UI layers of bluetooth shared signal of the terminal
In space, so that UI layers of the bluetooth of the terminal obtain the response signal from the signal memory space.
6. a kind of operation equipment based on bluetooth characterized by comprising
Positioned at the acquisition module of the Bluetooth command encapsulated layer of terminal, for being deposited from UI layers of bluetooth of the terminal shared signal
UI layers of bluetooth of operation signal of the terminal is obtained in storage space;
Positioned at the determining module of the Bluetooth command encapsulated layer of the terminal, for being closed according to operation signal and the corresponding of calling function
System determines the corresponding calling function of the operation signal got;
It is described for the calling function of the determination to be sent to positioned at the sending module of the Bluetooth command encapsulated layer of the terminal
The Bluetooth protocol layer of terminal;
Positioned at the control module of the Bluetooth protocol layer of the terminal, for according to the calling function received, described in execution
Call the corresponding operation of function.
7. equipment as claimed in claim 6, which is characterized in that the control module is specifically used for:
According to the binding relationship for calling function and operation, at least one corresponding operation of the calling function is determined;Execute determination
Operation.
8. equipment as claimed in claim 6, which is characterized in that the control module is also used to:
Generate the corresponding response signal of the operation signal;The response signal is notified to UI layers of bluetooth of the terminal.
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 CN105846863A (en) | 2016-08-10 |
CN105846863B true 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) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106385273B (en) * | 2016-09-13 | 2018-08-07 | 北京叮叮关爱科技有限公司 | Bluetooth communication based on response type and Bluetooth communication method |
CN107257540B (en) | 2017-07-04 | 2020-05-19 | 飞天诚信科技股份有限公司 | Method and device for realizing pairing of Bluetooth equipment and mobile equipment |
US12004061B2 (en) | 2018-08-01 | 2024-06-04 | Huawei Technologies Co., Ltd. | Bluetooth communication method and dual-mode Bluetooth terminal |
CN112445548A (en) * | 2019-09-02 | 2021-03-05 | 广州皓醒湾科技有限公司 | Method and system for processing Bluetooth device operation command and readable storage medium |
Citations (14)
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 |
CN105025292A (en) * | 2015-07-06 | 2015-11-04 | 深圳Tcl数字技术有限公司 | Television set and system and method for factory debugging |
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 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102915113B (en) * | 2012-08-24 | 2016-01-27 | 深圳创维-Rgb电子有限公司 | A kind of data input support method and device |
CN105141686B (en) * | 2015-08-19 | 2019-04-09 | 贵阳朗玛信息技术股份有限公司 | A kind of method and device for realizing Bluetooth communication |
-
2016
- 2016-05-31 CN CN201610379870.3A patent/CN105846863B/en active Active
Patent Citations (14)
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 |
CN105025292A (en) * | 2015-07-06 | 2015-11-04 | 深圳Tcl数字技术有限公司 | Television set and system and method for factory debugging |
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 |
Also Published As
Publication number | Publication date |
---|---|
CN105846863A (en) | 2016-08-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105846863B (en) | A kind of operating method and equipment based on bluetooth | |
US20220117034A1 (en) | Data transmission method and device | |
US11561754B2 (en) | Electronic device and method for displaying and transmitting images thereof | |
CN106293597B (en) | Wireless audio output device | |
WO2020221056A1 (en) | Image drawing method, apparatus, electronic device and computer storage medium | |
KR101556972B1 (en) | A Portable terminal controlling washing machine and operation method for the same | |
CN203289452U (en) | Wireless audio system based on acoustic wave communication pairing | |
CN105718311B (en) | Intelligence system and its implementation and the peripheral hardware for smart machine | |
KR20200074067A (en) | Electronic device and method for processing image | |
CN105557058A (en) | Electronic device and communication connecting method thereof | |
CN107046653A (en) | Audio processing equipment and audio-frequency processing method | |
CN104798379A (en) | Method and system for sharing an output device between multimedia devices to transmit and receive data | |
CN108874350A (en) | Throw screen device and its system | |
CN109684025A (en) | A kind of remote communication method and relevant apparatus | |
KR20170105055A (en) | System and method for realizing Bluetooth-dependent device function of embedded execution system | |
CN114500716A (en) | Cooperative call method, apparatus, device, storage medium and program product | |
CN109413525A (en) | Encoding rate method of adjustment, device, electronic equipment and storage medium | |
CN104768046B (en) | Data transmission method and remote controler | |
CN105229997A (en) | Communication terminal and communication means | |
CN109151784A (en) | Method for connecting network, device and electronic equipment | |
CN208737446U (en) | Throw screen device and its system | |
CN115203716A (en) | Permission synchronization method, related device and system | |
EP3131332B1 (en) | Communication module and data division transmission method using same | |
CN115884142A (en) | Bluetooth connection method and electronic equipment | |
CN114827973B (en) | Binaural consistency control method, graphical interface, system and related device |
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 |