Estimote / Android-Fleet-Management-SDK

Estimote Fleet Management SDK for Android
https://developer.estimote.com
MIT License
836 stars 451 forks source link

BulkUpdater: Timeout while connecting to beacon #279

Closed trietlam closed 6 years ago

trietlam commented 6 years ago

Prerequisites

Basic information

Estimote SDK version: [Paste here the SDK version that you are using (like 1.4.1)] 1.4.1

Android devices affected: [Paste here your Android device model/models that you are having problems with.] Galaxy Tab A6 7.0''

Android OS version affected: [Android OS version (ex. Oreo 8.0.0)] 5.1.1

Beacon hardware version: [Paste here your beacons hardware version (you can check that in Estimote Cloud).] G1.12

Description

Steps to reproduce: I just run sample code from BulkUpdater example

Expected behavior: Beacon settings is updated successfully

Actual behavior: Beacon settings was not updated and app throws error

Logs and code

Here's the log when I set EstimoteSDK.enableDebugLogging(true)

02-26 10:43:09.066 6511-6511/com.estimote.bulkupdater I/EstimoteSDK: BeaconService.onCreate:79 Creating beacon service for android version 22
02-26 10:43:09.146 6511-6511/com.estimote.bulkupdater D/EstimoteSDK: BulkUpdaterUpdateModule$2.onConnectedToService:83 Connected to connection provider service.
02-26 10:43:09.186 6511-6530/com.estimote.bulkupdater D/EstimoteSDK: BeaconService.setForegroundScanPeriod:151 Setting foreground scan period: ScanPeriodData{scanPeriodMillis=2000, waitTimeMillis=2000}
02-26 10:43:13.330 6511-6511/com.estimote.bulkupdater D/EstimoteSDK: BulkUpdaterCloudModule.filterDevicesToUpdate:225 Device xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx has new pending settings in cloud.
02-26 10:43:13.330 6511-6511/com.estimote.bulkupdater D/EstimoteSDK: EstimoteBulkUpdater$1.onAllOwnedDevices:121 Fetched info about 1 owned devices.
02-26 10:43:13.330 6511-6511/com.estimote.bulkupdater D/EstimoteSDK: EstimoteBulkUpdater$1.onFilteredDevicesToUpdate:127 Got owned devices to update: 1
02-26 10:43:13.340 6511-6511/com.estimote.bulkupdater D/EstimoteSDK: BulkUpdaterUpdateModule.updateDevices:55 Updating device [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
02-26 10:43:13.410 6511-6511/com.estimote.bulkupdater D/EstimoteSDK: DeviceConnectionInternal.changeState:193 Changing internal connection state from DISCONNECTED to CONNECTING
02-26 10:43:13.410 6511-6511/com.estimote.bulkupdater D/EstimoteSDK: FullConnectionStrategy.connect:40 Verifying device
02-26 10:43:13.660 6511-6511/com.estimote.bulkupdater D/EstimoteSDK: BasicConnectionStrategy.connect:50 Connecting to bluetooth device
02-26 10:43:13.660 6511-6511/com.estimote.bulkupdater D/EstimoteSDK: BlueRock.connectInternal:155 Trying to connect to GATT
02-26 10:43:33.910 6511-6525/com.estimote.bulkupdater D/EstimoteSDK: BlueRock$2.onConnectionStateChange:172 Trying GATT error recovery
02-26 10:43:33.910 6511-6525/com.estimote.bulkupdater D/EstimoteSDK: RecoveryHelper.startRecovery:90 Trying BT recovery
02-26 10:43:40.957 6511-6511/com.estimote.bulkupdater D/EstimoteSDK: RecoveryHelper.onRecoveryFinished:58 BT Recovery finished.
02-26 10:43:40.967 6511-6511/com.estimote.bulkupdater D/EstimoteSDK: BlueRock.connectInternal:155 Trying to connect to GATT
02-26 10:43:45.932 6511-6525/com.estimote.bulkupdater D/EstimoteSDK: BlueRock$2.onConnectionStateChange:172 Trying GATT error recovery
02-26 10:43:45.932 6511-6525/com.estimote.bulkupdater D/EstimoteSDK: RecoveryHelper.startRecovery:90 Trying BT recovery
02-26 10:43:47.944 6511-6511/com.estimote.bulkupdater D/EstimoteSDK: RecoveryHelper.onRecoveryFinished:58 BT Recovery finished.
02-26 10:43:47.954 6511-6511/com.estimote.bulkupdater D/EstimoteSDK: BlueRock.connectInternal:155 Trying to connect to GATT
02-26 10:43:53.669 6511-6511/com.estimote.bulkupdater E/EstimoteSDK: DeviceConnectionInternal$1.onError:260 Timeout while connecting to beacon
02-26 10:43:53.669 6511-6511/com.estimote.bulkupdater D/EstimoteSDK: DeviceConnectionInternal.changeState:193 Changing internal connection state from CONNECTING to DISCONNECTED
Poberro commented 6 years ago

It seems that is infamous GATT error 133. Have you tried restarting Bluetooth/phone? It usually helps. Some devices have it more frequently than others. It is generally problem with Android BLE stack.

Poberro commented 6 years ago

No response from author. Closing.