Electronic device for changing device and method for operating the same
A method of operating an IoT device comprising receiving a device change request from an IoT server. The method includes releasing a connection between an Internet-of-things (IoT) device and a first device based on receiving the device change request, switching an operation of the IoT device to a pairing mode to establish a wireless communication link, based on the releasing of the connection between the IoT device and the first device. The method includes establishing a wireless communication link between the IoT device and a second device while the IoT device is in the pairing mode. The method includes identifying whether the second device is associated with the device change request, and receiving information about an access point (AP) connecting the second device and the IoT server from the second device based on the second device being identified as being associated with the device change request.
1 . A method of operating an Internet-of-things (IoT) device, the method comprising:
receiving a device change request from an IoT server;
based on the receiving of the device change request, releasing a connection between the IoT device and a first device;
based on the releasing of the connection between the IoT device and the first device, switching an operation of the IoT device to a pairing mode to establish a wireless communication link;
establishing a wireless communication link between the IoT device and a second device while the IoT device is in the pairing mode;
identifying whether the second device is associated with the device change request; and
receiving information about an access point (AP) connecting the second device and the IoT server from the second device based on the second device being identified as being associated with the device change request.
2 . The method of claim 1 , wherein the device change request includes information about the second device, and
wherein the information about the second device includes identification information about the second device and information about an account of a user of the second device.
3 . The method of claim 2 , further comprising disconnecting the IoT server and the IoT device based on the switching of the operation of the IoT device to the pairing mode.
4 . The method of claim 3 , further comprising deleting information about the first device that is stored in the IoT device based on the switching of the operation of the IoT device to the pairing mode.
5 . The method of claim 3 , further comprising periodically transmitting an advertising packet to at least one adjacent device based on the switching of the operation of the IoT device to the pairing mode.
6 . The method of claim 1 , further comprising:
receiving a Bluetooth connection request from the second device; and
transmitting a Bluetooth connection acknowledgment (ACK) to the second device.
7 . The method of claim 6 , wherein the identifying of whether the second device is associated with the device change request is based on information about the second device included in the Bluetooth connection request received from the second device and information about the second device included in the device change request.
8 . An Internet of Things (IoT) device, comprising:
a memory;
a communication unit;
at least one processor electrically connectable to the memory and the communication unit, wherein the at least one processor is configured to:
receive a device change request from an IoT server;
disconnect a connection between an IoT device and a first device based on the receiving of the device change request;
switch an operation of the IoT device to a pairing mode to establish a wireless communication link based on the disconnection of the connection between the IoT device and the first device;
establish a wireless communication link between the IoT device and a second device while the IoT device is in the pairing mode;
identify whether the second device is associated with the device change request; and
receive information about an access point (AP) connecting the second device and the IoT server from the second device based on the second device being identified as being associated with the device change request.
9 . The electronic device of claim 8 , wherein the device change request includes information about the second device, and
wherein the information about the second device includes identification information about the second device and information about an account of a user of the second device.
10 . The electronic device of claim 9 , wherein the at least one processor is configured to disconnect the IoT server and the IoT device based on the switching of the operation of the IoT device to the pairing mode.
11 . The electronic device of claim 10 , wherein the at least one processor is configured to delete information about the first device stored in the electronic device based on the switching of the operation of the IoT device to the pairing mode.
12 . The electronic device of claim 10 , wherein the at least one processor is configured to periodically transmit an advertising packet to at least one adjacent device based on the switching of the operation of the IoT device to the pairing mode.
13 . The electronic device of claim 8 , wherein the at least one processor is configured to:
receive a Bluetooth connection request from the second device; and
transmit a Bluetooth connection acknowledgment (ACK) to the second device.
14 . The electronic device of claim 13 , wherein the at least one processor is configured to identify whether the second device is associated with the device change request based on information about the second device included in the Bluetooth connection request received from the second device and information about the second device included in the device change request.