CPC G07C 9/22 (2020.01) [G07C 9/00309 (2013.01); H04W 4/023 (2013.01); H04W 4/80 (2018.02); G07C 2009/00769 (2013.01); G07C 2209/08 (2013.01); G07C 2209/62 (2013.01); G07C 2209/63 (2013.01)] | 9 Claims |
1. An electronic device comprising:
a communication circuit configured to perform a first communication and a second communication;
an access management circuit configured to control a door locking device; and
a processor operatively connected to the communication circuit and the access management circuit,
wherein the processor is configured to:
establish a connection to an external electronic device by using the first communication,
transmit or receive a parameter for the second communication by using the first communication,
establish a connection to the external electronic device by using the second communication,
measure a distance from the external electronic device by using a first mode of the second communication, wherein the first mode is a positioning mode in which the electronic device transmits a signal including transmission and/or reception time information so as to measure a distance from the external electronic device,
identify a key stored in the external electronic device in case that the measured distance is within a designated distance,
activate or deactivate, based on the key, the door locking device by using the access management circuit,
when the door locking device is deactivated, measure a distance and direction from a user of the electronic device using a second mode of the second communication,
when the door locking device is deactivated, configure a timer, and
provide a warning by using a speaker in case that it is determined that the distance from the user of the electronic device or the distance from the external electronic device is greater than a determined value or the configured timer expires, and
wherein the second mode is a radar mode in which the electronic device transmits a signal and measures a time of the signal reflected back from the user so as to measure the distance and direction from the user.
|