Scan for and lock public group codes