This study introduces a cognitive radio-enabled femtocell network aimed at improving indoor wireless communication performance by utilizing underused spectrum bands from primary users. By incorporating a double threshold energy detection algorithm, the network enhances detection efficiency while significantly reducing collision probabilities between cognitive and primary users. Overall, cognitive femtocells can achieve higher capacity and minimize co-channel interference compared to traditional methods.