Patent ID: 8595807

Claim:
A method for adding a new device to a Wireless Fidelity (Wi-Fi) Device to Device (D2D) network, comprising: receiving, by a first D2D client device, a first add request message forwarded by a D2D master device, wherein the first add request message carries an identifier of the new device; receiving, by the first D2D client device, a first Personal Identification Number (PIN) code of the new device; and forwarding, by the first D2D client device, the received first PIN code of the new device to the D2D master device, wherein the first PIN code of the new device is used for implementing that the D2D master device performs Wi-Fi Protected Setup (WPS) security configuration of the new device according to the first PIN code, receiving, by a second D2D client device, a second add request message forwarded by the D2D master device, wherein the second add request message carries the identifier of the new device and an indicator, and the indicator is configured to indicate that the second add request message is requesting enhancement of a security level; receiving a second PIN code of the new device, wherein the second PIN code is different from the first PIN code; and forwarding, by the second D2D client device, the received second PIN code to the D2D master device, wherein the D2D master device performs the WPS security configuration of the new device according to the first PIN code and the second PIN code of the new device, wherein the performing the WPS security configuration of the new device according to the first PIN code and the second PIN code of the new device comprises: generating, by the new device, a digital sequence by using the first PIN code and the second PIN code according to a preset algorithm; generating, by the D2D master device, the digital sequence by using the preset algorithm; and performing, by the D2D master device and the new device, the WPS security configuration based on the generated digital sequence.