Summary of the invention
The technical problem to be solved in the present invention provides the method for a kind of bluetooth equipment and control bluetooth equipment.
Goal of the invention of the present invention is achieved through the following technical solutions:
A kind of bluetooth equipment, described bluetooth equipment are set up Bluetooth communication with intelligent terminal and are connected, and described bluetooth equipment comprises: bluetooth receiver module, extraction module, main control module, parsing module; Also comprise the one or more modules in audio processing modules, video processing module, light processing module power supply processing module, the alarm clock processing module; Wherein, described bluetooth receiver module is used for receiving the packet that carries control command that described intelligent terminal sends by the SPP agreement; The packet that carries control command that described extraction module is used for receiving unpacks processing, to extract the control command data in the packet; Described parsing module is used for the control command data of extracting is resolved, to obtain different control commands; Described main control module is used for receiving the different control commands that described parsing module sends, and controls the operation of described audio processing modules or video processing module or light processing module or power supply processing module or alarm clock processing module according to different control commands.
Above-mentioned bluetooth equipment, wherein: described control command comprises the audio frequency control order, described audio frequency control order can comprise the play command of song, the pause command of song, song change bent order, the download command of song, the Lyrics downloading order of song, the background picture download command of song, the advance command of song, the backward command of song, the volume control command of song, the playing sequence order of song, described audio processing modules is used for carrying out the play operation of song, the pausing operation of song, the song that changes of song operates, the down operation of song, the Lyrics downloading operation of song, the background picture down operation of song, the forward operation of song, the back operation of song, the volume control operation of song, the playing sequence operation of song.
Above-mentioned bluetooth equipment, wherein: described control command comprises the video control command, described video control command comprises the play command of video, the pause command of video, the switching command of video, the download command of video, the Lyrics downloading order of video, the background picture download command of video, the advance command of video, the backward command of video, the volume control command of video, the playing sequence order of video, described video processing module is used for carrying out the play operation of video, the pausing operation of video, the handover operation of video, the down operation of video, the Lyrics downloading operation of video, the background picture down operation of video, the forward operation of video, the back operation of video, the volume control operation of video, the playing sequence operation of video.
Above-mentioned bluetooth equipment, wherein: described control command comprises the light control command, described light control command comprises the control command of the control of switch, brightness of light and flicker etc., and described light processing module is used for carrying out the switch of light, control and the flicker operation of brightness.
Above-mentioned bluetooth equipment, wherein: described control command comprises the power supply control command, and described power supply control command comprises opening control command and closing control command of power supply, and what described power supply processing module was used for the row power supply opens and closes operation.
Above-mentioned bluetooth equipment, wherein: described control command comprises the alarm clock control command, described alarm clock control command comprises control command being set, opening control command, closing control command and reminding control command of alarm clock, and described alarm clock processing module is used for setting, open and close and the prompting operation of alarm clock.
A kind of method of controlling bluetooth equipment, described method comprises: receive the packet that carries control command that intelligent terminal sends by the SPP agreement; The packet that carries control command that receives is unpacked processing, to extract the control command data in the packet; The control command data of extracting is resolved, to obtain different control commands; According to the different corresponding operations of control command control.
The method of above-mentioned control bluetooth equipment, wherein: described control command comprises the audio frequency control order, described step according to the corresponding operation of different control command control comprises: carry out play operation, the song of song pausing operation, song change bent operation, the down operation of song, the Lyrics downloading operation of song, the background picture down operation of song, the forward operation of song, the back operation of song, the volume control operation of song, the playing sequence of song operates.
The method of above-mentioned control bluetooth equipment, wherein: described control command comprises the video control command, described step according to the different corresponding operations of control command control comprises: carry out the play operation of video, the pausing operation of video, the handover operation of video, the down operation of video, the Lyrics downloading operation of video, the background picture down operation of video, the forward operation of video, the back operation of video, the volume control operation of video, the playing sequence operation of video.
The method of above-mentioned control bluetooth equipment, wherein: described control command comprises the light control command, or the power supply control command, or the alarm clock control command, described step according to the different corresponding operations of control command control comprises: the switch of control light, the control of brightness and flicker operation; Or the control power supply open and close operation; Or the setting of control alarm clock, open and close and prompting operation.
The method of the bluetooth equipment that provides among the present invention and control bluetooth equipment, in bluetooth equipment, increase the control function of bluetooth, receive the packet of the control command of carrying of intelligent terminal transmission, carry out different executable operations according to the different control commands in the packet, increased the control function of control bluetooth equipment, the user's request and the user that have improved blue tooth products experience.
Embodiment
Figure 1 shows that the applied environment system diagram of bluetooth equipment of the present invention.
In the present embodiment, intelligent terminal connects by bluetooth and bluetooth equipment, after intelligent terminal connected by bluetooth and bluetooth equipment, intelligent terminal sent by bluetooth serial port (SPP) agreement and carries the packet of control command to bluetooth equipment.
When bluetooth equipment receives the packet that this carries control command, extract the instruction of control section wherein, and this instruction is resolved, and carry out corresponding control operation according to the control command that parses.
Figure 2 shows that the structure chart of bluetooth equipment of the present invention.
In the present embodiment, bluetooth equipment 2 comprisesbluetooth receiver module 20,extraction module 21,main control module 22,parsing module 23,audio processing modules 24,video processing module 25,power amplifier module 26,light processing module 27,loudspeaker 28, powersupply processing module 29, alarmclock processing module 30.
In the present embodiment,bluetooth receiver module 20 is used for setting up Bluetooth communication with intelligent terminal and is connected, and after setting up the Bluetooth communication connection, receives the packet that carries control command that intelligent terminal sends by the SPP agreement.
Extraction module 21 is used for the packet that carries control command thatbluetooth receiver module 20 receives is unpacked processing, to extract the control command data in the packet.
Parsing module 23 is used for the control command data thatextraction module 21 extracts is resolved, to obtain different control commands.In the present embodiment, control command can comprise audio frequency control order, video control command, light control command, power supply control command, alarm clock control command.The audio frequency control order can comprise play command, the song of song pause command, song change bent order, the download command of song, the Lyrics downloading order of song, the background picture download command of song, the advance command of song, the backward command of song, the volume control command of song, playing sequence order of song etc.The video control command can comprise the play command of video, the pause command of video, the switching command of video, the download command of video, the Lyrics downloading order of video, the background picture download command of video, the advance command of video, the backward command of video, the volume control command of video, playing sequence order of video etc.The light control command can comprise the control command of the control of switch, brightness of light and flicker etc.The power supply control command can comprise opening control command and closing control command of power supply.The alarm clock control command can comprise control command being set, opening control command, closing control command and reminding control command of alarm clock.
The different control commands thatparsing module 23 also is used for parsing are sent tomain control module 22.
Main control module 22 is used for receiving the different control commands thatparsing module 23 sends, according to different control command controlaudio processing modules 24 and the operation ofvideo processing module 25.
In the present embodiment, ifmain control module 22 receives the audio frequency control order thatparsing module 23 is sent, the music operation of controlaudio processing modules 24; In the present embodiment,main control module 22 sends the music operational order toaudio processing modules 24.
Audio processing modules 24 is used for receiving the music operational order thatmain control module 22 sends, and carries out the music operation, and controlpower amplifier module 26 andloudspeaker 28 play sound.In the present embodiment,audio processing modules 24 can be carried out following operation, comprise: the play operation of song, the pausing operation of song, song change bent operation, the down operation of song, the Lyrics downloading operation of song, the background picture down operation of song, the forward operation of song, the back operation of song, the volume control operation of song, the playing sequence of song operates.
Ifmain control module 22 receives the video control command thatparsing module 23 is sent, the vision operation of control video processing module 25.In the present embodiment,main control module 22 sends the vision operation instruction tovideo processing module 25.
In the present embodiment,video processing module 25 is used for receiving the vision operation instruction thatmain control module 22 sends, and carries out vision operation, and controlpower amplifier module 26 andloudspeaker 28 play sound.In the present embodiment,video processing module 25 can be carried out following operation, comprise: the Lyrics downloading operation of the handover operation of the play operation of video, the pausing operation of video, video, the down operation of video, video, the background picture down operation of video, the forward operation of video, the back operation of video, the volume control operation of video, playing sequence operation of video etc.
In the present embodiment,light processing module 27 is used for receiving the light control command thatmain control module 22 sends, and carries out the light control operation.Light processing module 2 can be carried out the switch of light, control and the flicker operation of brightness.
Powersupply processing module 29 is used for receiving the power supply control command thatmain control module 22 sends, and carries out the power supply control operation.Powersupply processing module 29 can be carried out opening of power supply and close operation.
Alarmclock processing module 30 is used for receiving the alarm clock control command order thatmain control module 22 sends, and carries out the alarm clock control operation.Powersupply processing module 29 can be carried out setting, open and close and the prompting operation of alarm clock.
In the present embodiment, this bluetooth equipment can be built in acoustic product or video playback product.In the present embodiment, bluetooth equipment can comprise wherein one or more modules ofaudio processing modules 24,video processing module 25,light processing module 27, powersupply processing module 29, alarmclock processing module 30.
The embodiment that provides in the present invention, in bluetooth equipment, increase the control function of bluetooth, receive the packet of the control command of carrying of intelligent terminal transmission, carry out different executable operations according to the different control commands in the packet, increased the control function of control bluetooth equipment, the user's request and the user that have improved blue tooth products experience.
Fig. 3 is the flow chart of the method for control bluetooth equipment provided by the invention.
In the present embodiment, step S300, bluetooth equipment set up Bluetooth communication with intelligent terminal and are connected.
Step S302 receives the packet that carries control command that intelligent terminal sends by the SPP agreement.
Step S304 unpacks processing with the packet that carries control command that receives, to extract the control command data in the packet.
Step S306 resolves the control command data of extracting, to obtain different control commands.In the present embodiment, control command can comprise audio frequency control order, video control command, light control command, power supply control command, alarm clock control command.The audio frequency control order can comprise play command, the song of song pause command, song change bent order, the download command of song, the Lyrics downloading order of song, the background picture download command of song, the advance command of song, the backward command of song, the volume control command of song, playing sequence order of song etc.The video control command can comprise the play command of video, the pause command of video, the switching command of video, the download command of video, the Lyrics downloading order of video, the background picture download command of video, the advance command of video, the backward command of video, the volume control command of video, playing sequence order of video etc.The light control command can comprise the control command of the control of switch, brightness of light and flicker etc.The power supply control command can comprise opening control command and closing control command of power supply.The alarm clock control command can comprise control command being set, opening control command, closing control command and reminding control command of alarm clock.
Step S306 is according to the different corresponding operations of control command control.
In the present embodiment, the operation of control audio frequency can comprise: the pausing operation of play operation, the song of control song, song change bent operation, the down operation of song, the Lyrics downloading operation of song, the background picture down operation of song, the forward operation of song, the back operation of song, the volume control operation of song, the playing sequence of song operates.
In the present embodiment, the operation of control video can comprise: the play operation of control video, the pausing operation of video, the handover operation of video, the down operation of video, the Lyrics downloading operation of video, the background picture down operation of video, the forward operation of video, the back operation of video, the volume control operation of video, playing sequence operation of video etc.
In the present embodiment, the operation of control light can comprise: the switch of control light, the control of brightness and flicker operation.
In the present embodiment, the operation of control power supply can comprise: the control power supply open and close operation.
In the present embodiment, the operation of control alarm clock can comprise: the setting of control alarm clock, open and close and prompting operation.
The embodiment that provides in the present invention, in bluetooth equipment, increase the control function of bluetooth, receive the packet of the control command of carrying of intelligent terminal transmission, carry out different executable operations according to the different control commands in the packet, increased the control function of control bluetooth equipment, the user's request and the user that have improved blue tooth products experience.
The embodiment of the above is better embodiment of the present invention, is not to limit implementation scope of the present invention with this, and scope of the present invention comprises and is not limited to this embodiment.The equivalence variation that all shapes according to the present invention, structure are done all comprises in protection scope of the present invention.