Refactored and confirmed the bluetooth connection to be working