CN108323241B - Master-slave role conversion method, chip and data transmission system - Google Patents

Master-slave role conversion method, chip and data transmission system Download PDF

Info

Publication number
CN108323241B
CN108323241B CN201880000275.1A CN201880000275A CN108323241B CN 108323241 B CN108323241 B CN 108323241B CN 201880000275 A CN201880000275 A CN 201880000275A CN 108323241 B CN108323241 B CN 108323241B
Authority
CN
China
Prior art keywords
role
master
slave
information
slave 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
CN201880000275.1A
Other languages
Chinese (zh)
Other versions
CN108323241A (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 Weitongbo Technology Co Ltd
Original Assignee
Shenzhen Weitongbo 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 Weitongbo Technology Co Ltd filed Critical Shenzhen Weitongbo Technology Co Ltd
Publication of CN108323241A publication Critical patent/CN108323241A/en
Application granted granted Critical
Publication of CN108323241B publication Critical patent/CN108323241B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • 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

Abstract

The application relates to the technical field of wireless networks, and provides a master-slave role switching method, a chip and a data transmission system. The method comprises the steps of sending a role exchange request to a selected slave device, wherein the selected slave device is one of at least one slave device connected with a master device; generating second information for role switching after receiving a response including the first information for role switching fed back by the selected slave device; sending the second information to the selected slave equipment, so that the selected slave equipment can be converted into a master equipment role according to the second information and can be communicated with the data source equipment through a first data link; and converting the role of the slave device according to the first information, and connecting the slave device with the data source device through a second data link. The application also provides a chip and a data transmission system. In the application, role conversion between the master device and the selected slave device is realized; meanwhile, the whole role switching process has no influence on the data source equipment, so that the transmission of the application data is not influenced.

Description

Master-slave role conversion method, chip and data transmission system
Technical Field
The present application relates to the field of wireless network technologies, and in particular, to a master-slave role switching method, a chip, and a data transmission system.
Background
Wireless Personal Area Network (WPAN), refers to a Wireless communication Network formed by Personal computing devices (such as computers, telephones, palm computers, digital cameras, etc.) within Personal range (portable or within several meters). Wireless Network data transfer has more and more applications in Personal Area Networks (PANs), such as: wireless headset, various wearing formula data sensor etc. general wireless link bears the weight of the mode and includes WIFI, infrared or bluetooth etc..
The inventor finds that the prior art has at least the following problems: in a wireless network communication model of a master device and a slave device, the master device is generally responsible for task scheduling, link maintenance and other work until the whole system stops running, and the roles of the master device and the slave device are kept unchanged.
Disclosure of Invention
The embodiments of the present application provide a master-slave role switching method, a chip and a data transmission system, which implement role switching between a master device and a selected slave device; meanwhile, the whole role switching process has no influence on the data source equipment, so that the transmission of the application data is not influenced.
The embodiment of the application provides a master-slave role switching method, which is applied to master equipment, wherein the master equipment is communicated with data source equipment through a first data link and is connected with at least one slave equipment, and each slave equipment is connected with the data source equipment through a second data link; the method comprises the following steps: sending a role exchange request to a selected slave device, wherein the selected slave device is one of at least one slave device connected with a master device; generating second information for role switching after receiving a response including the first information for role switching fed back by the selected slave device; sending the second information to the selected slave equipment, so that the selected slave equipment can be converted into a master equipment role according to the second information and can be communicated with the data source equipment through a first data link; and converting the role of the slave device according to the first information, and connecting the slave device with the data source device through a second data link.
The embodiment of the application also provides a master-slave role switching method, which is applied to the selected slave equipment, wherein the selected slave equipment is connected with the master equipment and is connected with the data source equipment through a second data link, and the master equipment and the data source equipment are communicated through a first data link and are connected with at least one slave equipment; the method comprises the following steps: after receiving a role exchange request sent by the master device, feeding back a response including first information for role conversion to the master device, so that the master device converts into a slave device role according to the first information and is connected with the data source device through a second data link; receiving second information which is sent by the main equipment and used for role conversion; and converting the role of the main equipment according to the second information, and communicating with the data source equipment by a first data link.
The embodiment of the application further provides a chip, which is arranged in the master device, wherein the master device communicates with the data source device through a first data link and is connected with at least one slave device, and each slave device is connected with the data source device through a second data link; the chip includes: the device comprises a first sending module, a second sending module and a control module, wherein the first sending module is used for sending a role exchange request to a selected slave device, and the selected slave device is one of at least one slave device connected with a master device; a first receiving module, configured to receive an acknowledgement including first information for role switching fed back by the selected slave device; the second information generation module is used for generating second information for role conversion after receiving the response; the first sending module is further used for sending the second information to the selected slave equipment, so that the selected slave equipment can be converted into a master equipment role according to the second information and can communicate with the data source equipment through a first data link; and the first role conversion module is used for converting the role of the slave equipment according to the first information and connecting the slave equipment with the data source equipment through a second data link.
An embodiment of the present application further provides a data transmission system, including: the data source device and a plurality of receiving devices, the plurality of receiving devices including a master device and at least one slave device; the master device is connected with each slave device; the method comprises the steps that a main device communicates with a data source device through a first data link, and receives application data from the data source device; the slave device and the data source device are connected with the data source device through a second data link, and application data are received from the data source device in a listening mode; the master device includes the chip described above.
An embodiment of the present application further provides a chip, which is disposed in a selected slave device, where the selected slave device is connected to a master device and connected to a data source device through a second data link, the master device communicates with the data source device through a first data link, and is connected to at least one slave device, and the chip includes: a second receiving module, configured to receive a role exchange request sent by the master device; the second sending module is used for feeding back a response including first information for role conversion to the master device after receiving the role exchange request, so that the master device converts the role into a slave device role according to the first information and is connected with the data source device through a second data link; the second receiving module is further used for receiving second information which is sent by the main equipment and used for role switching; and the second role conversion module is used for converting the role of the main equipment according to the second information and communicating with the data source equipment through the first data link.
An embodiment of the present application further provides a data transmission system, including: the data source device and a plurality of receiving devices, the plurality of receiving devices including a master device and at least one slave device; the master device is connected with each slave device; the method comprises the steps that a main device communicates with a data source device through a first data link, and receives application data from the data source device; the slave device and the data source device are connected with the data source device through a second data link, and application data are received from the data source device in a listening mode; the slave device includes the chip described above.
Compared with the prior art, the method and the device have the advantages that the master device communicates with the data source device through the first data link and is connected with at least one slave device, and each slave device is connected with the data source device through the second data link; based on the networking mode, the master device sends a role exchange request to the selected slave device, generates second information for role conversion after receiving a response of first information for role conversion fed back by the selected slave device, then sends the second information to the selected slave device, the master device converts the role of the slave device according to the first information, is connected with the data source device through a second data link, converts the role of the slave device into the role of the master device according to the second information, and communicates with the data source device through the first data link, namely the role conversion between the master device and the selected slave device is realized; meanwhile, the whole role switching process has no influence on the data source equipment, so that the transmission of the application data is not influenced.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a schematic diagram of a data transmission system according to a first embodiment of the present application;
FIG. 2 is a detailed flowchart of a master-slave role switching method according to a first embodiment of the present application;
fig. 3 is a timing diagram before and after Master device and Slave device exchange roles according to the first embodiment of the present application;
FIG. 4 is a detailed flowchart of a master-slave role switching method according to a second embodiment of the present application;
FIG. 5 is a detailed flowchart of a master-slave role switching method according to a third embodiment of the present application;
FIG. 6 is a detailed flowchart of a master-slave role switching method according to a fourth embodiment of the present application;
FIG. 7 is a detailed flowchart of a master-slave role switching method according to a fifth embodiment of the present application;
FIG. 8 is a block schematic diagram of a chip according to a sixth embodiment of the present application;
FIG. 9 is a block schematic diagram of a chip according to an eighth embodiment of the present application;
FIG. 10 is a block schematic diagram of a chip according to a ninth embodiment of the present application;
fig. 11 is a block schematic diagram of a chip according to a tenth embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, some embodiments of the present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The first embodiment of the application relates to a master-slave role switching method, which is applied to master equipment, wherein the master equipment is communicated with data source equipment through a first data link and is connected with at least one slave equipment, and each slave equipment is connected with the data source equipment through a second data link; the method comprises the following steps: sending a role exchange request to a selected slave device, wherein the selected slave device is one of at least one slave device connected with a master device; generating second information for role switching after receiving a response including the first information for role switching fed back by the selected slave device; sending the second information to the selected slave equipment, so that the selected slave equipment can be converted into a master equipment role according to the second information and can be communicated with the data source equipment through a first data link; and converting the role of the slave device according to the first information, and connecting the slave device with the data source device through a second data link.
Compared with the prior art, the present embodiment is that a master device communicates with a data source device via a first data link and is connected to at least one slave device, and each slave device is connected to the data source device via a second data link; based on the networking mode, the master device sends a role exchange request to the selected slave device, generates second information for role conversion after receiving a response of first information for role conversion fed back by the selected slave device, then sends the second information to the selected slave device, the master device converts the role of the slave device according to the first information, is connected with the data source device through a second data link, converts the role of the slave device into the role of the master device according to the second information, and communicates with the data source device through the first data link, namely the role conversion between the master device and the selected slave device is realized; meanwhile, the whole role switching process has no influence on the data source equipment, so that the transmission of the application data is not influenced.
The following describes details of the master-slave role switching method according to this embodiment in detail, and the following is only provided for easy understanding and is not necessary for implementing this embodiment.
In this embodiment, the master device applied by the master-slave role switching method is located in one data transmission system; referring to fig. 1, the data transmission system includes a data Source device (Source device) and three receiving devices (Sink device, for example, three Sink devices), where the Source device is configured to issue application data to the Sink device, and the Sink device is a device using the application data. In one example, the Source device is, for example, a television or the like, the Sink device includes, for example, a main speaker, a surround speaker, a center speaker, a bass speaker, or the like, and the Source device and the Sink devices form a data transmission system. In another example, the Source device is, for example, a mobile phone storing music files, and the sink device is, for example, a wireless headset, a wireless sound box, or the like.
There are three links in the data transmission system of this embodiment: a Source-Sink link, a link inside a local area network (i.e., a wireless network in the present application) between Sink devices, and a listening (Listen) link between a Sink device and a Source device; the Source-Sink link and the link inside the local area network may be based on different wireless communication standards, but are not limited thereto, and may also be based on the same wireless communication standard; wireless communication standards include, but are not limited to, bluetooth, WIFI, Zigbee, and the like. Three links are specifically described below:
the Source-Sink link is initiated by a Source device, and establishes connection with one of the Sink devices, and the Source device is responsible for link creation, link parameter management and application data interaction of the Source-Sink link. The Master equipment receives application data from the Source equipment through the Source-Sink link
Sink equipment in wireless connection with Source equipment is Master equipment in a local area network, and other Sink equipment is Slave equipment. A Master-Slave link is established between the Master device and each Slave device, and the Master-Slave link can be a wireless link or a wired link; the Master device is responsible for managing the Slave devices joining the local area network and transmitting Source-Sink link information to the Slave devices to help the Slave devices and the Source devices to establish Listen links.
The Slave device obtains all Source-Sink link information through the Master device, a Listen link is established between the Slave device and the Source device, and the Slave device receives application data from the Source device in an interception mode.
In this embodiment, a Source-Sink link between Source devices of the Master device is a first data link; and the Listen link between the Slave device and the Source device is a second data link.
Preferably, when the Slave device receives the application data from the Source device in an interception manner and an error occurs, the Slave device directly sends a retransmission request of the application data to the Master device, and receives the application data which is sent by the Master device and requested to be retransmitted through the Master-Slave link.
It should be noted that, a simple star network structure may be adopted inside the local area network, that is, one Master device and a plurality of Slave devices exist, but not limited to this, the local area network may also adopt a scattering network structure with a more complex structure, that is, one Master device exists in a plurality of piconets at the same time, and application data may be relayed and transmitted through network nodes (for example, the Master device exists in both the local area network formed by sink devices and the local area network formed by source devices).
The specific flow of the master-slave role switching method of this embodiment is shown in fig. 2.
Step 101, a role swap request is sent to the selected slave device.
Specifically, the Master device sends a role exchange request to the selected Slave device through a Controller layer inside the Master device. The selected Slave device is one of the Slave devices connected with the Master device, and is used for performing Master-Slave role conversion with the Master device. The selected manner of the Slave device may be: the Master device is selected according to preset conditions or manually selected by a user.
The Master device and each Slave device are kept connected through a connection event, that is, the Master device initiates a connection event to each Slave device through a Master-Slave link in a timing manner so as to keep connected with each Slave device all the time; in a period of one connection event, the Master device schedules each Slave device according to an agreed time sequence.
Step 102, judging whether a response including first information for role switching fed back by the selected slave device is received. If yes, go to step 103; otherwise, go back to step 101.
Specifically, when receiving a role exchange request, a selected Slave device feeds back a response including first information for role switching if the request is granted, where the first information is Slave device configuration information; if the Master device determines that a response including the Slave device configuration information fed back by the Slave device is received, entering step 103; otherwise, returning to the step 101, and sending a role exchange request to the selected Slave device again by the Master device; preferably, a threshold number of inquiries is preset in the Master device, and when the number of inquiries reaches the threshold number of inquiries, the Master device abandons the role exchange with the selected Slave device. Wherein the Slave device configuration information includes a clock accuracy of the selected Slave device.
Step 103, generating second information for role switching.
Specifically, the Master device generates second information for role switching, and the second information includes the waiting time for role exchange and Master device configuration information. The Master device configuration information comprises clock precision of the Master device, link information of the Master device and each Slave device, and the link information comprises channel numbers of the Master device and each link after role exchange and occurrence time of a first connection event on the Master device and each link after the role exchange.
And step 104, sending the second information to the selected slave equipment, so that the selected slave equipment can be converted into a master equipment role according to the second information and can be communicated with the data source equipment through a first data link.
Specifically, the Master device integrates the waiting time for role exchange and the Master device configuration information into a protocol data unit (i.e., second information), and sends the protocol data unit to the selected Slave device, so that the selected Slave device performs role conversion according to the Master device configuration information after the waiting time for role exchange. The Master equipment configuration information is used for performing system configuration on the selected Slave equipment during the last scheduling in the waiting time, and the system configuration takes effect at the starting time of the first connection event after the waiting time so as to convert the Master equipment into a Master equipment role; when roles are exchanged, a new Master device (a selected Slave device is converted into a new Master device) initiates a connection event to the new Slave device (an original Master device is converted into a new Slave device), and the new Master device and the Source device communicate with each other through a Source-Sink link (a first data link). It should be noted that, in this embodiment, the second information may also include Master device configuration information, and the selected Slave device performs system configuration when the selected Slave device is scheduled for the last time in the waiting time after receiving the second information, and takes effect at the start time of the next connection event, so as to switch to the Master device role.
And 105, converting the role of the slave device according to the first information, and connecting the slave device with the data source device through a second data link.
Specifically, after the waiting time elapses, the Master device is converted into a Slave device role according to the Slave device configuration information. When the Master device is scheduled for the last time in the waiting time, the Master device performs system configuration on the Master device according to the Slave device configuration information (first information), the system configuration is enabled at the starting time of the first connection event after the waiting time, the Master device is converted into the role of the Slave device, the Master device is abandoned as the management work of the Master device in the local area network, only one link between the Master device and the selected Slave device needs to be maintained, and the Master device is connected with the Source device through a second data link (Listen link). Meanwhile, when the Slave equipment is scheduled for the last time in the waiting time, the selected Slave equipment carries out system configuration according to the Master equipment configuration, the system configuration is effective at the starting time of the first connection event after the waiting time, and the system configuration is converted into the Master equipment role, so that the selected Slave equipment can seamlessly engage with the original Master equipment, starts to be responsible for management work in the local area network, and is responsible for link maintenance work between the Slave equipment and the Source equipment.
In this embodiment, the Master device performs role switching with the selected Slave device at the start time of a certain connection event, taking fig. 3 as an example, at the start time of a current connection event, the Master device may estimate the start time of a certain connection event later, and appoint this time as a time for performing role switching (taking this as an example, but not a limitation), because the Master device and the Slave device both use respective clocks, and both are not physically connected and cannot perform synchronization, the Master device needs to calculate a time offset between the time for performing role switching and the start time of the current connection event, and set the time offset as a waiting time for exchanging roles. After the Slave device receives the waiting time sent by the Master device, the start time of the connection event where the waiting time is received is obtained, and then the appointed time for role switching can be obtained by adding the waiting time to the start time.
After waiting time, when the appointed time for role switching is reached, the Master device and the selected Slave device perform role exchange, after the selected Slave device is switched to the Master device, a connection event with the Slave device starts to be initiated, the new Master device obtains the starting time of the first connection event (namely, the appointed time for role switching), and calculates the difference t1 between the starting time and the last clock boundary as offset time; the new Master device takes the local clock boundary plus the offset time t1 as the starting time of initiating the connection event, and takes the moment of initiating the connection event on the Master-Slave link. And for the time when the connection event is initiated on other Master-Slave links, calculating according to the starting time of the first connection event acquired by the new Master device and the starting time of the first connection event on each link after the role exchange by adopting the same calculation method.
In this embodiment, the Slave device receives the application data from the Source device in an interception manner, that is, the Slave device has all Source-Sink link information, and a Listen link is established between the Slave device and the Source device, and in this architecture, in a process of converting the selected Slave device into the Master device, a link between the selected Slave device and the Source device is not disconnected, and the list link is converted into the Source-Sink link, that is, a Sink device is always connected to the Source device as the Master device, so that the whole role conversion process has no influence on the Source device (i.e., transparency of the Source device is achieved), and thus transmission of the application data is not influenced.
The second embodiment of the present application relates to a master-slave role switching method, which is an improvement on the basis of the first embodiment, and the main improvement is that: and the Master device negotiates with the selected Slave device to determine the waiting time.
The specific flow of the master-slave role switching method of this embodiment is shown in fig. 4.
The step 202 is substantially the same as the step 102, and the steps 205 to 207 are substantially the same as the steps 103 to 105, mainly different in that:
in step 201, the role exchange request sent by the Master device to the selected Slave device includes a cycle number N, which indicates a cycle number of a connection event included from a start time of a current connection event to a start time of an nth connection event, and the Master device negotiates with the selected Slave device in advance to perform role switching at the start time of the nth connection event, where N is an integer greater than zero.
Step 203 and step 204 are added, specifically as follows:
step 203, judging whether the response contains N; if yes, go to step 204; if not, go back to step 201.
Specifically, it is determined whether the response includes N, that is, it is determined whether the Slave device allows role switching after N connection events, and if the response includes N, it indicates that the Slave device performs role switching after N connection events, and the process proceeds to step 204; otherwise, it indicates that the Slave device does not intend to perform role switching after N connection events, and returns to step 201, the Master device sends a role exchanging request to the selected Slave device again, and changes the cycle number N in the role exchanging request.
And step 204, setting the waiting time of role exchange according to the N.
Specifically, when T represents the period of one connection event, the waiting time for the role exchange is N × T. For example, if the number N of cycles is 3, the Master device will estimate the start time of the third connection event, calculate the time offset from the start time of the current connection event, and set the time offset as the waiting time for the role exchange.
Compared with the first embodiment, the Master device may negotiate with the selected Slave device to determine the waiting time.
The third embodiment of the present application relates to a master-slave role switching method, which is an improvement on the basis of the first embodiment, and the main improvement is that: and monitoring performance indexes of the Master equipment and the Slave equipment, and judging whether to trigger role switching according to the performance indexes.
The specific flow of the master-slave role switching method of this embodiment is shown in fig. 5.
The main difference between steps 304 to 308 and steps 101 to 105 is that steps 301 to 303 are added, which is as follows:
step 301, receiving at least one performance indicator from each slave device.
Specifically, the Master device serves as a link maintainer in the local area network, and each Slave device reports at least one performance index of the Slave device to the Master device periodically; specifically, a Host Protocol layer (Host layer) of each Slave device sets a report period through a Host Control Interface (HCI) command, and a control layer (Controller layer) of each Slave device periodically obtains at least one performance index of the Slave device and reports the performance index to the Master device through a Protocol Data Unit (PDU).
Step 302, judging whether to trigger role switching according to the performance index. If yes, triggering role switching, and entering step 303; if not, the process is ended directly.
Specifically, after receiving the performance indexes reported by each Slave device, the Master device determines the performance indexes reported by each Slave device and the performance indexes corresponding to the Master device, that is, the Master device needs to determine whether the Master device needs to perform role switching and whether there is a Slave device capable of performing role switching with the Master device; when the performance index of the Slave device and the performance index reported by the Slave device meet the preset condition, entering step 303; otherwise, the process is ended directly. The Master device can firstly judge whether the Master device needs role switching, and then judge whether a slave device capable of performing role switching with the Master device exists; however, the Master device may also determine whether there is a slave device capable of performing role switching with the Master device, and then determine whether the Master device needs role switching.
Step 303, selecting a slave device according to the performance index.
Specifically, a Host layer of the Master device initiates an HCI COMMAND of role switching, a Controller layer of the Master device replies to the Host layer through a COMMAND STATUS bar (COMMAND STATUS), a role switching process is started, and a Slave device with a better performance index is selected from the Slave devices according to the received performance indexes of the Slave devices to perform role switching with the Slave devices.
Compared with the first embodiment, the present embodiment monitors the performance index of the master device and the performance index of the slave device, determines whether to trigger role switching according to the performance indexes, and selects one slave device according to the performance indexes, that is, determines to perform switching of the master device and the slave device according to the performance indexes, so that the performance of the entire data transmission system is prevented from being affected due to the performance degradation of the current master device, and the performance of the entire data transmission system can be improved. It should be noted that the present embodiment can also be an improvement on the second embodiment, and the same technical effects can be achieved.
In this embodiment, the performance index is one or more of remaining power, wearing state, packet loss rate, and signal strength, and whether to trigger role switching is determined according to the performance index, which specifically includes:
when the residual electric quantity of the master equipment is smaller than a preset first electric quantity threshold value and an electric quantity difference value between the residual electric quantity of at least one slave equipment and the residual electric quantity of the master equipment is larger than a preset second electric quantity threshold value, triggering role switching; alternatively, the first and second electrodes may be,
when the master device is in an unworn state and at least one slave device is in an unworn state, triggering role switching; the Sink devices (i.e., Master device and Slave device) are wearable devices, such as wireless headsets. The Master device and the Slave device have sensors (e.g., touch sensors) to detect whether the Master device and the Slave device are in a wearing state, but the specific detection method is not limited in this embodiment; alternatively, the first and second electrodes may be,
when the packet loss rate of the master device is greater than a preset first packet loss rate threshold, and the packet loss rate of at least one slave device is smaller than or equal to a preset second packet loss rate threshold, the second packet loss rate threshold is smaller than or equal to the first packet loss rate threshold, triggering role switching; the Master device and the Slave device can calculate the packet loss rate of the Slave device in real time, and specifically, the Slave device calculates the packet loss rate according to the number of times of requesting for retransmitting application data from the Master device; the Master device calculates the packet loss rate according to the times of requesting for retransmitting the application data from the Source device; alternatively, the first and second electrodes may be,
when the signal intensity of the master device is smaller than a preset first intensity threshold value, and the signal intensity of at least one slave device is larger than or equal to a preset second intensity threshold value, the second intensity threshold value is larger than or equal to the first intensity threshold value, role switching is triggered; when the Master device and the Slave device acquire application data from the Source device, the magnitude of the signal intensity can be calculated.
When the performance indexes include the remaining power, the wearing state, the packet loss rate and the signal strength, and whether role switching is triggered is judged according to the performance indexes, the judged priority from high to low can be as follows: residual electric quantity, wearing state, packet loss rate and signal strength. Wherein, the cruising ability is crucial for the whole local area network, so the residual capacity is taken as the first priority.
When the residual electric quantity is used for judging, the Slave equipment with the largest electric quantity is used as the selected Slave equipment and is exchanged with the Master equipment in roles, so that the cruising ability of the whole wireless network can be improved, and the situation that the battery loss of the Master equipment is more serious due to unequal power consumption of the Master equipment and the Slave equipment is avoided.
When the wearing state is used for judging, roles of the Master device and the Slave device are exchanged according to the wearing state, and the power consumption of the Master device in the non-wearing state can be reduced.
When the packet loss rate is used for judgment, the Slave equipment with the minimum packet loss rate is used as the selected Slave equipment and is subjected to role exchange with the Master equipment; therefore, the packet loss rate of application data transmission between the Master device and the Source device can be reduced, the times of requesting the Source device to retransmit the application data by the Master device can be reduced, the power consumption of the Master device can be reduced, and the cruising ability of the whole data transmission system is improved.
When the signal intensity is used for judging, the Slave equipment with the maximum signal intensity is used as the selected Slave equipment, and the role of the Slave equipment is exchanged with the Master equipment; therefore, the transmission quality of the application data between the Master device and the Source device can be improved.
A fourth embodiment of the present application relates to a Master-Slave role switching method, which is applied to a Slave device that is selected in a wireless network and performs role exchange with a Master device, where the selected Slave device is connected with the Master device and is connected with a Source device by a second data link (Listen link), and the Master device communicates with the Source device by a first data link (Source-Sink link) and is connected with at least one Slave device.
The specific flow of the master-slave role switching method of this embodiment is shown in fig. 6.
Step 401, determining whether a role exchange request sent by a master device is received. If yes, go to step 402; otherwise, step 401 is executed again.
Specifically, the Master device takes one of the at least one Slave device as a selected Slave device, and sends a role exchange request to the selected Slave device through the Controller layer. When judging that a role exchange request sent by Master equipment is received, entering step 402; otherwise, step 401 is executed again until a role exchange request sent by the Master device is received.
In this embodiment, the Master device and at least one Slave device are kept connected through a connection event, that is, the Master device may periodically initiate a connection event to each Slave device through a Master-Slave link, so as to always keep connected with each Slave device; in a period of one connection event, the Master device schedules each Slave device according to an agreed time sequence.
And step 402, feeding back a response including first information for role switching to the master device, so that the master device switches to a slave device role according to the first information and is connected with the data source device through a second data link.
Specifically, when receiving a role exchange request, the selected Slave device feeds back a response including first information for role switching if the request is granted. And the Master equipment receives the response including the first information fed back by the Slave equipment, so that the response can be converted into the role of the Slave equipment according to the first information, and the Slave equipment is connected with the Source equipment through a second data link. The first information is Slave equipment configuration information, and the Slave equipment configuration information comprises the clock precision of the selected Slave equipment; the second data link is a listening link.
And step 403, receiving second information for role switching sent by the master device.
Specifically, the Master device generates second information for role switching, and sends the second information to the selected Slave device. The second information comprises the waiting time of role exchange and Master equipment configuration information; the Master device configuration information comprises clock precision of the Master device and link information of the Master device and each Slave device, and the link information comprises channel numbers of the Master device and each link after role exchange and occurrence time of a first connection event on the Master device and each link after the role exchange.
Step 404, converting to the role of the master device according to the second information, and communicating with the data source device through the first data link.
Specifically, after the waiting time elapses, the Master device role is switched according to the Master device configuration information. In detail, when the Slave device is scheduled for the last time in the waiting time, the selected Slave device performs system configuration according to the Master device configuration, and the system configuration becomes effective at the starting time of the first connection event after the waiting time, and the Master device role is switched, so that the selected Slave device can seamlessly engage with the Master, starts to be responsible for management work in the local area network, and is responsible for link maintenance work between the Slave device and the Source device. Meanwhile, when the Master device is scheduled for the last time in the waiting time, the Master device performs system configuration on the Master device according to the Slave device configuration information (first information), the system configuration becomes effective at the starting time of the first connection event after the waiting time, the Master device is converted into the role of the Slave device, the Master device is abandoned as the management work of the Master device in the local area network, only one link between the Master device and the selected Slave device needs to be maintained, and the Master device is connected with the Source device through a second data link (Listen link).
In this embodiment, the Master device integrates the waiting time for role exchange and the Master device configuration information into a protocol data unit, and sends the protocol data unit to the selected Slave device; and the Master device configuration information is used for performing system configuration on the selected Slave device after waiting time so as to convert the Slave device into the Master device role.
The system configuration is carried out according to the Master equipment configuration information so as to convert the Master equipment role into, and the method specifically comprises the following steps: and calculating the offset time of the connection event corresponding to each link according to the occurrence time of the first connection event on each link and the local clock, so that the time of initiating the connection event on each link is determined after the selected Slave device is converted into the Master device role.
Specifically, referring to fig. 3, after the Slave device receives the waiting time sent by the Master device, the start time of the connection event where the waiting time is received is obtained, and then the time is added to the waiting time to obtain the appointed time for performing the role switching. After waiting time, when the appointed time for role switching is reached, the Master device and the selected Slave device perform role exchange, after the selected Slave device is switched to the Master device, a connection event with the Slave device starts to be initiated, the new Master device obtains the starting time of the first connection event (namely, the appointed time for role switching), and calculates the difference t1 between the starting time and the last clock boundary as offset time; the new Master device takes the local clock boundary plus the offset time t1 as the starting time of initiating the connection event, and takes the moment of initiating the connection event on the Master-Slave link. And for the time when the connection event is initiated on other Master-Slave links, calculating according to the starting time of the first connection event acquired by the new Master device and the starting time of the first connection event on each link after the role exchange by adopting the same calculation method.
In this embodiment, the Slave device receives the application data from the Source device in an interception manner, that is, the Slave device has all Source-Sink link information, and a Listen link is established between the Slave device and the Source device, and in this architecture, in a process of converting the selected Slave device into the Master device, a link between the selected Slave device and the Source device is not disconnected, and the list link is converted into the Source-Sink link, that is, a Sink device is always connected to the Source device as the Master device, so that the whole role conversion process has no influence on the Source device (i.e., transparency of the Source device is achieved), and thus transmission of the application data is not influenced.
It should be noted that, in the existing architecture, no Listen link is established between the Slave device and the Source device, and the Master device receives the application data and then sends the application data to each Slave device; therefore, if the role switching between the Master device and the Slave device is realized by using the existing framework, the Master device is disconnected from the Source device first during the switching, and then the new Master device needs to be connected with the Source device again to continue transmitting the application data, so that the user experience is poor.
Compared with the prior art, the present embodiment is that a master device communicates with a data source device via a first data link and is connected to at least one slave device, and each slave device is connected to the data source device via a second data link; based on the networking mode, the master device sends a role exchange request to the selected slave device, generates second information for role conversion after receiving a response of first information for role conversion fed back by the selected slave device, then sends the second information to the selected slave device, the master device converts the role of the slave device according to the first information, is connected with the data source device through a second data link, converts the role of the slave device into the role of the master device according to the second information, and communicates with the data source device through the first data link, namely the role conversion between the master device and the selected slave device is realized; meanwhile, the whole role switching process has no influence on the data source equipment, so that the transmission of the application data is not influenced.
A fifth embodiment of the present application relates to a master-slave role switching method, which is an improvement based on the fourth embodiment, and the main improvement is as follows: and the Master device negotiates with the selected Slave device to determine the waiting time.
The specific flow of the master-slave role switching method of this embodiment is shown in fig. 7.
The steps 504 to 506 are substantially the same as the steps 402 to 404, and the main difference is that:
in step 501, the selected Slave device receives a role exchange request sent by a Master device, where the role exchange request includes a cycle number N, which indicates a cycle number of a connection event included from a start time of a current connection event to a start time of an nth connection event, the Master device negotiates with the selected Slave device in advance to perform role switching after N connection events, and N is an integer greater than zero. Therefore, the waiting time is a time difference between the start time of the nth connection event and the start time of the current connection event.
Step 502 and step 503 are added, specifically as follows:
step 502, identify N from the role exchange request, and determine whether to allow role exchange at the start time of the nth connection event. If yes, go to step 503; if not, the process is directly finished.
Specifically, the Slave device recognizes the cycle number N from the role swap request, and determines whether to allow a role switch after N connection events. If the determination result is yes, go to step 503; if not, the process is directly finished.
Step 503, integrate N into the response.
Specifically, the Slave device integrates the cycle number N into the acknowledgement of the first information for role switching, i.e., integrates the cycle number N into the Slave device configuration information.
Compared with the fourth embodiment, the Master device negotiates with the selected Slave device to obtain the determined time.
A sixth embodiment of the present application relates to a chip, which is disposed in a Master device, where the Master device communicates with a Source device through a first data link and is connected to at least one Slave device, and each Slave device is connected to the Source device through a second data link (Listen link). Referring to fig. 8, the chip includes a first sending module 1, a second information generating module 2, a first receiving module 3, and a first character conversion module 4.
The first sending module 1 is configured to send a role exchange request to a selected Slave device, and the first receiving module 3 is configured to receive a response including first information for role switching, where the response is fed back by the selected Slave device, and the selected Slave device is one of at least one Slave device connected to a Master device; the Master device and the at least one Slave device are kept connected through a connection event.
The second information generating module 2 is configured to generate second information for role switching after receiving a response including the first information for role switching fed back by the selected Slave device.
In this embodiment, the second information includes waiting time for exchanging roles and Master device configuration information, so that the selected Slave device is switched to the Master device role according to the Master device configuration information after the waiting time elapses. The Master device configuration information comprises clock precision of the Master device and link information of the Master device and each Slave device. The link information comprises the channel number of the Master device and each Slave device after the roles are exchanged and the starting time of the first connection event.
The first sending module 1 is further configured to send the second information to the selected Slave device, so that the selected Slave device converts the second information into a Master device role according to the second information, and communicates with the Source device through a first data link (Source-Sink link).
The first role conversion module 4 is configured to convert the role of the Slave device according to the first information, and connect the Source device with the second data link. Wherein the second data link is a Listen link.
In this embodiment, the first information is Slave device configuration information, and the first role conversion module 4 is specifically configured to convert the first information into a Slave device role according to the Slave device configuration information after the waiting time elapses. Wherein the Slave device configuration information includes a clock accuracy of the selected Slave device.
Compared with the prior art, the present embodiment is that a master device communicates with a data source device via a first data link and is connected to at least one slave device, and each slave device is connected to the data source device via a second data link; based on the networking mode, the master device sends a role exchange request to the selected slave device, generates second information for role conversion after receiving a response of first information for role conversion fed back by the selected slave device, then sends the second information to the selected slave device, the master device converts the role of the slave device according to the first information, is connected with the data source device through a second data link, converts the role of the slave device into the role of the master device according to the second information, and communicates with the data source device through the first data link, namely the role conversion between the master device and the selected slave device is realized; meanwhile, the whole role switching process has no influence on the data source equipment, so that the transmission of the application data is not influenced.
The seventh embodiment of the present application relates to a chip, and the present embodiment is an improvement on the basis of the sixth embodiment, and the main improvement lies in: referring to fig. 8, the Master device negotiates with the selected Slave device to determine the latency.
In this embodiment, the role exchanging request sent by the first sending module 1 to the selected slave device includes a cycle number N, which represents a cycle number of a connection event included from a start time of a current connection event to a start time of an nth connection event, where N is an integer greater than zero.
The second information generation module 2 is further configured to determine whether the response includes N after receiving a response including the first information for role switching fed back by the selected slave device; if the judgment result is yes, the second information generation module 2 sets the waiting time for role exchange according to N.
Compared with the sixth embodiment, the Master device negotiates with the selected Slave device to determine the waiting time.
The eighth embodiment of the present application relates to a chip, and the present embodiment is an improvement on the basis of the sixth embodiment, and the main improvement lies in: referring to fig. 9, the chip further includes a trigger module 5.
Before the first sending module 1 sends a role exchange request to the selected Slave device, the first receiving module 3 receives at least one performance index from each Slave device, and the triggering module 5 determines whether to trigger role switching according to the performance index.
And if the triggering module 5 judges that the role is triggered to be switched, selecting one Slave device according to the performance index.
In one example, the performance indicator is one or more of a remaining power, a wearing state, a packet loss rate, and a signal strength.
The triggering module 5 is used for judging whether the residual electric quantity of the Master equipment is smaller than a preset first electric quantity threshold value or not, and if the electric quantity difference value between the residual electric quantity of at least one Slave equipment and the residual electric quantity of the Master equipment is larger than a preset second electric quantity threshold value; or when the Master device is in an unworn state and at least one Slave device is in a worn state; or when the packet loss rate of the Master device is greater than a preset first packet loss rate threshold, and the packet loss rate of at least one Slave device is less than or equal to a preset second packet loss rate threshold, the second packet loss rate threshold is less than or equal to the first packet loss rate threshold; or when the signal intensity of the Master device is smaller than a preset first intensity threshold value, and the signal intensity of at least one Slave device is larger than or equal to a preset second intensity threshold value, the second intensity threshold value is larger than or equal to the first intensity threshold value, role switching is triggered.
Compared with the sixth embodiment, the present embodiment monitors the performance index of the master device and the performance index of the slave device, determines whether to trigger role switching according to the performance indexes, and selects one slave device according to the performance indexes, that is, determines to perform switching of the master device and the slave device according to the performance indexes, so that the performance of the entire data transmission system is prevented from being affected due to the performance degradation of the current master device, and the performance of the entire data transmission system can be improved. It should be noted that the present embodiment can also be an improvement on the seventh embodiment, and can achieve the same technical effects.
A ninth embodiment of the present application relates to a chip, which is disposed in a selected Slave device, where the selected Slave device is connected to a Master device and is connected to a Source device through a second data link, and the Master device communicates with the Source device through a first data link and is connected to at least one Slave device. Referring to fig. 10, the chip includes a second sending module 6, a second receiving module 7, and a second role transformation module 8.
The second receiving module 7 is configured to receive the role exchange request sent by the master device. The second sending module 6 is configured to, after receiving the role exchange request sent by the Master device, feed back a response including first information for role conversion to the Master device, so that the Master device converts to a Slave device role according to the first information, and is connected to the Source device through a second data link. Wherein the second data link is a listening link. And the first information is the Slave equipment configuration information, so that after the Master equipment waits for time, the Master equipment takes the role of the Slave equipment according to the Slave equipment configuration information and is connected with the Source equipment through a second data link. The first information includes a clock accuracy of the selected Slave device.
In this embodiment, the Master device and the at least one Slave device are kept connected through a connection event.
The second receiving module 7 is further configured to receive second information for role switching sent by the Master device.
The second role conversion module 8 is configured to convert the role of Master device into a role of Master device according to the second information, and communicate with the Source device through the first data link.
In this embodiment, the second information includes the waiting time for role exchange and Master device configuration information; the second role conversion module 8 is specifically configured to convert, after a waiting time elapses, a Master device role according to the Master device configuration information. The waiting time is the time difference between the starting time of the role switching and the starting time of the current connection event. The Master device configuration information comprises clock precision of the Master device and link information of the Master device and each Slave device, and the link information comprises a channel number of the Master device and each Slave device after the roles are exchanged and a starting moment of a first connection event.
Compared with the prior art, the present embodiment is that a master device communicates with a data source device via a first data link and is connected to at least one slave device, and each slave device is connected to the data source device via a second data link; based on the networking mode, the master device sends a role exchange request to the selected slave device, generates second information for role conversion after receiving a response of first information for role conversion fed back by the selected slave device, then sends the second information to the selected slave device, the master device converts the role of the slave device according to the first information, is connected with the data source device through a second data link, converts the role of the slave device into the role of the master device according to the second information, and communicates with the data source device through the first data link, namely the role conversion between the master device and the selected slave device is realized; meanwhile, the whole role switching process has no influence on the data source equipment, so that the transmission of the application data is not influenced.
The tenth embodiment of the present application relates to a chip, and the present embodiment is an improvement on the basis of the ninth embodiment, and the main improvement lies in: the first information generating module 9 is further included, please refer to fig. 11, where the Master device negotiates with the selected Slave device to determine the waiting time.
The role exchange request sent by the Master device and received by the selected Slave device includes a cycle number N, which represents the cycle number of the connection event included from the start time of the current connection event to the start time of the nth connection event, where N is an integer greater than zero.
After receiving a role exchange request sent by the Master device, the first information generation module 9 identifies N from the role exchange request, and determines whether to allow role exchange at the start time of the nth connection event; and if the judgment result is allowable, integrating N into the response.
Compared with the ninth embodiment, the Master device negotiates with the selected Slave device to determine the waiting time.
It should be noted that one chip may have both the Master device function and the Slave device function in the sixth to tenth embodiments, so as to implement different functions in different scenarios.
An eleventh embodiment of the present application relates to a data transmission system, please refer to fig. 1, where the data transmission system includes a Source device and a plurality of receiving devices (corresponding to a Sink device, three devices are taken as an example in the figure), and the plurality of receiving devices includes a Master device and at least one Slave device (two devices are taken as an example in the figure); the Master equipment is wirelessly connected with each Slave equipment;
the Master device is in wireless connection with the Source device, communicates with the Source device through a first data link, and receives application data from the Source device; the Slave device is wirelessly connected with the Source device and receives the application data from the Source device in a listening manner. The Master device includes the chips in the sixth to eighth embodiments.
And the Slave device and the Source device are connected with the Source device through a second data link, and receive application data from the Source device in a listening mode.
Preferably, the Slave device sends a retransmission request of the application data to the Master device when receiving the application data from the Source device in an interception manner and an error occurs; and when the Master equipment receives the retransmission request, the Master equipment sends the application data to the Slave equipment, thereby providing a remedy mode when the Slave equipment receives the application data and has errors.
In one example, the Master device also receives link establishment information from the Source device and sends the link establishment information to the Slave device; and the Slave equipment establishes an interception link with the Source equipment according to the link establishment information and receives the application data from the Source equipment in an interception mode, namely the Slave equipment and the Source equipment establish a Listen link.
A twelfth embodiment of the present application relates to a data transmission system, please refer to fig. 1, where the data transmission system includes a Source device and a plurality of receiving devices (corresponding to a Sink device, three devices are taken as an example in the figure), and the plurality of receiving devices includes a Master device and at least one Slave device (two devices are taken as an example in the figure); the Master equipment is wirelessly connected with each Slave equipment;
the Master device is in wireless connection with the Source device, communicates with the Source device through a first data link, and receives application data from the Source device; the Slave device is wirelessly connected with the Source device and receives the application data from the Source device in a listening manner.
And the Slave device and the Source device are connected with the Source device through a second data link, and receive application data from the Source device in a listening mode.
The Slave device includes the chip in the ninth embodiment or the tenth embodiment.
Preferably, the Slave device sends a retransmission request of the application data to the Master device when receiving the application data from the Source device in an interception manner and an error occurs; and when the Master equipment receives the retransmission request, the Master equipment sends the application data to the Slave equipment, thereby providing a remedy mode when the Slave equipment receives the application data and has errors.
In one example, the Master device also receives link establishment information from the Source device and sends the link establishment information to the Slave device; and the Slave equipment establishes an interception link with the Source equipment according to the link establishment information and receives the application data from the Source equipment in an interception mode, namely the Slave equipment and the Source equipment establish a Listen link.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the present application, and that various changes in form and details may be made therein without departing from the spirit and scope of the present application in practice.

Claims (36)

1. A master-slave role switching method is applied to a master device, wherein the master device communicates with a data source device through a first data link and is connected with at least one slave device, and each slave device is connected with the data source device through a second data link; the method comprises the following steps:
sending a role exchange request to a selected slave device, wherein the selected slave device is one of at least one slave device connected with the master device;
generating second information for role switching after receiving a response including the first information for role switching fed back by the selected slave device;
sending the second information to the selected slave device, so that the selected slave device can convert the role of the master device into a role of the master device according to the second information and communicate with the data source device through the first data link;
and converting into the role of the slave equipment according to the first information, and connecting with the data source equipment through the second data link.
2. The master-slave role switching method according to claim 1, wherein said second data link is a listening link.
3. The master-slave role switching method according to claim 1 or 2, wherein the second information includes a waiting time for role exchange and master configuration information, so that the selected slave device switches to the master role according to the master configuration information after the waiting time elapses;
the first information is slave device configuration information, and the conversion into the slave device role according to the first information specifically includes:
and after the waiting time, switching to the role of the slave equipment according to the slave equipment configuration information.
4. The master-slave role switching method according to claim 3, wherein said master device and said at least one slave device are kept connected by a connection event;
the role exchange request comprises a periodicity N, which represents the periodicity of the connection event from the starting time of the current connection event to the starting time of the Nth connection event, wherein N is an integer greater than zero;
after receiving a response including the first information for role switching fed back by the selected slave device and before the generating the first information for role switching, further comprising:
judging whether the response contains the N;
and if the judgment result is that the role is exchanged, setting the waiting time for exchanging roles according to the N.
5. The master-slave role switching method of claim 1, wherein said first information comprises a clock accuracy of said selected slave device.
6. The master-slave role switching method of claim 1, wherein the second information comprises clock accuracy of the master device and link information of the master device with each slave device.
7. The master-slave role switching method according to claim 6, wherein said link information includes channel numbers of connections of the master device and each slave device after role exchange and a start time of a first connection event.
8. The master-slave role switching method of claim 1, wherein prior to said sending a role swap request to the selected slave device, further comprising:
receiving at least one performance index from each slave device respectively;
judging whether role switching is triggered according to the performance index;
and if the role switching is triggered, selecting one slave device according to the performance index.
9. The master-slave role switching method according to claim 8, wherein the performance index is one or more of remaining power, wearing status, packet loss rate and signal strength.
10. The method for role switching according to claim 8 or 9, wherein said determining whether to trigger role switching according to the performance indicator specifically comprises:
when the residual capacity of the master device is smaller than a preset first capacity threshold and the capacity difference value between the residual capacity of at least one slave device and the residual capacity of the master device is larger than a preset second capacity threshold; or
When the master device is in an unworn state and there is at least one slave device in a worn state; or
When the packet loss rate of the master device is greater than a preset first packet loss rate threshold, and the packet loss rate of at least one slave device is smaller than or equal to a preset second packet loss rate threshold, the second packet loss rate threshold is smaller than or equal to the first packet loss rate threshold; or
And when the signal intensity of the master device is smaller than a preset first intensity threshold value and the signal intensity of at least one slave device is larger than or equal to a preset second intensity threshold value, triggering role switching.
11. A master-slave role switching method is applied to selected slave devices, wherein the selected slave devices are connected with a master device and are connected with a data source device through a second data link, and the master device is communicated with the data source device through a first data link and is connected with at least one slave device; the method comprises the following steps:
after receiving a role exchange request sent by the master device, feeding back a response including first information for role conversion to the master device, so that the master device converts to a slave device role according to the first information and is connected with the data source device through the second data link;
receiving second information which is sent by the main equipment and used for role conversion;
and converting the second information into a main device role according to the second information, and communicating with the data source device through the first data link.
12. The master-slave role switching method of claim 11, wherein said second data link is a listening link.
13. The master-slave role switching method according to claim 11 or 12, wherein said second information includes a waiting time for role exchange and master configuration information;
the converting into the role of the master device according to the second information specifically includes:
after the waiting time, converting into a main device role according to the main device configuration information;
the first information is slave device configuration information, so that the master device is converted into a slave device role according to the slave device configuration information after the waiting time elapses, and is connected with the data source device through the second data link.
14. The master-slave role switching method according to claim 13, wherein said master device remains wired to said at least one slave device through a connection event;
the role exchange request comprises a periodicity N, which represents the periodicity of the connection event from the starting time of the current connection event to the starting time of the Nth connection event, wherein N is an integer greater than zero;
after receiving a role exchange request sent by the master device and before feeding back a response including first information for role switching to the master device, the method further includes:
identifying the N from the role exchange request, and judging whether to allow role exchange at the starting moment of the Nth connection event;
if the judgment result is allowable, integrating the N into the response;
the waiting time is the time difference between the starting time of the Nth connection event and the starting time of the current connection event.
15. The master-slave role switching method of claim 11, wherein said first information comprises a clock accuracy of said selected slave device.
16. The master-slave role switching method of claim 11, wherein the second information comprises clock accuracy of the master device and link information of the master device with each slave device.
17. The master-slave role switching method according to claim 16, wherein said link information includes channel numbers of connection of the master device and each slave device after role exchange and a start time of a first connection event.
18. A chip, arranged in a master device, the master device communicating with a data source device over a first data link and being connected to at least one slave device, each slave device being connected to the data source device over a second data link; the chip includes:
a first sending module, configured to send a role exchange request to a selected slave device, where the selected slave device is one of at least one slave device connected to the master device;
a first receiving module, configured to receive an acknowledgement including first information for role switching fed back by the selected slave device;
the second information generation module is used for generating second information for role conversion after receiving the response;
the first sending module is further configured to send the second information to the selected slave device, so that the selected slave device switches to a master device role according to the second information and communicates with the data source device through the first data link;
and the first role conversion module is used for converting the role of the slave equipment according to the first information and connecting the second data link with the data source equipment.
19. The chip of claim 18, wherein the second data link is a listening link.
20. The chip according to claim 18 or 19, wherein the second information includes a waiting time for role exchange and master configuration information, so that the selected slave device can switch to a master role according to the master configuration information after the waiting time elapses;
the first information is slave device configuration information, and the first role transformation module is specifically configured to transform to a slave device role according to the slave device configuration information after the waiting time elapses.
21. The chip of claim 20, wherein the master device remains connected to the at least one slave device through a connection event;
the role exchange request comprises a periodicity N, which represents the periodicity of the connection event from the starting time of the current connection event to the starting time of the Nth connection event, wherein N is an integer greater than zero;
after receiving the response, the second information generation module is further configured to determine whether the response includes the N; and if the judgment result is that the role is exchanged, setting the waiting time for exchanging roles according to the N.
22. The chip of claim 18, wherein the first information comprises a clock accuracy of the selected slave device.
23. The chip of claim 18, wherein the second information comprises a clock accuracy of the master device and link information of the master device with each slave device.
24. The chip of claim 23, wherein the link information includes a channel number of a master device and each slave device connection after role exchange and a start time of a first connection event.
25. The chip of claim 18, wherein the chip further comprises a triggering module, before the first sending module sends the role exchange request to the selected slave device, the first receiving module is configured to receive at least one performance indicator from each slave device, and the triggering module determines whether to trigger the role switch according to the performance indicator; and if the role switching is triggered, selecting one slave device according to the performance index.
26. The chip of claim 25, wherein the performance index is one or more of a remaining power, a wearing state, a packet loss rate, and a signal strength.
27. The chip according to claim 25 or 26, wherein the triggering module is configured to determine whether to trigger role switching according to the performance indicator, specifically:
the trigger module is used for judging whether the residual electric quantity of the master device is smaller than a preset first electric quantity threshold value or not, and if the electric quantity difference value between the residual electric quantity of at least one slave device and the residual electric quantity of the master device is larger than a preset second electric quantity threshold value; or
When the master device is in an unworn state and there is at least one slave device in a worn state; or
When the packet loss rate of the master device is greater than a preset first packet loss rate threshold, and the packet loss rate of at least one slave device is smaller than or equal to a preset second packet loss rate threshold, the second packet loss rate threshold is smaller than or equal to the first packet loss rate threshold; or
And when the signal intensity of the master device is smaller than a preset first intensity threshold value and the signal intensity of at least one slave device is larger than or equal to a preset second intensity threshold value, triggering role switching.
28. A chip disposed in a selected slave device, the selected slave device being coupled to a master device and to a data source device via a second data link, the master device communicating with the data source device via a first data link and being coupled to at least one slave device, the chip comprising:
a second receiving module, configured to receive a role exchange request sent by the master device;
a second sending module, configured to, after receiving the role exchange request, feed back a response including first information used for role switching to the master device, so that the master device switches to a slave device role according to the first information, and is connected to the data source device through the second data link;
the second receiving module is further configured to receive second information for role switching sent by the master device;
and the second role conversion module is used for converting the role of the main equipment according to the second information and communicating with the data source equipment through the first data link.
29. The chip of claim 28, wherein the second data link is a listening link.
30. The chip of claim 28 or 29, wherein the second information comprises role-reversed latency and master configuration information;
the second role conversion module is specifically configured to convert the role of the master device into the role of the master device according to the master device configuration information after the waiting time elapses;
the first information is slave device configuration information, so that the master device is converted into a slave device role according to the slave device configuration information after the waiting time elapses, and is connected with the data source device through the second data link.
31. The chip of claim 30, wherein the master device remains wired to the at least one slave device through a connection event;
the role exchange request comprises a periodicity N, which represents the periodicity of the connection event from the starting time of the current connection event to the starting time of the Nth connection event, wherein N is an integer greater than zero;
the system also comprises a first information generation module;
after receiving the role exchange request, the first information generation module is configured to identify the N from the role exchange request, and determine whether to allow role exchange at the start time of the nth connection event; if the judgment result is allowable, integrating the N into a response comprising first information for role switching;
the waiting time is the time difference between the starting time of the Nth connection event and the starting time of the current connection event.
32. The chip of claim 28, wherein the first information comprises a clock accuracy of the selected slave device.
33. The chip of claim 28, wherein the second information comprises clock accuracy of the master device and link information of the master device with each slave device.
34. The chip of claim 33, wherein the link information comprises a channel number of a master device and each slave device connection after role exchange and a start time of a first connection event.
35. A data transmission system, comprising: a data source device and a plurality of receiving devices, the plurality of receiving devices including a master device and at least one slave device; the master device is connected with each slave device;
the master device communicates with the data source device over a first data link and receives application data from the data source device;
the slave device and the data source device are connected with the data source device through a second data link, and the application data are received from the data source device in a listening mode;
the master device comprising a chip as claimed in any one of claims 18 to 27.
36. A data transmission system, comprising: a data source device and a plurality of receiving devices, the plurality of receiving devices including a master device and at least one slave device; the master device is connected with each slave device;
the master device communicates with the data source device over a first data link and receives application data from the data source device;
the slave device and the data source device are connected with the data source device through a second data link, and the application data are received from the data source device in a listening mode;
the slave device comprising a chip as claimed in any one of claims 28 to 34.
CN201880000275.1A 2018-01-25 2018-01-25 Master-slave role conversion method, chip and data transmission system Active CN108323241B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/074164 WO2019144351A1 (en) 2018-01-25 2018-01-25 Master-slave role conversion method, chip, and data transmission system

Publications (2)

Publication Number Publication Date
CN108323241A CN108323241A (en) 2018-07-24
CN108323241B true CN108323241B (en) 2021-01-29

Family

ID=62896671

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880000275.1A Active CN108323241B (en) 2018-01-25 2018-01-25 Master-slave role conversion method, chip and data transmission system

Country Status (2)

Country Link
CN (1) CN108323241B (en)
WO (1) WO2019144351A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019144351A1 (en) * 2018-01-25 2019-08-01 深圳市为通博科技有限责任公司 Master-slave role conversion method, chip, and data transmission system
CN110266547B (en) * 2019-07-02 2022-05-24 普联技术有限公司 Networking method and equipment
CN111107526B (en) * 2019-10-08 2023-05-02 珠海市杰理科技股份有限公司 Master-slave switching method, device and system for standard time slot dual-wireless Bluetooth device
CN111225437A (en) * 2019-11-29 2020-06-02 博微宇空(重庆)科技有限公司 Gain control method for receiving signal of ground base station
CN112672290B (en) * 2020-12-02 2022-05-31 无锡中感微电子股份有限公司 Method, device and equipment for master-slave switching in wireless communication system
CN112788494A (en) * 2021-02-09 2021-05-11 维沃移动通信有限公司 Earphone control method, device, equipment and medium
CN115412952A (en) * 2021-05-27 2022-11-29 成都极米科技股份有限公司 Wireless perception control method, equipment and computer storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002052793A1 (en) * 2000-12-27 2002-07-04 Nokia Corporation Device roles and piconet connections
CN104335642A (en) * 2012-05-26 2015-02-04 高通股份有限公司 Smart battery wear leveling for audio devices
CN105787344A (en) * 2016-03-25 2016-07-20 江苏惠通集团有限责任公司 Slave device and method for establishing connection between same and master device
CN106535081A (en) * 2016-12-20 2017-03-22 建荣半导体(深圳)有限公司 Bluetooth mode switching method and device, communication system and stereophonic audio transmission method
CN106878926A (en) * 2017-02-08 2017-06-20 泰凌微电子(上海)有限公司 A kind of data transmission method based on low-power consumption bluetooth, from main equipment and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103731294A (en) * 2013-03-28 2014-04-16 深圳市金溢科技有限公司 Method, device and system for two-machine hot-standby communication
CN106535057B (en) * 2016-12-07 2022-04-12 歌尔科技有限公司 Operation switching method and system for master equipment and slave equipment
WO2019144351A1 (en) * 2018-01-25 2019-08-01 深圳市为通博科技有限责任公司 Master-slave role conversion method, chip, and data transmission system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002052793A1 (en) * 2000-12-27 2002-07-04 Nokia Corporation Device roles and piconet connections
CN104335642A (en) * 2012-05-26 2015-02-04 高通股份有限公司 Smart battery wear leveling for audio devices
CN105787344A (en) * 2016-03-25 2016-07-20 江苏惠通集团有限责任公司 Slave device and method for establishing connection between same and master device
CN106535081A (en) * 2016-12-20 2017-03-22 建荣半导体(深圳)有限公司 Bluetooth mode switching method and device, communication system and stereophonic audio transmission method
CN106878926A (en) * 2017-02-08 2017-06-20 泰凌微电子(上海)有限公司 A kind of data transmission method based on low-power consumption bluetooth, from main equipment and system

Also Published As

Publication number Publication date
WO2019144351A1 (en) 2019-08-01
CN108323241A (en) 2018-07-24

Similar Documents

Publication Publication Date Title
CN108323241B (en) Master-slave role conversion method, chip and data transmission system
WO2021129892A1 (en) System and method for switching device primary/secondary roles for use in wireless communications
CN111106853B (en) Master-slave switching method, device and equipment for double wireless Bluetooth equipment and audio system
CN110120878A (en) The method and apparatus for obtaining link-quality
JP6772330B2 (en) Bluetooth sub-circuit in multi-configuration personnel type bluetooth device
CN111435901A (en) Hybrid automatic repeat request acknowledgement feedback method, terminal and network equipment
JP5964737B2 (en) Communication terminal
WO2020057312A1 (en) Transmission time indication method for unlicensed band, network device, and terminal
JP6772329B2 (en) Multi-configuration personnel type Bluetooth device that can avoid signal interruption
JP2019193258A (en) Bluetooth main circuit in multi-component Bluetooth device
JP7236553B2 (en) Support information reporting method and device, communication equipment
GB2491870A (en) Peer to Peer Communication Link Monitoring in Unlicensed band or Cluster Network
CN111264079B (en) Data transmission method, electronic device, system and storage medium
KR20210088378A (en) Apparatu and method for updating time sensitive communications assistance information in a mobkle system
CN103220775A (en) Method, device and system for achieving data synchronization
KR100636527B1 (en) Apparatus and method for power management in bluetooth system
TWI707604B (en) Main bluetooth circuit of multi-member bluetooth device
TW202044846A (en) Communication terminal constituting multi-hop network, and multi-hop network
JP5294416B2 (en) Remote control system and remote control method
WO2018014688A1 (en) Frame stream control method and device, and computer storage medium
WO2008132549A2 (en) Coexistance device communication
TWI524688B (en) Bluetooth service estimation apparatus and bluetooth service estimation method thereof
CN105518999A (en) Communication apparatus, communication system and communication method
TWI781880B (en) Radio communication apparauts
TWI783255B (en) Auxiliary bluetooth circuit of multi-member bluetooth device capable of dynamically switching operation mode

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant