1. A method performed by a first device to establish a connection to a second device, the method comprising:obtaining identification information of the second device by using a first communication method;
obtaining the identification information of the second device by using a second communication method;
obtaining first distance information regarding the second device based on characteristics of the first communication method and the second communication method; and
determining whether to transmit a connection request to the second device based on the obtained first distance information,
wherein the determining further comprises:
determining whether the second device is located within a predetermined distance range based on the obtained first distance information;
determining whether a connection establishment with the second device located within the predetermined distance range is necessary based on a service providing method to be used by the second device; and
selectively transmitting the identification information of the second device to an external server based on the determining result.