Patent attributes
According to the embodiments of the present disclosure, a first terminal device may create a peer-to-peer (P2P) group, and then determine a Service Set Identifier (SSID) and a connection password of the P2P group, and then send the SSID and the connection password to a second terminal device so that the second terminal device is able to connect to the first terminal device according to the SSID and the connection password. In this way, prior to establishment of the wireless connection, the second terminal device may acquire the SSID and the connection password of the P2P group created by the first terminal device, thus second terminal device may directly use the SSID and the connection password to connect to the first terminal device without cumbersome discovery and negotiation processes as used in establishment of a conventional P2P connection.