fiexed some bugs about BLE scanning and connection