Method and device for controlling access

The present invention discloses a method and a device for controlling access, and belongs to the wireless communication field. The method comprises: when a user requests to access into a wireless local area network, detecting if a low density parity check LDPC coding and decoding method is adopted for communication between the wireless local area network and a router; when the LDPC coding and decoding method is adopted for communication between the wireless local area network and the router, establishing connection with the router; and notifying the router to broadcast information of the wireless local area network in a non-LDPC coding and decoding method, the information of the wireless local area network being used for allowing a smart device to access into the wireless local area network through the router. The device comprises a detection module, a connection module and a notifying module. With adoption of the method and the device, the smart device without any LDPC coding capability can access into the wireless local area network through the router, avoiding occurrence of access failures caused when the smart device receives broadcast messages with an LDPC coding method and thus cannot recognize the broadcast messages.