An electronic device comprising: an mmWave communication module configured to perform first communication with a first external electronic device using a first communication scheme; a first antenna array in which antennas outputting signals of the first communication scheme are arranged; a second antenna array in which antennas receiving the signals of the first communication scheme are arranged; and a processor , wherein the processor is configured to: receive a first signal transmitted by the first external electronic device , identify a distance of a transmission path of the first signal based on time information included in the first signal, identify a direction in which the first signal is received, transmit a second signal by using the first antenna array in the same direction as the direction in which the first signal is received, receive a third signal obtained when the second signal is reflected by using the second antenna array , identify a distance of a transmission path of the second signal based on a difference between a transmission time of the second signal and a reception time of the third signal, and determine whether the transmission path of the first signal is a line of sight (LoS) path between the electronic device and the first external electronic device based on a difference between the distance of the transmission path of the first signal and the distance of the transmission path of the second signal. an mmWave communication module configured to perform first communication with a first external electronic device using a first communication scheme; a first antenna array in which antennas outputting signals of the first communication scheme are arranged; a second antenna array in which antennas receiving the signals of the first communication scheme are arranged; and a processor , wherein the processor is configured to: receive a first signal transmitted by the first external electronic device , identify a distance of a transmission path of the first signal based on time information included in the first signal, identify a direction in which the first signal is received, transmit a second signal by using the first antenna array in the same direction as the direction in which the first signal is received, receive a third signal obtained when the second signal is reflected by using the second antenna array , identify a distance of a transmission path of the second signal based on a difference between a transmission time of the second signal and a reception time of the third signal, and determine whether the transmission path of the first signal is a line of sight (LoS) path between the electronic device and the first external electronic device based on a difference between the distance of the transmission path of the first signal and the distance of the transmission path of the second signal. receive a first signal transmitted by the first external electronic device , identify a distance of a transmission path of the first signal based on time information included in the first signal, identify a direction in which the first signal is received, transmit a second signal by using the first antenna array in the same direction as the direction in which the first signal is received, receive a third signal obtained when the second signal is reflected by using the second antenna array , identify a distance of a transmission path of the second signal based on a difference between a transmission time of the second signal and a reception time of the third signal, and determine whether the transmission path of the first signal is a line of sight (LoS) path between the electronic device and the first external electronic device based on a difference between the distance of the transmission path of the first signal and the distance of the transmission path of the second signal. <EOS>