A method for controlling a second device, the method being performed by a first device and comprising: receiving information which relates to the second device from the second device based on a first short distance communication, the information including application information for identifying an application to be executed and connection information for establishing a second short distance communication between the first device and the second device; establishing the second short distance communication between the second device and the first device based on the connection information; based on receiving the information, searching for the application corresponding to the application information; and based on the application corresponding to the application information being installed on the first device: based on the second short distance communication, sending a control signal for controlling the second device to perform operations related to the application corresponding to the application information, wherein the second device operates hardware thereof based on the control signal, and based on the application corresponding to the application information being not installed on the first device; downloading the application from a server; and based on the second short distance communication, sending a control signal for controlling the second device to perform the operations related to the application corresponding to the application information, wherein the second device operates hardware thereof based on the control signal. receiving information which relates to the second device from the second device based on a first short distance communication, the information including application information for identifying an application to be executed and connection information for establishing a second short distance communication between the first device and the second device; establishing the second short distance communication between the second device and the first device based on the connection information; based on receiving the information, searching for the application corresponding to the application information; and based on the application corresponding to the application information being installed on the first device: based on the second short distance communication, sending a control signal for controlling the second device to perform operations related to the application corresponding to the application information, wherein the second device operates hardware thereof based on the control signal, and based on the application corresponding to the application information being not installed on the first device; downloading the application from a server; and based on the second short distance communication, sending a control signal for controlling the second device to perform the operations related to the application corresponding to the application information, wherein the second device operates hardware thereof based on the control signal. based on the second short distance communication, sending a control signal for controlling the second device to perform operations related to the application corresponding to the application information, wherein the second device operates hardware thereof based on the control signal, and based on the application corresponding to the application information being not installed on the first device; downloading the application from a server; and based on the second short distance communication, sending a control signal for controlling the second device to perform the operations related to the application corresponding to the application information, wherein the second device operates hardware thereof based on the control signal.