Positioning method using wireless communication, and electronic device for supporting same
An electronic device according to an embodiment of the disclosure may include: a communication circuit, and at least one processor, comprising processing circuitry, electrically coupled to the communication circuit. At least one processor, individually and/or collectively, may be configured to: receive via the communication circuit an advertising frame transmitted by a first external electronic device, transmit a first request signal, requesting a second external electronic device to receive the advertising frame from the first external electronic device, to the second external electronic device via the communication circuit in response to receiving the advertising frame from the first external electronic device, obtain advertisement result response data, including first timestamp information on a timing at which the second external electronic device receives the advertising frame transmitted by the first external electronic device, from the second external electronic device via the communication circuit, obtain location data including location information of the second external electronic device with respect to the electronic device, based on performing ranging using Ultra-Wideband (UWB) communication with the second external electronic device, and identify a location of the first external electronic device with respect to the electronic device, based on the advertisement result response data and the location data.
1 . An electronic device comprising:
a communication circuit;
memory storing instructions; and
at least one processor, comprising processing circuitry
wherein the instructions, when executed by the at least one processor individually and/or collectively, cause the electronic device to:
receive, via the communication circuit, an advertising frame transmitted by a first external electronic device;
transmit, via the communication circuit, a first request signal, requesting a second external electronic device to receive the advertising frame from the first external electronic device, to the second external electronic device in response to receiving the advertising frame from the first external electronic device;
generate a plurality of ranging blocks for performing ranging, wherein the plurality of ranging blocks includes a first ranging block and a second ranging block;
obtain first location data including a location of the second external electronic device with respect to the electronic device for a time duration in which the first ranging block is enabled, based on performing the ranging with the second external electronic device;
obtain second location data including the location of the second external electronic device with respect to the electronic device for a time duration in which the second ranging block is enabled, based on performing the ranging with the second external electronic device;
obtain, via the communication circuit, response data, including first timestamp information on a timing at which the second external electronic device receives the advertising frame transmitted by the first external electronic device and second timestamp information on a timing at which the second external electronic device receives a second message corresponding to a ranging response message from the electronic device, from the second external electronic device;
identify a location of the first external electronic device with respect to the electronic device by selecting one of the first location data or the second location data as selected location data for the second external electronic device based on which of the first ranging block or the second ranging block a timing corresponding to the first timestamp information is temporally closer to;
calculating a difference between (i) a distance from the first external electronic device to the electronic device and (ii) a distance from the first external electronic device to the second external electronic device, based on the first timestamp information, the second timestamp information, and the selected location data; and
determining a location of the first external electronic device based on the difference and the selected location data.
2 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor individually and/or collectively, cause the electronic device to:
based on receiving the advertising frame from the first external electronic device in a state where a ranging session for performing the ranging with the second external electronic device and including the plurality of ranging blocks is not generated, transmit, via the communication circuit, a second request signal, requesting to generate the ranging session together with the first request signal, to the second external electronic device.
3 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor individually and/or collectively, cause the electronic device to based on receiving the advertising frame from the first external electronic device in a state where a ranging session for performing the ranging with the second external electronic device and including the plurality of ranging blocks is generated, transmit the first request signal through the ranging session and receive the response data.
4 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor individually and/or collectively, cause the electronic device to, using the communication circuit through a ranging session for performing the ranging with the second external electronic device and including the plurality of ranging blocks:
receive a first message corresponding to a ranging initiation message from the second external electronic device;
transmit a second message corresponding to a ranging response message to the second external electronic device, in response to receiving the first message; and
receive a third message corresponding to a ranging final message from the second external electronic device.
5 . The electronic device of claim 1 ,
wherein the instructions, when executed by the at least one processor individually and/or collectively, cause the electronic device to obtain distance information on a distance between the electronic device and the second external electronic device through a ranging session for performing the ranging, and
wherein each of the first location data and the second location data includes the corresponding distance information.
6 . The electronic device of claim 1 ,
wherein the instructions, when executed by the at least one processor individually and/or collectively, cause the electronic device to obtain first angle information on an angle at which the second external electronic device is located with respect to the electronic device, based on an Angle of Arrival (AoA) of a signal received from the second external electronic device through the ranging session for performing the ranging during the first ranging block and the second ranging block, and
wherein each of the first location data and the second location data includes the corresponding first angle information.
7 . The electronic device of claim 1 , wherein the instructions, when executed by the at least one processor individually and/or collectively, cause the electronic device to:
obtain second angle information on an angle at which the first external electronic device is located with respect to the electronic device, based on an angle of arrival (AoA) of the advertising frame received from the first external electronic device via the communication circuit; and
identify the location of the first external electronic device with respect to the electronic device, further based on the second angle information together with the difference and the selected location data.
8 . A method of operating an electronic device, the method comprising:
receiving an advertising frame transmitted by a first external electronic device;
transmitting a first request signal, requesting a second external electronic device to receive the advertising frame from the first external electronic device, to the second external electronic device in response to receiving the advertising frame from the first external electronic device;
generating a plurality of ranging blocks for performing ranging, wherein the plurality of ranging blocks includes a first ranging block and a second ranging block;
obtaining first location data including a location of the second external electronic device with respect to the electronic device for a time duration in which the first ranging block is enabled, based on performing the ranging with the second external electronic device;
obtaining second location data including the location of the second external electronic device with respect to the electronic device for a time duration in which the second ranging block is enabled, based on performing the ranging with the second external electronic device;
receiving response data, including first timestamp information on a timing at which the second external electronic device receives the advertising frame transmitted by the first external electronic device and second timestamp information on a timing at which the second external electronic device receives a second message corresponding to a ranging response message from the electronic device, from the second external electronic device;
identifying a location of the first external electronic device with respect to the electronic device by selecting one of the first location data or the second location data as selected location data for the second external electronic device based on which of the first ranging block or the second ranging block a timing corresponding to the first timestamp information is temporally closer to;
calculating a difference between (i) a distance from the first external electronic device to the electronic device and (ii) a distance from the first external electronic device to the second external electronic device, based on the first timestamp information, the second timestamp information, and the selected location data; and
determining a location of the first external electronic device based on the difference and the selected location data.
9 . The method of claim 8 , wherein performing the ranging with the second external electronic device to obtain the first location data and the second location data through a ranging session including the plurality of ranging blocks for performing the ranging comprises:
receiving a first message corresponding to a ranging initiation message from the second external electronic device;
transmitting a second message corresponding to a ranging response message to the second external electronic device, in response to receiving the first message; and
receiving a third message corresponding to a ranging final message from the second external electronic device.
10 . The method of claim 8 , wherein the obtaining of the first location data and the obtaining of the second location data comprise obtaining corresponding distance information on a distance between the electronic device and the second external electronic device through a ranging session for performing the ranging.
11 . The method of claim 8 , wherein the obtaining of the first location data and the obtaining of the second location data comprise obtaining corresponding first angle information on an angle at which the second external electronic device is located with respect to the electronic device, based on an Angle of Arrival (AoA) of a signal received from the second external electronic device through the ranging session for performing the ranging.
12 . The method of claim 8 , further comprising
obtaining second angle information on an angle at which the first external electronic device is located with respect to the electronic device, based on an angle of arrival (AoA) of the advertising frame received from the first external electronic device,
wherein the determining of the location of the first external electronic device with respect to the electronic device comprises determining the location of the first external electronic device with respect to the electronic device, based on the second angle information, the difference, and the selected location data.
13 . An electronic device comprising:
a communication circuit supporting ultra-wideband (UWB) communication;
memory storing instructions; and
at least one processor comprising processing circuitry,
wherein the instructions, when executed by the at least one processor individually and/or collectively, cause the electronic device to:
receive, via the communication circuit, from a first external electronic device, a first request signal requesting the electronic device to receive an advertising frame transmitted by a second external electronic device,
generate an advertisement reception session in response to receiving the first request signal,
generate a plurality of ranging blocks for performing ranging with the first external electronic device, wherein the plurality of ranging blocks includes a first ranging block and a second ranging block,
perform the ranging using UWB communication with the first external electronic device during a time duration in which the first ranging block is enabled and during a time duration in which the second ranging block is enabled,
receive, via the communication circuit, the advertising frame transmitted by the second external electronic device through the advertisement reception session, and
transmit, via the communication circuit, response data including first timestamp information on a timing at which the advertising frame is received from the second external electronic device and second timestamp information on a timing at which the electronic device receives a second message corresponding to a ranging response message from the first external electronic device, to the first external electronic device.
14 . The electronic device of claim 13 , wherein the instructions, when executed by the at least one processor individually and/or collectively, cause the electronic device to:
receive, via the communication circuit, a second request signal requesting to generate a ranging session for performing ranging using UWB communication with the first external electronic device, together with the first request signal, and
generate the ranging session, including the plurality of ranging blocks, and the advertisement reception session, in response to receiving the first request signal and the second request signal.
15 . The electronic device of claim 14 , wherein the instructions, when executed by the at least one processor individually and/or collectively, cause the electronic device using the communication circuit through the ranging session for performing the ranging during the plurality of ranging blocks to:
transmit a first message corresponding to a ranging initiation message to the first external electronic device through the ranging session,
receive a second message corresponding to a ranging response message from the first external electronic device, and
transmit a third message corresponding to a ranging final message to the first external electronic device, in response to receiving the second message.
16 . The electronic device of claim 15 , wherein the instructions, when executed by the at least one processor individually and/or collectively, cause the electronic device to:
obtain second timestamp information on a timing at which the second message corresponding to the ranging response message is received from the first external electronic device, and
transmit, via the communication circuit, the response data including the first timestamp information and the second timestamp information to the first external electronic device.
17 . The electronic device of claim 13 , wherein the electronic device comprises a wearable electronic device.