Method for controlling electronic device, and apparatus thereof

Various embodiments relating to a method and apparatus for controlling an electronic device are described. According to an embodiment of the present invention, a method for controlling an electronic device includes the following operations: transmitting, by the electronic device, a first signal to a first portion of a medium; receiving, by the electronic device, a second signal corresponding to the first signal through a second portion of the medium; selecting, by the electronic device, at least some of the second signal; and when a function corresponding to the at least some is set, performing, by the electronic device, the function, and when a function corresponding to the at least some is not set, setting, by the electronic device, the function. Other embodiments are possible.