Patent ID: 11962096

Abstract:
An electronic device is provided. The electronic device includes a housing, a first antenna and a second antenna which are disposed near at least one edge of the housing inside the housing and a first distance away from each other, wherein the first antenna and second antenna are positioned different distances away from an edge vertical to the one edge, a communication circuit operatively connected to the first antenna and second antenna, at least one sensor, a processor, and a memory. The memory can store instructions which, when executed, enable the processor to identify the posture of the electronic device by means of at least one sensor, if the identified posture of the electronic device is a landscape state, determine the position of at least one external electronic device on the basis of at least one signal received from the at least one external electronic device, and, if the identified posture of the electronic device is a portrait state, determine the position of an external electronic device on the basis of a signal received from the external electronic device positioned in a direction which is determined on the basis of the placements of the first antenna and second antenna among the at least one external electronic device.