Bluetooth devices can be paired using patterns. A pattern can be used to ensure that the correct Bluetooth device is being paired. A pattern may also be used to provide security to the pairing process by encrypting the key exchange with keys generated from the pattern. In some implementations, the pattern to be used can be generated based on the device class.