Patent ID: 8923262

Claim:
A method of an electronic device for locating WIFI devices adjacent to the electronic device, the method comprising: searching for one or more WIFI devices adjacent to the electronic device, and collecting WIFI signals transmitted from each of the WIFI devices; obtaining a first signal strength of the WIFI signals of each of the WIFI devices and recording a moving distance of the electronic device when the electronic device is moving along a horizontal line, and calculating a relative distance between the electronic device and each of the WIFI devices according to the first signal strength of the WIFI signals transmitted from each of the WIFI devices; establishing an X-Y coordinate system based on the horizontal line and an initial position of the electronic device, and calculating coordinate values of each of the WIFI devices based on the X-Y coordinate system according to the moving distance and the relative distance between the electronic device and each of the WIFI devices; calculating an average coordinate value of the coordinate values of each of the WIFI devices when the electronic device stops moving along the horizontal line; obtaining a second signal strength of the WIFI signals of each of the WIFI devices when the electronic device is moving along the vertical line, and determining whether each of the WIFI devices is located above or below the X-axis of the X-Y coordinate system according to the average coordinate value of each of the WIFI devices; and drawing a distribution map of the WIFI devices adjacent to the electronic device based on the X-Y coordinate system according to the determination result and the average coordinate value of each of the WIFI devices.