Communication systems and methods
Systems and methods for establishing communication between a terminal and a device are disclosed. According to certain embodiments, a method used in the device includes receiving a plurality of multicast packets from the terminal. The method also includes determining, according to the multicast packets, wireless connection information of a wireless network. The method further includes connecting to the wireless network according to the wireless connection information. The method further includes generating a notification indicating a password associated with the device.
1. A method for establishing communication between a device and a terminal, comprising:
receiving a plurality of multicast packets from the terminal;
determining, according to the multicast packets, wireless connection information of a wireless network;
connecting to the wireless network according to the wireless connection information; and
generating a notification indicating a password associated with the device.
2. The method according to claim 1 , wherein receiving the multicast packets from the terminal comprises:
scanning a plurality of multicast channels;
receiving, on one or more of the multicast channels, one or more first multicast packets from the terminal;
determining, according to the one or more first multicast packets, an identification of the terminal; and
if the identification of the terminal matches a predetermined identification, locking the one or more multicast channels.
3. The method according to claim 2 , further comprising:
determining, according to the one or more first multicast packets, a length of a wireless password associated with the wireless network.
4. The method according to claim 3 , further comprising:
receiving, on the one or more locked multicast channels, one or more second multicast packets from the terminal, each second multicast packet comprising a serial number and at least a part of the wireless password corresponding to the serial number;
determining, according to the length of the wireless password and the serial numbers in the received second multicast packets, whether to receive additional second multicast packets; and
if no additional second multicast packets need to be received, determining the wireless password according to the received second multicast packets.
5. The method according to claim 2 , wherein scanning the multicast channels further comprises:
if the multicast channels have different usage frequencies, first scanning multicast channels with usage frequencies that are above a predetermined frequency.
6. A device for communication with a terminal, comprising:
a memory storing instructions; and
a processor configured to execute the instructions to:
receive a plurality of multicast packets from the terminal;
determine, according to the multicast packets, wireless connection information of a wireless network;
connect to the wireless network according to the wireless connection information; and
generate a notification indicating a password associated with the device.
7. The device according to claim 6 , wherein the processor is further configured to execute the instructions to:
scan a plurality of multicast channels;
receive, on one or more of the multicast channels, one or more first multicast packets from the terminal;
determine, according to the received first multicast packets, an identification of the terminal; and
if the identification of the terminal matches a predetermined identification, lock the one or more multicast channels.
8. The device according to claim 7 , wherein the processor is further configured to execute the instructions to:
determine, according to the received first multicast packets, a length of a wireless password associated with the wireless network.
9. The device according to claim 8 , wherein the processor is further configured to execute the instructions to:
receive, on the one or more locked multicast channels, one or more second multicast packets from the terminal, each second multicast packet comprising a serial number and at least a part of the wireless password corresponding to the serial number;
determine, according to the length of the wireless password and the serial numbers in the received second multicast packets, whether to receive additional second multicast packets; and
if no additional second multicast packets need to be received, determine the wireless password according to the second multicast packets.
10. The device according to claim 7 , wherein the processor is further configured to execute the instructions to:
if the multicast channels have different usage frequencies, first scan multicast channels with usage frequencies that are above a predetermined frequency.
11. A non-transitory computer-readable storage medium storing instructions for establishing communication between a device and a terminal, the instructions causing a processor to perform operations comprising:
receiving a plurality of multicast packets from the terminal;
determining, according to the multicast packets, wireless connection information of a wireless network;
connecting to the wireless network according to the wireless connection information; and
generating a notification indicating a password associated with the device.
12. The non-transitory computer-readable storage medium of claim 11 , wherein receiving the multicast packets from the terminal comprises:
scanning a plurality of multicast channels;
receiving, on one or more of the multicast channels, one or more first multicast packets from the terminal;
determining, according to the one or more first multicast packets, an identification of the terminal; and
if the identification of the terminal matches a predetermined identification, locking the one or more multicast channels.
13. The non-transitory computer-readable storage medium of claim 12 , wherein the operations further comprise:
determining, according to the received first multicast packets, a length of a wireless password associated with the wireless network.
14. The non-transitory computer-readable storage medium of claim 13 , wherein the operations further comprise;
receiving, on the one or more locked multicast channels, one or more second multicast packets from the terminal, each second multicast packet comprising a serial number and at least a part of the wireless password corresponding to the serial number;
determining, according to the length of the wireless password and the serial numbers in the received second multicast packets, whether to receive additional second multicast packets; and
if no additional second multicast packets need to be received, determining the wireless password according to the received second multicast packets.
15. The non-transitory computer-readable storage medium of claim 12 , wherein scanning the multicast channels further comprises:
if the multicast channels have different usage frequencies, first scanning multicast channels with usage frequencies that are above a predetermined frequency.