Device and method for transmitting data
According to various embodiments, an electronic device may comprise a memory, a communication circuit configured to perform communication with at least two external electronic devices through at least two communication links, and at least one processor operatively connected with the memory and the communication circuit. The memory may store instructions configured to, when executed, cause the at least one processor to, transmit first data to each of the at least two external electronic devices through the at least two communication links. The processor further monitors whether second data, which is broadcast data, is received while transmitting the first data. The processor further transmits the second data, instead of the first data, to at least one of the at least two external electronic devices based on a set condition.
1 . An electronic device comprising:
a memory;
a communication circuit configured to perform communication with at least two external electronic devices through at least two communication links; and
at least one processor operatively connected with the memory and the communication circuit,
wherein the memory stores instructions configured to, when executed by the at least one processor individually or collectively, cause the electronic device to:
transmit first data to each of the at least two external electronic devices through the at least two communication links, wherein the first data is transmitted via a connected isochronous stream (CIS), wherein the at least two external electronic devices comprise at least a first external electronic device and a second external electronic device,
receive second data, which is broadcast data received via a broadcast isochronous stream (BIS), while transmitting the first data to the first external electronic device and the second external electronic device, wherein the second data is data of a configured broadcast channel,
determine that a setting is preset for the first external electronic device to receive the second data, and
based on determining that the setting is preset for the first external electronic device to receive the second data, transmit the second data, instead of the first data, to the first external electronic device, and transmit the first data to the second external electronic device.
2 . The electronic device of claim 1 , wherein:
based on determining that the first external electronic device being selected for receiving the second data,
transmit the second data, instead of the first data, to the first external electronic device and transmit the first data the second external electronic device.
3 . The electronic device of claim 1 , wherein the instructions cause the electronic device to
based on determining that the first external electronic device being selected as a device for receiving the first data and the second data,
transmit the first data and the second data to the first external electronic device and transmit the first data to the second external electronic device.
4 . The electronic device of claim 3 , wherein the instructions cause the electronic device to transmit the first data and the second data to the first external electronic device during a same time.
5 . The electronic device of claim 1 , wherein the instructions cause the electronic device to,
based on determining that the at least two external electronic devices are selected as devices for receiving the second data,
transmit the second data, instead of the first data, to the at least two external electronic devices.
6 . The electronic device of claim 1 , wherein the instructions cause the electronic device to:
based on determining that the at least two external electronic devices are selected as devices for receiving the first data and the second data
transmit the first data and the second data to the at least two external electronic devices.
7 . The electronic device of claim 6 , wherein the instructions cause the electronic device to
transmit the first data and the second data to the at least two external electronic devices during a same time.
8 . The electronic device of claim 1 , wherein the instructions cause the electronic device to
based on determining that at least one of the at least two external electronic devices is not to receive the second data, stop monitoring whether the second data is received or transmit the first data to at least one of the at least two external electronic devices although the second data is received.
9 . The electronic device of claim 1 , wherein the instructions cause the electronic device to
in response to completion of the transmission of the second data, retransmit the first data.
10 . The electronic device of claim 1 , wherein the instructions cause the electronic device to monitor for the second data over one or more broadcast channels.
11 . The electronic device of claim 1 , wherein the CIS is a data transport stream for point-to-point communication and the BIS is a broadcast data transport stream.
12 . A method for transmitting data by an electronic device, the method comprising:
transmitting first data to each of at least two external electronic devices through at least two communication links, the first data comprising audio data, wherein the first data is transmitted via a connected isochronous stream (CIS), wherein the at least two external electronic devices comprise at least a first external electronic device and a second external electronic device;
receiving second data, which is broadcast data received via a broadcast isochronous stream (BIS), while transmitting the first data to the first external electronic device and the second external electronic device, wherein the second data is data of a configured broadcast channel;
determining that a setting is preset for the first external electronic device to receive the second data; and
based on determining that the setting is preset for the first external electronic device to receive the second data, transmitting the second data, instead of the first data, to the first external electronic device.
13 . The method of claim 12 , wherein transmitting the second data comprises:
based on determining that the first external electronic device being selected for receiving the second data, transmitting the second data, instead of the first data, to the first external electronic device and transmit the first data to the second external electronic devices; and
based on determining that the first external electronic device being selected as a device for receiving the first data and the second data, transmitting the first data and the second data to the first external electronic device and transmitting the first data to the second external electronic device.
14 . The method of claim 13 , wherein transmitting the first data and the second data to the first external electronic device comprises:
transmitting the first data and the second data to the first external electronic device during a same time.
15 . The method of claim 12 , wherein transmitting the second data comprises:
based on determining that the at least two external electronic devices are selected as devices for receiving the second data, transmitting the second data, instead of the first data, to the at least two external electronic devices.
16 . The method of claim 12 , wherein transmitting the second data comprises:
based on determining that the at least two external electronic devices are selected as devices for receiving the first data and the second data, transmitting the first data and the second data to the at least two external electronic devices.
17 . The method of claim 16 , wherein transmitting the first data and the second data to the at least two external electronic devices comprises:
transmitting the first data and the second data to the at least two external electronic devices during a same time.
18 . The method of claim 12 , wherein transmitting the second data comprises:
based on determining that at least one of the at least two external electronic devices is not to receive the second data, stopping monitoring whether the second data is received or transmitting the first data to at least one of the at least two external electronic devices although the second data is received.
19 . The method of claim 12 , further comprising:
in response to completion of the transmission of the second data, retransmitting the first data.
20 . The method of claim 12 , wherein the CIS is a data transport stream for point-to-point communication and the BIS is a broadcast data transport stream.