1. A method of providing information by a server, the method comprising:receiving mode information on a beacon service from a first electronic device;
generating control information based on the mode information; and
transmitting the control information to a second electronic device,
wherein the mode information is identified from a beacon signal transmitted by the second electronic device, and the beacon signal includes at least one piece of mode information corresponding to distance information,
wherein the mode information is determined based on the distance information corresponding to distance between the second electronic device and the first electronic device among the at least one piece of mode information included in the beacon signal, and
wherein each of the at least one piece of mode information comprises distance level information and operation mode information for a different distance between the second electronic device and the first electronic device within a maximum beacon transmission distance.