Locating method using advertisement and electronic device therefor
Disclosed are methods and electronic devices configured to transmit, at a first period, a first-type advertisement (ADV) packet to a first external electronic device using the wireless communication circuit; determine that the electronic device is missing based on location information of the electronic device if a first response signal for the first-type ADV packet is not received from the first external electronic device; in response to determining that the electronic device is missing, transmit, at a second period, a second-type ADV packet to a nearby external electronic device using the wireless communication circuit; receive a second response signal for the second-type ADV packet from a second external electronic device; and transmit, to the second external electronic device, a signal including information of the electronic device based on reception of the second response signal.
1 . An electronic device comprising:
a wireless communication circuit configured to perform short-range wireless communication;
a processor; and
a memory,
wherein the memory stores instructions that, when executed by the processor, cause the electronic device to:
transmit, from the electronic device to a first external electronic device at a first period, a first-type advertisement (ADV) packet using the wireless communication circuit, wherein the first-type ADV packet is transmitted to request a response from the first external electronic device,
determine, by the electronic device, that the electronic device is missing based on location information of the electronic device and based on the first electronic device not receiving a first response signal for the first-type ADV packet from the first external electronic device,
transmit, by the electronic device to a nearby external electronic device, a second-type ADV packet at a second period using the wireless communication circuit based on determining that the electronic device is missing, wherein the second-type ADV is transmitted to request a response from the nearby external electronic device,
receive, by the electronic device and from a plurality of nearby external electronic devices, a plurality of second response signals for the second-type ADV packet,
identify, by the electronic device, a second external electronic device from among the plurality of nearby external electronic devices based on at least one of a reception strength, a number of reception times, or a reception duration for each of the plurality of second response signals, and
transmit, by the electronic device to the second external electronic device, a signal including information of the electronic device and missing state information.
2 . The electronic device of claim 1 , wherein the instructions, when executed by the processor, further cause the electronic device to identify the second external electronic device among the plurality of nearby external electronic devices based on the second response signal having at least a specified reception strength being received at least a specified number of times or the second response signal having at least the specified reception strength being received for at least a predefined threshold time from the second external electronic device.
3 . The electronic device of claim 1 , wherein the instructions, when executed by the processor, further cause the electronic device to transmit, to the nearby external electronic device, the second-type ADV packet through at least one of a first ADV channel, a second ADV channel, or a third ADV channel using the wireless communication circuit, based on the electronic device determining that the electronic device is missing.
4 . The electronic device of claim 3 , wherein the instructions, when executed by the processor, further cause the electronic device to, if the electronic device is determined to be missing, select at least one channel from among the first ADV channel, the second ADV channel, or the third ADV channel based on a current time, and
transmit the second-type ADV packet through the selected at least one channel,
wherein a transmission power set for each of the first ADV channel, the second ADV channel, and the third ADV channel is different from each other.
5 . The electronic device of claim 1 , wherein the instructions, when executed by the processor, further cause the electronic device to
determine that the electronic device is not missing if location information stored in the memory corresponds to a specified location, and
determine that the electronic device is missing if the location information stored in the memory does not correspond to the specified location.
6 . The electronic device of claim 5 , wherein the instructions, when executed by the processor, further cause the electronic device to receive the location information and information about the specified location from the first external electronic device.
7 . The electronic device of claim 1 , wherein the instructions, when executed by the processor, further cause the electronic device to transmit, to the second external electronic device, missing information of the electronic device to allow the second external electronic device to transfer the missing information of the electronic device to the first external electronic device via an external server.
8 . The electronic device of claim 1 , further comprising a motion sensor,
wherein the instructions, when executed by the processor, further cause the electronic device to:
obtain a motion of the electronic device using the motion sensor after transmitting the signal including the information of the electronic device, and
search for nearby devices by transmitting the second-type ADV packet at a third period shorter than the second period if the obtained motion is at least a threshold.
9 . The electronic device of claim 1 ,
wherein the first-type ADV packet comprises address information of the first external electronic device, and
a recipient of the second-type ADV packet is not designated.
10 . A method for transmitting electronic device information in a missing state of an electronic device, the method comprising:
transmitting, from the electronic device to a first external electronic device, at a first period, a first-type advertisement (ADV) packet requesting a response from the first external electronic device;
determining, by the electronic device, that the electronic device is missing based on location information of the electronic device and based on the first electronic device not receiving a first response signal for the first-type ADV packet from the first external electronic device;
transmit, by the electronic device to a nearby external electronic device, at a second period, a second-type ADV packet based on determining that the electronic device is missing;
receiving, by the electronic device and from a plurality of nearby external electronic devices, a plurality of second response signals for the second-type ADV packet;
identifying, by the electronic device, a second external electronic device from among the plurality of nearby external electronic devices based on at least one of a reception strength, a number of reception times, or a reception duration for each of the plurality of second response signals; and
transmitting, by the electronic device to the identified second external electronic device, a signal including information of the electronic device and missing state information.
11 . The method of claim 10 , wherein the identifying of the second external electronic device comprises:
identifying the second external electronic device among the plurality of nearby external electronic devices based on the second response signal having at least specified reception strength is received at least a specified number of times from the second external electronic device.
12 . The method of claim 10 ,
wherein the transmitting of the second-type ADV packet at the second period comprises:
sequentially transmitting, by the electronic device and to the nearby external electronic device, the second-type ADV packet through a first ADV channel, a second ADV channel, and a third ADV channel based on the electronic device being determined to be missing,
wherein a transmission power associated with each of the first ADV channel, the second ADV channel, and the third ADV channel is differently set.
13 . The method of claim 10 , wherein determining that the electronic device is missing comprises:
determining that the electronic device is not missing state if location information stored in a memory of the electronic device corresponds to a specified location; and
determining that the electronic device is missing if the location information stored in the memory does not correspond to the specified location.
14 . The method of claim 10 , wherein transmitting the signal including information of the electronic device to the second electronic device comprises allowing the second external electronic device to transfer the missing information of the electronic device to the first external electronic device via an external server.
15 . A non-transitory computer readable medium storing instructions that, when executed by at least one processor, cause the at least one processor to:
transmit, from the electronic device to a first external electronic device at a first period, a first-type advertisement (ADV) packet using the wireless communication circuit, wherein the first-type ADV packet is transmitted to request a response from the first external electronic device;
determine, by the electronic device, that the electronic device is missing based on location information of the electronic device and based on the first electronic device not receiving a first response signal for the first-type ADV packet from the first external electronic device;
transmit, by the electronic device to a nearby external electronic device, a second-type ADV packet at a second period using the wireless communication circuit based on determining that the electronic device is missing, wherein the second-type ADV is transmitted to request a response from the nearby external electronic device;
receive, by the electronic device and from a plurality of nearby external electronic devices, a plurality of second response signals for the second-type ADV packet;
identify, by the electronic device, a second external electronic device from among the plurality of nearby external electronic devices based on at least one of a reception strength, a number of reception times, or a reception duration for each of the plurality of second response signals; and
transmit, by the electronic device to the second external electronic device, a signal including information of the electronic device and missing state information.
16 . The non-transitory computer readable medium of claim 15 , wherein the instructions further cause the at least one processor to identify the second external electronic device among the plurality of nearby external electronic devices based on the second response signal having at least a specified reception strength being received at least a specified number of times or the second response signal having at least the specified reception strength being received for at least a predefined threshold time from the second external electronic device.
17 . The non-transitory computer readable medium of claim 15 , wherein the instructions further cause the at least one processor to transmit, to the nearby external electronic device, the second-type ADV packet through at least one of a first ADV channel, a second ADV channel, or a third ADV channel using the wireless communication circuit, based on the electronic device determining that the electronic device is missing.