An electronic device comprising: an electromagnetic interference, EMI, sensor configured to sense EMI patterns generated from at least one external electronic device and disposed at a location touchable by a body of a user of the electronic device; a memory configured to store a first database and a second database associated with at least a part of the EMI patterns, gestures of the user, and first functions executable by the at least one external electronic device and a third database associated with the at least one external electronic device, the first database including information associated with one or more two dimensional, 2D, gestures of the user and the second database including information associated with one or more three dimensional, 3D, gestures of the user; at least one processor electrically connected with the EMI sensor and the memory; and a display electrically connected with the at least one processor, wherein the at least one processor is configured to: sense a first EMI pattern, which is changed by the at least one external electronic device being in contact with the body of the user, from among the EMI patterns, using the EMI sensor; recognize an external electronic device being in contact with the body of the user from among the at least one external electronic device, based on the first EMI pattern and the third database; sense a second EMI pattern, which is changed according to a gesture among the gestures of the user, from among the EMI patterns, using the EMI sensor; recognize a 2D gesture of the user corresponding to the sensed second EMI pattern based on the first database; if the 2D gesture of the user is not recognized, recognize a 3D gesture of the user corresponding to the sensed second EMI pattern based on the second database; and control the recognized external electronic device to execute a first function, which corresponds to the recognized 2D gesture of the user or the recognized 3D gesture of the user, from among the first functions executable by the recognized external electronic device. an electromagnetic interference, EMI, sensor configured to sense EMI patterns generated from at least one external electronic device and disposed at a location touchable by a body of a user of the electronic device; a memory configured to store a first database and a second database associated with at least a part of the EMI patterns, gestures of the user, and first functions executable by the at least one external electronic device and a third database associated with the at least one external electronic device, the first database including information associated with one or more two dimensional, 2D, gestures of the user and the second database including information associated with one or more three dimensional, 3D, gestures of the user; at least one processor electrically connected with the EMI sensor and the memory; and a display electrically connected with the at least one processor, wherein the at least one processor is configured to: sense a first EMI pattern, which is changed by the at least one external electronic device being in contact with the body of the user, from among the EMI patterns, using the EMI sensor; recognize an external electronic device being in contact with the body of the user from among the at least one external electronic device, based on the first EMI pattern and the third database; sense a second EMI pattern, which is changed according to a gesture among the gestures of the user, from among the EMI patterns, using the EMI sensor; recognize a 2D gesture of the user corresponding to the sensed second EMI pattern based on the first database; if the 2D gesture of the user is not recognized, recognize a 3D gesture of the user corresponding to the sensed second EMI pattern based on the second database; and control the recognized external electronic device to execute a first function, which corresponds to the recognized 2D gesture of the user or the recognized 3D gesture of the user, from among the first functions executable by the recognized external electronic device. sense a first EMI pattern, which is changed by the at least one external electronic device being in contact with the body of the user, from among the EMI patterns, using the EMI sensor; recognize an external electronic device being in contact with the body of the user from among the at least one external electronic device, based on the first EMI pattern and the third database; sense a second EMI pattern, which is changed according to a gesture among the gestures of the user, from among the EMI patterns, using the EMI sensor; recognize a 2D gesture of the user corresponding to the sensed second EMI pattern based on the first database; if the 2D gesture of the user is not recognized, recognize a 3D gesture of the user corresponding to the sensed second EMI pattern based on the second database; and control the recognized external electronic device to execute a first function, which corresponds to the recognized 2D gesture of the user or the recognized 3D gesture of the user, from among the first functions executable by the recognized external electronic device.