CN105120499B - The method and system that bluetooth master slave mode automatically switches - Google Patents

The method and system that bluetooth master slave mode automatically switches Download PDF

Info

Publication number
CN105120499B
CN105120499B CN201510520189.1A CN201510520189A CN105120499B CN 105120499 B CN105120499 B CN 105120499B CN 201510520189 A CN201510520189 A CN 201510520189A CN 105120499 B CN105120499 B CN 105120499B
Authority
CN
China
Prior art keywords
bluetooth
mode
smart machine
equipment
routing device
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
Application number
CN201510520189.1A
Other languages
Chinese (zh)
Other versions
CN105120499A (en
Inventor
雷夏平
王云华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN201510520189.1A priority Critical patent/CN105120499B/en
Publication of CN105120499A publication Critical patent/CN105120499A/en
Application granted granted Critical
Publication of CN105120499B publication Critical patent/CN105120499B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/06Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • H04W84/20Master-slave selection or change arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of methods that bluetooth master slave mode automatically switches, comprising: routing device judges the working condition of the bluetooth mode of bluetooth equipment and the bluetooth equipment in local area network;When the bluetooth equipment connected in the local area network is in bluetooth holotype and the Bluetooth device operation when blue-teeth data output state, the routing device obtains the bluetooth mode of the smart machine in the local area network;When the smart machine is in bluetooth holotype, the routing device sends bluetooth mode switching command to the smart machine;The bluetooth mode of itself is switched to bluetooth slave pattern according to the bluetooth mode switching command by the smart machine.The invention also discloses the systems that a kind of bluetooth master slave mode automatically switches.The present invention realizes the bluetooth master slave mode for automatically switching smart machine, is manually operated without user, more convenient.

Description

The method and system that bluetooth master slave mode automatically switches
Technical field
The present invention relates to technical field of intelligent equipment, the in particular to method and system of bluetooth master slave mode automatic switchover.
Background technique
With gradualling mature for Bluetooth technology, smart machine and its relevant external equipment with blue tooth communication function It emerges one after another.Such as television set bluetooth-capable, mobile phone, tablet computer, speaker etc..It is various with blue tooth communication function Equipment can be divided into three classes again: one kind is can only to receive Bluetooth slave devices of data, such as Baffle Box of Bluetooth, bluetooth headset etc.;Separately One kind is the bluetooth master that can only send data, such as Bluetooth player, blue Tooth remote controller etc.;It is that can both connect there are also one kind The equipment received data, can send data again, this kind of equipment can switch between equipment mode and main equipment mode, when It is in from equipment mode, the data sent for receiving bluetooth master, when it is in main equipment mode, is used for indigo plant Tooth sends data, such as intelligent TV set, mobile phone, tablet computer etc. from equipment.
It, can be by current television program when intelligent TV set is in main equipment mode by taking intelligent TV set as an example The music of broadcasting is sent to bluetooth headset, Baffle Box of Bluetooth etc. from equipment, is played in television set just by bluetooth headset or Baffle Box of Bluetooth In the music of broadcasting.When intelligent TV set is in from equipment mode, if mobile phone is in main equipment mode, mobile phone can be by hand Music being played on is sent to television set in machine, and the music in mobile phone is played by the loudspeaker that television set carries.But current Smart machine with bluetooth master slave mode can be connect with bluetooth master and Bluetooth slave devices simultaneously, it usually needs user passes through The mode that System menu is arranged carrys out the bluetooth master slave mode of manual switching smart machine, complex for operation step, bluetooth master slave mode Switch very inconvenient.
Summary of the invention
The main object of the present invention is to provide a kind of method and system that bluetooth master slave mode automatically switches, and can be cut automatically The bluetooth master slave mode of smart machine is changed, During manual operation is reduced.
The present invention proposes a kind of method that bluetooth master slave mode automatically switches, comprising steps of
Routing device judges the working condition of the bluetooth mode of bluetooth equipment and the bluetooth equipment in local area network;
When the bluetooth equipment connected in the local area network is in bluetooth holotype and the Bluetooth device operation in bluetooth When data output state, the routing device obtains the bluetooth mode of the smart machine in the local area network;
When the smart machine is in bluetooth holotype, the routing device sends bluetooth mode switching command to described Smart machine;
The bluetooth mode of itself is switched to bluetooth slave pattern according to the bluetooth mode switching command by the smart machine.
Preferably, the bluetooth mode of itself is switched to bluetooth according to the bluetooth mode switching command by the smart machine After the step of slave pattern further include:
The smart machine monitors whether to receive the blue-teeth data from the bluetooth equipment;
If it is, the smart machine plays the blue-teeth data received, and continue to monitor whether to receive to come From in the blue-teeth data of the bluetooth equipment;
If it is not, then the bluetooth mode of itself is switched to bluetooth holotype by the smart machine.
Preferably, the step of bluetooth mode of itself is switched to bluetooth holotype by the smart machine include:
When not receiving the blue-teeth data, the smart machine starts timing;
In timing course, when receiving the blue-teeth data, the smart machine timing is reset;
When not receiving the timing duration arrival time threshold value of the blue-teeth data, the smart machine is by the indigo plant of itself Tooth pattern switching is bluetooth holotype.
Preferably, the bluetooth mode of bluetooth equipment and the work of the bluetooth equipment in the routing device scanning local area network After the step of making state further include:
There are the bluetooth equipment in bluetooth holotype, or the indigo plant in bluetooth holotype when not connected in the local area network When tooth equipment does not work in blue-teeth data output state, the routing device closes the switching control function of itself;
When there is new bluetooth equipment to access the local area network, the routing device reopens the switching control of itself Function.
Preferably, the routing device judges the work of the bluetooth mode of bluetooth equipment and the bluetooth equipment in local area network After the step of making state further include:
When the routing device determines that the bluetooth mode of the bluetooth equipment is in bluetooth holotype, the routing device First numerical value is determined as 1;Otherwise, the first numerical value is determined as 0;
When the routing device determines the Bluetooth device operation when blue-teeth data output state, the routing device will Second value is determined as 1;Otherwise, second value is determined as 0;
First numerical value and second value logical AND are obtained third value by the routing device;
The bluetooth equipment connected in the local area network be in bluetooth holotype and the Bluetooth device operation in When blue-teeth data output state, the step of routing device obtains the bluetooth mode of the smart machine in the local area network packet It includes:
When third value is 1, the routing device determines that the third value is effective, obtains in the local area network The bluetooth mode of smart machine;
It is described to have the bluetooth equipment in bluetooth holotype when not connected in the local area network, or it is in bluetooth holotype Bluetooth equipment when not working in blue-teeth data output state, the routing device closes the step of the switching control function of itself Suddenly include:
When third value is 0, the routing device determines that the third value is invalid, and the routing device closes itself Switching control function.
The present invention also proposes a kind of system that bluetooth master slave mode automatically switches, including routing device and smart machine:
The routing device includes:
Scan module, for judging the work shape of the bluetooth mode of bluetooth equipment and the bluetooth equipment in local area network State;When the bluetooth equipment connected in the local area network is in bluetooth holotype and the Bluetooth device operation is defeated in blue-teeth data When doing well, the bluetooth mode of the smart machine in the local area network is obtained;
Switching control module, for sending bluetooth mode switching command when the smart machine is in bluetooth holotype To the smart machine;
The smart machine includes:
Switch setting module, for according to the bluetooth mode switching command by the bluetooth mode of itself be switched to bluetooth from Mode.
Preferably, the smart machine further include:
Data monitoring module receives the blue-teeth data from the bluetooth equipment for monitoring whether;
Playing module, when in the data monitoring module monitors to the blue-teeth data from the bluetooth equipment, Play the blue-teeth data received;
The switching setting module is also used to, and is not monitored in the data monitoring module from the bluetooth equipment When blue-teeth data, the bluetooth mode of itself is switched to bluetooth holotype.
Preferably, the smart machine further include:
Timing module, for starting timing when the data monitoring module does not monitor the blue-teeth data;In timing In the process, when the data monitoring module monitors are to the blue-teeth data, timing is reset;
The switching setting module is also used to, when the timing duration arrival time threshold value for not receiving the blue-teeth data When, the bluetooth mode of itself is switched to bluetooth holotype.
Preferably, the scan module of the routing device is also used to:
There are the bluetooth equipment in bluetooth holotype, or the indigo plant in bluetooth holotype when not connected in the local area network When tooth equipment does not work in blue-teeth data output state, the switching control function of the routing device is closed;
When there is new bluetooth equipment to access the local area network, the switching control function of the routing device is reopened Energy.
Preferably, the scan module of the routing device is also used to:
When the bluetooth mode for determining the bluetooth equipment is in bluetooth holotype, the first numerical value is determined as 1;Otherwise, First numerical value is determined as 0;
When determining that second value when blue-teeth data output state, is determined as 1 by the Bluetooth device operation;Otherwise, will Second value is determined as 0;
By first numerical value and second value logical AND, third value is obtained;
When third value is 1, determines that the third value is effective, obtain the indigo plant of the smart machine in the local area network Tooth mode;
When third value is 0, determines that the third value is invalid, close the switching control function of the routing device.
The present invention carries out pattern-recognition and working condition judgement by the equipment in routing device local area network, when having connected The bluetooth equipment of local area network is in bluetooth holotype and works in blue-teeth data output state, and smart machine is in bluetooth slave pattern When, routing device sends bluetooth mode switching command to smart machine, and the bluetooth mode of itself is switched to bluetooth by smart machine Slave pattern is manually operated without user, realizes the bluetooth master slave mode for automatically switching smart machine.
Detailed description of the invention
Fig. 1 is the flow chart of the first embodiment for the method that bluetooth master slave mode of the present invention automatically switches;
Fig. 2 is the flow chart of the second embodiment for the method that bluetooth master slave mode of the present invention automatically switches;
Fig. 3 is the flow chart of the 3rd embodiment for the method that bluetooth master slave mode of the present invention automatically switches;
Fig. 4 is the flow chart of the fourth embodiment for the method that bluetooth master slave mode of the present invention automatically switches;
Fig. 5 is the flow chart of the 5th embodiment of the method that bluetooth master slave mode of the present invention automatically switches;
Fig. 6 is the module diagram of the first embodiment for the system that bluetooth master slave mode of the present invention automatically switches;
Fig. 7 is the module diagram of the second embodiment for the system that bluetooth master slave mode of the present invention automatically switches;
Fig. 8 is the module diagram of the 3rd embodiment for the system that bluetooth master slave mode of the present invention automatically switches.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
As shown in FIG. 1, FIG. 1 is the flow charts of the first embodiment of the method for bluetooth master slave mode of the present invention automatic switchover. The method that the bluetooth master slave mode that the present embodiment is mentioned automatically switches, comprising steps of
Step S10, routing device judge the working condition of the bluetooth mode of bluetooth equipment and bluetooth equipment in local area network;
It include a routing device in local area network in the present embodiment, the smart machines such as mobile phone, television set can lead to Wired or wireless network is crossed to be connected on routing device.Whether routing device has bluetooth to the equipment being connected in local area network Function is judged, if the equipment having connected has Bluetooth function, judges whether the bluetooth equipment has turned on Bluetooth function, Whether work in bluetooth master mode, if having blue-teeth data output.For example, using mobile phone as bluetooth equipment, television set is made For the smart machine that bluetooth mode can be switched, mobile phone connects routing device with television set, and routing device judges whether mobile phone is opened Bluetooth function, if it is, judging whether mobile phone is currently playing music, if it is, thinking that mobile phone is in bluetooth Holotype, and work in blue-teeth data output state.
Step S20, when the bluetooth equipment connected in local area network is in bluetooth holotype and Bluetooth device operation in bluetooth When data output state, routing device obtains the bluetooth mode of the smart machine in local area network;
When mobile phone is in bluetooth holotype and works in blue-teeth data output state, television set can be used for playing mobile phone defeated Audio out, television set needs for bluetooth mode to be switched to from equipment mode at this time, for receiving the blue-teeth data of mobile phone output. Therefore, routing device can obtain the bluetooth mode of television set at this moment by network.
Step S30, when smart machine is in bluetooth holotype, routing device sends bluetooth mode switching command to intelligence Equipment;
If television set is in bluetooth holotype, need to be switched to bluetooth slave pattern, routing device generates bluetooth mould Formula switching command, and bluetooth mode switching command is sent to by television set by network.
The bluetooth mode of itself is switched to bluetooth slave pattern according to bluetooth mode switching command by step S40, smart machine.
Television set receive pattern switching instruction after, by the bluetooth mode of itself by bluetooth holotype be switched to bluetooth from Mode, and bluetooth connection is established with mobile phone, mobile phone exports audio data to television set, plays audio by the loudspeaker of television set.
When bluetooth equipment is in bluetooth holotype and works in blue-teeth data output state, smart machine is in bluetooth from mould When formula, without the bluetooth mode of switching smart machine, after smart machine is connect with bluetooth equipment, smart machine can be received directly The blue-teeth data exported to bluetooth equipment, and the blue-teeth data is played, routing device need not send bluetooth mode to smart machine Switching command.
The present embodiment carries out pattern-recognition and working condition judgement by the equipment in routing device local area network, when having connected The bluetooth equipment for connecing local area network is in bluetooth holotype and works in blue-teeth data output state, and smart machine is in bluetooth from mould When formula, routing device sends bluetooth mode switching command to smart machine, and the bluetooth mode of itself is switched to indigo plant by smart machine Tooth slave pattern is manually operated without user, realizes the bluetooth master slave mode for automatically switching smart machine.
As shown in Fig. 2, Fig. 2 is the flow chart of the second embodiment for the method that bluetooth master slave mode of the present invention automatically switches. The present embodiment includes the steps that embodiment illustrated in fig. 1, after step S40 further include:
Step S41, smart machine monitor whether to receive the blue-teeth data from bluetooth equipment;If it is, executing Step S42;If not, thening follow the steps S43;
Step S42, smart machine plays the blue-teeth data received, and continues to monitor whether to receive to set from bluetooth Standby blue-teeth data;
The bluetooth mode of itself is switched to bluetooth holotype by step S43, smart machine.
The present embodiment still by taking television set is smart machine, mobile phone is bluetooth equipment as an example, television set be switched to bluetooth from After mode, the audio data that mobile phone is sent is received, and play the audio received.In the process, television set monitoring bluetooth is logical The audio data for whether thering is mobile phone to send in communication network, if there is audio data transmission always, the television for play audio number According to, and continue to monitor.If the audio broadcasting on mobile phone terminates, television set monitors do not have data biography in bluetooth communication network Defeated, then the bluetooth mode of itself is switched to bluetooth holotype by bluetooth slave pattern automatically by television set.In this way, realize intelligence Energy equipment is switched to bluetooth holotype by bluetooth slave pattern automatically, without user's manual switching.
As shown in figure 3, Fig. 3 is the flow chart of the 3rd embodiment for the method that bluetooth master slave mode of the present invention automatically switches. The present embodiment includes the steps that embodiment illustrated in fig. 2, and step S43 includes:
Step S431, smart machine start timing;
Step S432, in timing course, when receiving blue-teeth data, smart machine timing is reset;Return step S41;
Step S433, when not receiving the timing duration arrival time threshold value of blue-teeth data, smart machine by itself Bluetooth mode is switched to bluetooth holotype.
The present embodiment is still by taking television set is smart machine, mobile phone is bluetooth equipment as an example, it is contemplated that mobile phone is playing audio When, after completing previous first audio broadcasting, before cutting next audio and playing, centre has of short duration time slot, or Person is after completing a first audio and broadcasting, and user also has between a time when manually selecting another first audio on mobile phone Gap.It therefore, can be pre- in order to avoid causing smart machine frequently to switch bluetooth mode when switching blue-teeth data to be transmitted One time threshold is first set, and smart machine starts timing when monitoring not having Bluetooth data transfer.In time threshold range Interior, smart machine still maintains bluetooth slave pattern, before timing time arrival time threshold value, if smart machine has received Blue-teeth data, then timing is reset.In timing time arrival time threshold value, if smart machine is still not received by bluetooth number According to the bluetooth mode of itself is switched to bluetooth holotype by smart machine at this time, is no longer waiting for playing the number of bluetooth equipment transmission According to, but play the data of smart machine itself.In this way, effectively prevent causing when switching blue-teeth data to be transmitted Smart machine frequently switches bluetooth mode.
As shown in figure 4, Fig. 4 is the flow chart of the fourth embodiment for the method that bluetooth master slave mode of the present invention automatically switches. The present embodiment includes the steps that embodiment illustrated in fig. 1, after step S10 further include:
Step S50 has the bluetooth equipment in bluetooth holotype when not connected in local area network, or is in bluetooth holotype Bluetooth equipment when not working in blue-teeth data output state, routing device closes the switching control function of itself;
Step S60, when there is new bluetooth equipment access to LAN network, routing device reopens the switching control of itself Function.
The present embodiment is still by taking television set is smart machine, mobile phone is bluetooth equipment as an example, when routing device scans local area network When network, it is found that the mobile phone having connected does not open Bluetooth function;Although or open Bluetooth function, be in bluetooth slave pattern; Although or be in bluetooth holotype, currently without play audio or video, but on interface of main menu or some application Interface on, i.e. no blue-teeth data output;Bluetooth holotype also is in without other equipment in local area network and works in indigo plant Tooth data output state.At this point, routing device can close the switching control function correlation module of itself for energy saving, have Conducive to reduction electric energy and network flow.After new bluetooth equipment accesses routing device, routing device reopens switching control again Function processed, and the bluetooth mode and working condition of the bluetooth equipment newly accessed are judged.It is set in this way, be conducive to routing Standby energy saving, and realize routing device automatic switch bluetooth mode switching control function.
As shown in figure 5, Fig. 5 is the flow chart of the 5th embodiment of the method that bluetooth master slave mode of the present invention automatically switches. The present embodiment includes the steps that embodiment illustrated in fig. 4, after step S10 further include:
Step S71, when routing device determines that the bluetooth mode of bluetooth equipment is in bluetooth holotype, routing device is by the One numerical value is determined as 1;Otherwise, the first numerical value is determined as 0;
Step S72, when routing device determines Bluetooth device operation when blue-teeth data output state, routing device is by second Numerical value is determined as 1;Otherwise, second value is determined as 0;
First numerical value and second value logical AND are obtained third value by step S73, routing device;
Step S20 includes:
Step S21, when third value is 1, routing device determines that third value is effective, obtains the intelligence in local area network The bluetooth mode of equipment;
Step S50 includes:
Step S51, when third value is 0, routing device determines that third value is invalid, and routing device closes cutting for itself Change control function.
The present embodiment is by way of output digit signals to determine whether needing to switch the bluetooth mode of smart machine.Still Using mobile phone as bluetooth equipment, television set as the smart machine of changeable bluetooth mode.When mobile phone opens bluetooth function When energy, the first numerical value is 1;When mobile phone closes Bluetooth function or is in bluetooth slave pattern, the first numerical value is 0.When mobile phone just When playing video or audio, second value 1;When mobile phone is in main interface or other application interface, second value 0. Routing device is by the first numerical value and second value logical AND, and when only two values are all 1, the third value of output is just 1, this When third value it is effective, routing device obtains the bluetooth mode of television set, and when television set is in bluetooth holotype, to electricity Bluetooth mode switching command is exported depending on machine.When any of two values are 0, the third value of output is 0, third at this time Numerical value is invalid, and the switching that routing device need not control television set bluetooth mode can close routing at this time and set for energy saving Standby bluetooth mode switching control function.Using numerical approach to determine whether needing to switch the bluetooth mode of smart machine, make Routing device is more convenient to the bluetooth mode of bluetooth equipment and the judgement of working condition, it is possible to use only simple low and high level As judging result signal, also simple gate circuit is only needed to can be realized on circuit structure, is conducive to simplify circuit structure.
As shown in fig. 6, Fig. 6 is the module signal of the first embodiment for the system that bluetooth master slave mode of the present invention automatically switches Figure.The system that the bluetooth master slave mode that the present embodiment is mentioned automatically switches, including routing device 100 and smart machine 200:
Routing device 100 includes:
Scan module 110, for judging the working condition of the bluetooth mode of bluetooth equipment and bluetooth equipment in local area network; When the bluetooth equipment connected in local area network is in bluetooth holotype and Bluetooth device operation when blue-teeth data output state, obtain Take the bluetooth mode of the smart machine 200 in local area network;
Switching control module 120 refers to for when smart machine 200 is in bluetooth holotype, sending bluetooth mode switching It enables to smart machine 200;
Smart machine 200 includes:
Switch setting module 210, for according to bluetooth mode switching command by the bluetooth mode of itself be switched to bluetooth from Mode.
It include a routing device in local area network in the present embodiment, the smart machines such as mobile phone, television set can lead to Wired or wireless network is crossed to be connected on routing device.Whether routing device has bluetooth to the equipment being connected in local area network Function is judged, if the equipment having connected has Bluetooth function, judges whether the bluetooth equipment has turned on Bluetooth function, Whether work in bluetooth master mode, if having blue-teeth data output.For example, using mobile phone as bluetooth equipment, television set is made For the smart machine that bluetooth mode can be switched, mobile phone connects routing device with television set, and routing device judges whether mobile phone is opened Bluetooth function, if it is, judging whether mobile phone is currently playing music, if it is, thinking that mobile phone is in bluetooth Holotype, and work in blue-teeth data output state.
When mobile phone is in bluetooth holotype and works in blue-teeth data output state, television set can be used for playing mobile phone defeated Audio out, television set needs for bluetooth mode to be switched to from equipment mode at this time, for receiving the blue-teeth data of mobile phone output. Therefore, routing device can obtain the bluetooth mode of television set at this moment by network.If television set is in bluetooth holotype, Then need to be switched to bluetooth slave pattern, routing device generates bluetooth mode switching command, and switches bluetooth mode by network Instruction is sent to television set.Television set is cut the bluetooth mode of itself by bluetooth holotype after receiving pattern switching instruction It is changed to bluetooth slave pattern, and establishes bluetooth connection with mobile phone, mobile phone exports audio data to television set, by the loudspeaker of television set Play audio.
When bluetooth equipment is in bluetooth holotype and works in blue-teeth data output state, smart machine is in bluetooth from mould When formula, without the bluetooth mode of switching smart machine, after smart machine is connect with bluetooth equipment, smart machine can be received directly The blue-teeth data exported to bluetooth equipment, and the blue-teeth data is played, routing device need not send bluetooth mode to smart machine Switching command.
The present embodiment carries out pattern-recognition and working condition judgement by the equipment in routing device local area network, when having connected The bluetooth equipment for connecing local area network is in bluetooth holotype and works in blue-teeth data output state, and smart machine is in bluetooth from mould When formula, routing device sends bluetooth mode switching command to smart machine, and the bluetooth mode of itself is switched to indigo plant by smart machine Tooth slave pattern is manually operated without user, realizes the bluetooth master slave mode for automatically switching smart machine.
As shown in fig. 7, Fig. 7 is the module signal of the second embodiment for the system that bluetooth master slave mode of the present invention automatically switches Figure.The present embodiment includes the module of embodiment illustrated in fig. 6, smart machine 200 further include:
Data monitoring module 220 receives the blue-teeth data from bluetooth equipment for monitoring whether;
Playing module 230, for broadcasting when data monitoring module 220 is monitored from the blue-teeth data of bluetooth equipment Put the blue-teeth data received;
Switching setting module 210 is also used to, and does not monitor the bluetooth number from bluetooth equipment in data monitoring module 220 According to when, the bluetooth mode of itself is switched to bluetooth holotype.
The present embodiment still by taking television set is smart machine, mobile phone is bluetooth equipment as an example, television set be switched to bluetooth from After mode, the audio data that mobile phone is sent is received, and play the audio received.In the process, television set monitoring bluetooth is logical The audio data for whether thering is mobile phone to send in communication network, if there is audio data transmission always, the television for play audio number According to, and continue to monitor.If the audio broadcasting on mobile phone terminates, television set monitors do not have data biography in bluetooth communication network Defeated, then the bluetooth mode of itself is switched to bluetooth holotype by bluetooth slave pattern automatically by television set.In this way, realize intelligence Energy equipment is switched to bluetooth holotype by bluetooth slave pattern automatically, without user's manual switching.
As shown in figure 8, Fig. 8 is the module signal of the 3rd embodiment for the system that bluetooth master slave mode of the present invention automatically switches Figure.The present embodiment includes the module of embodiment illustrated in fig. 7, smart machine 200 further include:
Timing module 240, for starting timing when data monitoring module 220 does not monitor blue-teeth data;In timing Cheng Zhong, when data monitoring module 220 monitors blue-teeth data, timing is reset;
Switching setting module 210 is also used to, will be certainly when not receiving the timing duration arrival time threshold value of blue-teeth data The bluetooth mode of body is switched to bluetooth holotype.
The present embodiment is still by taking television set is smart machine, mobile phone is bluetooth equipment as an example, it is contemplated that mobile phone is playing audio When, after completing previous first audio broadcasting, before cutting next audio and playing, centre has of short duration time slot, or Person is after completing a first audio and broadcasting, and user also has between a time when manually selecting another first audio on mobile phone Gap.It therefore, can be pre- in order to avoid causing smart machine frequently to switch bluetooth mode when switching blue-teeth data to be transmitted One time threshold is first set, and smart machine starts timing when monitoring not having Bluetooth data transfer.In time threshold range Interior, smart machine still maintains bluetooth slave pattern, before timing time arrival time threshold value, if smart machine has received Blue-teeth data, then timing is reset.In timing time arrival time threshold value, if smart machine is still not received by bluetooth number According to the bluetooth mode of itself is switched to bluetooth holotype by smart machine at this time, is no longer waiting for playing the number of bluetooth equipment transmission According to, but play the data of smart machine itself.In this way, effectively prevent causing when switching blue-teeth data to be transmitted Smart machine frequently switches bluetooth mode.
Further, the scan module 110 of routing device 100 is also used to:
There is the bluetooth equipment in bluetooth holotype when not connected in local area network, or the bluetooth in bluetooth holotype is set For when not working in blue-teeth data output state, the switching control function of routing device 100 is closed;
When there is new bluetooth equipment access to LAN network, the switching control function of routing device 100 is reopened.
The present embodiment is still by taking television set is smart machine, mobile phone is bluetooth equipment as an example, when routing device scans local area network When network, it is found that the mobile phone having connected does not open Bluetooth function;Although or open Bluetooth function, be in bluetooth slave pattern; Although or be in bluetooth holotype, currently without play audio or video, but on interface of main menu or some application Interface on, i.e. no blue-teeth data output;Bluetooth holotype also is in without other equipment in local area network and works in indigo plant Tooth data output state.At this point, routing device can close the switching control function correlation module of itself for energy saving, have Conducive to reduction electric energy and network flow.After new bluetooth equipment accesses routing device, routing device reopens switching control again Function processed, and the bluetooth mode and working condition of the bluetooth equipment newly accessed are judged.It is set in this way, be conducive to routing Standby energy saving, and realize routing device automatic switch bluetooth mode switching control function.
Further, the scan module 110 of routing device 100 is also used to:
When the bluetooth mode for determining bluetooth equipment is in bluetooth holotype, the first numerical value is determined as 1;Otherwise, by One numerical value is determined as 0;
When determine Bluetooth device operation when blue-teeth data output state, second value is determined as 1;Otherwise, by second Numerical value is determined as 0;
By the first numerical value and second value logical AND, third value is obtained;
When third value is 1, determines that third value is effective, obtain the bluetooth mould of the smart machine 200 in local area network Formula;
When third value is 0, determines that third value is invalid, close the switching control function of routing device 100.
The present embodiment is by way of output digit signals to determine whether needing to switch the bluetooth mode of smart machine.Still Using mobile phone as bluetooth equipment, television set as the smart machine of changeable bluetooth mode.When mobile phone opens bluetooth function When energy, the first numerical value is 1;When mobile phone closes Bluetooth function or is in bluetooth slave pattern, the first numerical value is 0.When mobile phone just When playing video or audio, second value 1;When mobile phone is in main interface or other application interface, second value 0. Routing device is by the first numerical value and second value logical AND, and when only two values are all 1, the third value of output is just 1, this When third value it is effective, routing device obtains the bluetooth mode of television set, and when television set is in bluetooth holotype, to electricity Bluetooth mode switching command is exported depending on machine.When any of two values are 0, the third value of output is 0, third at this time Numerical value is invalid, and the switching that routing device need not control television set bluetooth mode can close routing at this time and set for energy saving Standby bluetooth mode switching control function.Using numerical approach to determine whether needing to switch the bluetooth mode of smart machine, make Routing device is more convenient to the bluetooth mode of bluetooth equipment and the judgement of working condition, it is possible to use only simple low and high level As judging result signal, also simple gate circuit is only needed to can be realized on circuit structure, is conducive to simplify circuit structure.
The above description is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all utilizations Equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content is applied directly or indirectly in other correlations Technical field, be included within the scope of the present invention.

Claims (10)

1. a kind of method that bluetooth master slave mode automatically switches, which is characterized in that comprising steps of
Routing device judges the working condition of the bluetooth mode of bluetooth equipment and the bluetooth equipment in local area network;
When the bluetooth equipment connected in the local area network is in bluetooth holotype and the Bluetooth device operation in blue-teeth data When output state, the routing device obtains the bluetooth mode of the smart machine in the local area network;
When the smart machine is in bluetooth holotype, the routing device sends bluetooth mode switching command to the intelligence Equipment;
The bluetooth mode of itself is switched to bluetooth slave pattern according to the bluetooth mode switching command by the smart machine.
2. the method that bluetooth master slave mode as described in claim 1 automatically switches, which is characterized in that the smart machine according to After the step of bluetooth mode of itself is switched to bluetooth slave pattern by the bluetooth mode switching command further include:
The smart machine monitors whether to receive the blue-teeth data from the bluetooth equipment;
If it is, the smart machine plays the blue-teeth data received, and continue to monitor whether to receive from The blue-teeth data of the bluetooth equipment;
If it is not, then the bluetooth mode of itself is switched to bluetooth holotype by the smart machine.
3. the method that bluetooth master slave mode as claimed in claim 2 automatically switches, which is characterized in that the smart machine will be certainly The bluetooth mode of body is switched to the step of bluetooth holotype and includes:
When not receiving the blue-teeth data, the smart machine starts timing;
In timing course, when receiving the blue-teeth data, the smart machine timing is reset;
When not receiving the timing duration arrival time threshold value of the blue-teeth data, the smart machine is by the bluetooth mould of itself Formula is switched to bluetooth holotype.
4. the method that bluetooth master slave mode as described in any one of claims 1 to 3 automatically switches, which is characterized in that the road It is also wrapped after the step of scanning the working condition of the bluetooth mode of bluetooth equipment and the bluetooth equipment in local area network by equipment It includes:
There is the bluetooth equipment in bluetooth holotype when not connected in the local area network, or the bluetooth in bluetooth holotype is set For when not working in blue-teeth data output state, the routing device closes the switching control function of itself;
When there is new bluetooth equipment to access the local area network, the routing device reopens the switching control function of itself Energy.
5. the method that bluetooth master slave mode as claimed in claim 4 automatically switches, which is characterized in that the routing device judgement In local area network the step of the working condition of the bluetooth mode of bluetooth equipment and the bluetooth equipment after further include:
When the routing device determines that the bluetooth mode of the bluetooth equipment is in bluetooth holotype, the routing device is by One numerical value is determined as 1;Otherwise, the first numerical value is determined as 0;
When the routing device determines the Bluetooth device operation when blue-teeth data output state, the routing device is by second Numerical value is determined as 1;Otherwise, second value is determined as 0;
First numerical value and second value logical AND are obtained third value by the routing device;
The bluetooth equipment connected in the local area network of working as is in bluetooth holotype and the Bluetooth device operation in bluetooth When data output state, the step of routing device obtains the bluetooth mode of the smart machine in the local area network, includes:
When third value is 1, the routing device determines that the third value is effective, obtains the intelligence in the local area network The bluetooth mode of equipment;
It is described to have the bluetooth equipment in bluetooth holotype, or the indigo plant in bluetooth holotype when not connected in the local area network When tooth equipment does not work in blue-teeth data output state, the step of routing device closes the switching control function of itself packet It includes:
When third value is 0, the routing device determines that the third value is invalid, and the routing device closes cutting for itself Change control function.
6. the system that a kind of bluetooth master slave mode automatically switches, which is characterized in that including routing device and smart machine:
The routing device includes:
Scan module, for judging the working condition of the bluetooth mode of bluetooth equipment and the bluetooth equipment in local area network;When The bluetooth equipment connected in the local area network is in bluetooth holotype and the Bluetooth device operation is in blue-teeth data output shape When state, the bluetooth mode of the smart machine in the local area network is obtained;
Switching control module, for when the smart machine is in bluetooth holotype, sending bluetooth mode switching command to institute State smart machine;
The smart machine includes:
Switch setting module, for the bluetooth mode of itself to be switched to bluetooth from mould according to the bluetooth mode switching command Formula.
7. the system that bluetooth master slave mode as claimed in claim 6 automatically switches, which is characterized in that the smart machine also wraps It includes:
Data monitoring module receives the blue-teeth data from the bluetooth equipment for monitoring whether;
Playing module when in the data monitoring module monitors to the blue-teeth data from the bluetooth equipment, plays The blue-teeth data received;
The switching setting module is also used to, and does not monitor the bluetooth from the bluetooth equipment in the data monitoring module When data, the bluetooth mode of itself is switched to bluetooth holotype.
8. the system that bluetooth master slave mode as claimed in claim 7 automatically switches, which is characterized in that the smart machine also wraps It includes:
Timing module, for starting timing when the data monitoring module does not monitor the blue-teeth data;In timing course In, when the data monitoring module monitors are to the blue-teeth data, timing is reset;
The switching setting module is also used to, will when not receiving the timing duration arrival time threshold value of the blue-teeth data The bluetooth mode of itself is switched to bluetooth holotype.
9. the system automatically switched such as the described in any item bluetooth master slave modes of claim 6 to 8, which is characterized in that the road It is also used to by the scan module of equipment:
There is the bluetooth equipment in bluetooth holotype when not connected in the local area network, or the bluetooth in bluetooth holotype is set For when not working in blue-teeth data output state, the switching control function of the routing device is closed;
When there is new bluetooth equipment to access the local area network, the switching control function of the routing device is reopened.
10. the system that bluetooth master slave mode as claimed in claim 9 automatically switches, which is characterized in that the routing device Scan module is also used to:
When the bluetooth mode for determining the bluetooth equipment is in bluetooth holotype, the first numerical value is determined as 1;Otherwise, by One numerical value is determined as 0;
When determining that second value when blue-teeth data output state, is determined as 1 by the Bluetooth device operation;Otherwise, by second Numerical value is determined as 0;
By first numerical value and second value logical AND, third value is obtained;
When third value is 1, determines that the third value is effective, obtain the bluetooth mould of the smart machine in the local area network Formula;
When third value is 0, determines that the third value is invalid, close the switching control function of the routing device.
CN201510520189.1A 2015-08-21 2015-08-21 The method and system that bluetooth master slave mode automatically switches Active CN105120499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510520189.1A CN105120499B (en) 2015-08-21 2015-08-21 The method and system that bluetooth master slave mode automatically switches

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510520189.1A CN105120499B (en) 2015-08-21 2015-08-21 The method and system that bluetooth master slave mode automatically switches

Publications (2)

Publication Number Publication Date
CN105120499A CN105120499A (en) 2015-12-02
CN105120499B true CN105120499B (en) 2019-01-01

Family

ID=54668325

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510520189.1A Active CN105120499B (en) 2015-08-21 2015-08-21 The method and system that bluetooth master slave mode automatically switches

Country Status (1)

Country Link
CN (1) CN105120499B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630597B (en) * 2015-12-25 2019-01-18 珠海全志科技股份有限公司 A kind of A2DP mode dynamic switching method, system and device based on Android
CN105763936B (en) * 2016-04-19 2019-05-31 深圳市酷开网络科技有限公司 Play the method and device of audio
CN107529125B (en) * 2016-06-20 2021-05-25 佛山市顺德区美的电热电器制造有限公司 Bluetooth device communication method and communication device
CN107592628B (en) * 2016-07-08 2020-11-24 中国电信股份有限公司 Method, Bluetooth gateway and system for switching working modes
CN106054658B (en) * 2016-08-09 2019-09-13 广东美的制冷设备有限公司 Inter-linked controlling method, coordinated control system and intelligent wearable device
CN106652068B (en) * 2016-10-09 2019-04-30 广州视源电子科技股份有限公司 Duration recording method, Bluetooth slave device and duration recording system
CN106937197B (en) * 2017-01-25 2019-06-25 北京国承万通信息科技有限公司 Double-ear wireless earphone and communication control method thereof
CN106817671B (en) * 2017-02-14 2020-04-07 腾讯科技(深圳)有限公司 Networking information sharing method, first terminal and system
CN111436043B (en) * 2019-11-06 2023-05-09 珠海市杰理科技股份有限公司 Communication method, device, equipment and system of dual-wireless Bluetooth communication network
CN111182659B (en) * 2019-12-16 2023-04-07 深圳市共进电子股份有限公司 Mode switching method and mode switching device of Mesh equipment and Mesh equipment
CN113099429B (en) * 2021-03-06 2023-06-27 深圳市智之祺科技有限公司 Bluetooth master-slave mode switching system and method based on Android platform
CN113438638B (en) * 2021-07-07 2023-07-28 深圳市汇顶科技股份有限公司 Communication control method and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1435954A (en) * 2002-01-24 2003-08-13 三星电子株式会社 Blue tooth system and method capable of communicating in distributed network
CN101114846A (en) * 2006-07-28 2008-01-30 技嘉科技股份有限公司 Blue tooth wireless multimedia transmission apparatus and system and method
CN103442283A (en) * 2013-08-20 2013-12-11 深圳Tcl新技术有限公司 Remote control method and device based on wireless connected role switching

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060072525A1 (en) * 2004-09-23 2006-04-06 Jason Hillyard Method and system for role management for complex bluetooth® devices

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1435954A (en) * 2002-01-24 2003-08-13 三星电子株式会社 Blue tooth system and method capable of communicating in distributed network
CN101114846A (en) * 2006-07-28 2008-01-30 技嘉科技股份有限公司 Blue tooth wireless multimedia transmission apparatus and system and method
CN103442283A (en) * 2013-08-20 2013-12-11 深圳Tcl新技术有限公司 Remote control method and device based on wireless connected role switching

Also Published As

Publication number Publication date
CN105120499A (en) 2015-12-02

Similar Documents

Publication Publication Date Title
CN105120499B (en) The method and system that bluetooth master slave mode automatically switches
CN110831096B (en) Network switching method and electronic equipment
CN110247678B (en) Terminal control method and terminal
CN109347581A (en) Bluetooth headset connection method, device, electronic equipment and storage medium
CN110224709B (en) Signal transmission method, device and terminal
CN107493597A (en) Reduce the method, apparatus and system of mobile terminal power consumption
CN108513347B (en) Data transmission method and electronic equipment
CN108184164A (en) Audio frequency playing method, smart television and computer readable storage medium
CN104394449B (en) A kind of method and system of the more equipment of single remote control control
CN103731707A (en) Method and system for controlling voice input of intelligent television end of mobile terminal
CN103927015B (en) A kind of wireless input-output system and its implementation towards multiple terminals
US20220150788A1 (en) Communication processing method, terminal device, and medium
CN105848225A (en) Wireless connection switching method and device applied to audio playing system
CN107948665B (en) Switching prompting method and device in live video and mobile terminal
CN113038316A (en) Earphone control method and device, Bluetooth earphone and storage medium
KR20160095106A (en) Method and device for controlling device
CN106658369A (en) Two-way voice communication device, communication system and communication method
EP2991439B1 (en) Split-type mobile terminal and interaction processing method for communications event
CN109257732A (en) Apparatus control method, device and electronic equipment
CN104378493A (en) Mode switching method and electronic device
CN109743141B (en) Data transmission adjusting method and terminal equipment
CN113038317A (en) Earphone control method and device, Bluetooth earphone and storage medium
CN103179498A (en) Method and device for data transmission
CN104023117A (en) Method for information processing and electronic equipment
CN104469522B (en) A kind of control method and device of video playing

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