Electronic apparatus and control method thereof
Provided is an electronic apparatus configured to operate a communication interface in an access point (AP) mode, based on first AP information, and based on at least one external device being communicatively connected during operation of the communication interface in the AP mode, transmit, through the communication interface, second AP information different from the first AP information to the at least one external device.
1 . An electronic apparatus comprising:
a communication interface;
a memory storing at least one instruction; and
one or more processors operatively connected to the communication interface and the memory, and configured to execute the at least one instruction to:
control the communication interface to operate in an access point (AP) mode, based on first AP information, and
based on at least one external device being communicatively connected during operation of the communication interface in the AP mode, control the communication interface to transmit second AP information different from the first AP information to the at least one external device.
2 . The electronic apparatus of claim 1 , wherein the one or more processors are further configured to execute the at least one instruction to:
control the communication interface to terminate the AP mode, based on a preset event,
wherein the preset event comprises at least one of an event in which a preset time has elapsed after operating in the AP mode, an event in which a preset time has elapsed after transmitting the second AP information to the at least one external device, an event in which the second AP information is transmitted to each device in a target device list, or an event in which an end request of the AP mode is identified.
3 . The electronic apparatus of claim 2 , wherein the target device list is a list stored in the memory.
4 . The electronic apparatus of claim 2 , wherein the one or more processors further are configured to execute the at least one instruction to:
based on a communication connection based on the first AP information being released, obtain the second AP information from a user terminal through a Wi-Fi communication by executing SoftAP function, and obtain the target device list through the Wi-Fi communication; or
obtain the target device list from the user terminal through a communication method different from the Wi-Fi communication.
5 . The electronic apparatus of claim 4 , wherein the one or more processors are further configured to execute the at least one instruction to:
control the communication interface to transmit, to the user terminal, a request signal requesting whether to transmit the second AP information to the at least one external device; and
receive from the user terminal, through the communication interface, the target device list as a response to the request signal.
6 . The electronic apparatus of claim 2 , wherein the one or more processors are further configured to execute the at least one instruction to:
communicate with a server, through the communication interface, via the AP device, based on the second AP information, to obtain the target device list from the server.
7 . The electronic apparatus of claim 2 , wherein the one or more processors are further configured to execute the at least one instruction to:
based on identifying a device not receiving the second AP information, from among the devices included in the target device list, after transmitting the second AP information to the at least one external device and the AP device ends, control the communication interface to communicate with the AP device based on the second AP information and control the communication interface to transmit the information about the identified device to the server.
8 . The electronic apparatus of claim 2 , further comprising:
a display;
wherein the one or more processors are further configured to execute the at least one instruction to:
after the AP mode is terminated, control the display to display a user interface comprising a device which is not connected by Wi-Fi communication, from among the devices included in the target device list, based on the second AP information.
9 . The electronic apparatus of claim 1 , wherein the one or more processors are further configured to execute the at least one instruction to:
based on a communication connection based on the first AP information being released, obtain the second AP information;
control the communication interface to perform communication with an AP device based on the second AP information; and
control the communication interface to operate in the AP mode, based on the first AP information.
10 . The electronic apparatus of claim 1 , wherein the one or more processors are further configured to execute the at least one instruction:
control the communication interface to operate in the AP mode, based on the first AP information and a preset event;
wherein the preset event comprises at least one of an event in which a communication connection based on the first AP information is identified as being released, or an event in which a user command for operating in an AP mode is identified based on the first AP information.
11 . The electronic apparatus of claim 1 , wherein the one or more processors are further configured to execute the at least one instruction to:
control the communication interface to operate in the AP mode based on a preset event;
wherein the preset event comprises at least one of an event in which a communication connection based on the first AP information is released in the at least one external device, or an event in which a user command to operate in the AP mode is identified based on the first AP information.
12 . A method of controlling an electronic apparatus, the method comprising:
operating a communication interface of the electronic apparatus in an access point (AP) mode based on first AP information; and
based on at least one external device being communicatively connected during operation of the communication interface in the AP mode, transmitting second AP information different from the first AP information to the at least one external device.
13 . The method of claim 12 , further comprising:
terminating the AP mode based on a preset event,
wherein the preset event comprises at least one of an event in which a preset time has elapsed after operating in the AP mode, an event in which a preset time has elapsed after transmitting the second AP information to the at least one external device, an event in which the second AP information is transmitted to each device in a target device list, or an event in which an end request of the AP mode is identified.
14 . The method of claim 13 , further comprising:
based on the first AP information being released, obtaining the second AP information from a user terminal through a Wi-Fi communication by executing SoftAP function; and
obtaining the target device list through the Wi-Fi communication.
15 . The method of claim 14 , further comprising:
transmitting a request signal to the user terminal, the request signal requesting whether to transmit the second AP information to the at least one external device; and
receiving from the user terminal the target device list based on the request signal.
16 . The method of claim 13 , further comprising:
obtaining the target device list from a user terminal through a communication method different from a Wi-Fi communication.
17 . The method of claim 12 , wherein the operating the communication interface of the electronic apparatus in the AP mode comprises:
based on a communication connection based on the first AP information being released, obtaining the second AP information;
communicating with an AP device based on the second AP information; and
operating the communication interface in the AP mode based on the first AP information.
18 . The method of claim 17 , further comprising:
communicating with a server, via the AP device, based on the second AP information, to obtain the target device list from the server.
19 . The method of claim 17 , further comprising:
based on identifying a device not receiving the second AP information, from among the devices included in the target device list, after transmitting the second AP information to the at least one external device and the AP device ends, communicating with the AP device based on the second AP information, to transmit the information about the identified device, through the communication interface, to the server.
20 . A non-transitory computer readable medium for storing computer readable program code or instructions which are executable by a processor to perform a method of controlling an electronic apparatus, the method comprising:
operating a communication interface of the electronic apparatus in an access point (AP) mode based on first AP information; and
based on at least one external device being communicatively connected during operation of the communication interface in the AP mode, transmitting second AP information different from the first AP information to the at least one external device.