polarofficial / polar-ble-sdk

Repository includes SDK and code examples. More info https://polar.com/en/developers
Other
447 stars 147 forks source link

Not receiving Polar device data when pairing with Oppo CPH2195 #406

Open jmdibble opened 8 months ago

jmdibble commented 8 months ago

Platform on which you observed the bug:

Device on which you observed the bug:

Describe the bug When connecting to an Oppo CPH2195 we don't receive any battery or HR data from the Polar device.

We see the following in the logs:

2023-10-10T09:11:34.909989Z V BFSSHI: bluetooth_foreground_service/connection. init called.
2023-10-10T09:11:34.910029Z V BFSSHI: bluetooth_foreground_service/battery. init called.
2023-10-10T09:11:34.910053Z V BFSSHI: bluetooth_foreground_service/synchronization. init called.
2023-10-10T09:11:34.910080Z V BFSSHI: bluetooth_foreground_service/version. init called.
2023-10-10T09:11:34.910137Z V BFSSHI: bluetooth_foreground_service/contact. init called.
2023-10-10T09:11:35.082257Z V BFSSHI: bluetooth_foreground_service/heart_rate. init called.
2023-10-10T09:11:35.082315Z V BFSSHI: bluetooth_foreground_service/connection. init called.
2023-10-10T09:11:35.082338Z V BFSSHI: bluetooth_foreground_service/battery. init called.
2023-10-10T09:11:35.082391Z V BFSSHI: bluetooth_foreground_service/synchronization. init called.
2023-10-10T09:11:35.082415Z V BFSSHI: bluetooth_foreground_service/version. init called.
2023-10-10T09:11:35.082438Z V BFSSHI: bluetooth_foreground_service/contact. init called.
2023-10-10T09:11:35.816852Z V BFSSHI: bluetooth_foreground_service/connection. onListen called.
2023-10-10T09:11:35.818387Z V BFSSHI: bluetooth_foreground_service/battery. onListen called.
2023-10-10T09:11:35.818646Z V BFSSHI: bluetooth_foreground_service/version. onListen called.
2023-10-10T09:11:35.818860Z V BFSSHI: bluetooth_foreground_service/contact. onListen called.
2023-10-10T09:11:35.821641Z V BFSSHI: bluetooth_foreground_service/synchronization. onListen called.
2023-10-10T09:11:36.506950Z BFSP: Restoring foreground service
2023-10-10T09:11:36.507201Z BFS: Attempting to restore background service.
2023-10-10T09:11:36.788366Z BFS: Restoring foreground service for C7AB9E23
2023-10-10T09:11:36.788577Z BFS: Starting background service for device id C7AB9E23
2023-10-10T09:11:36.810736Z V BFSP: Updating pacing notification preferences to {"exertion_threshold": 80, "over_exertion_threshold": 92, "over_exertion_threshold_alerts": true, "minute_before_over_exertion_threshold_alerts": 0 }
2023-10-10T09:11:36.810805Z V PNRP: Saving pacing preferences to cache. {"exertion_threshold": 80, "over_exertion_threshold": 92, "over_exertion_threshold_alerts": true, "minute_before_over_exertion_threshold_alerts": 0 }
2023-10-10T09:11:36.810950Z V PNRP: Saving pacing preferences finished.
2023-10-10T09:11:36.874182Z V BFSSHI: bluetooth_foreground_service/connection. onCancel called.
2023-10-10T09:11:36.874578Z V BFSSHI: bluetooth_foreground_service/battery. onCancel called.
2023-10-10T09:11:36.874763Z V BFSSHI: bluetooth_foreground_service/version. onCancel called.
2023-10-10T09:11:36.875014Z V BFSSHI: bluetooth_foreground_service/contact. onCancel called.
2023-10-10T09:11:36.875195Z V BFSSHI: bluetooth_foreground_service/synchronization. onCancel called.
2023-10-10T09:11:36.940907Z V BFSSHI: bluetooth_foreground_service/connection. onListen called.
2023-10-10T09:11:36.941046Z V BFSSHI: bluetooth_foreground_service/battery. onListen called.
2023-10-10T09:11:36.941157Z V BFSSHI: bluetooth_foreground_service/version. onListen called.
2023-10-10T09:11:36.941268Z V BFSSHI: bluetooth_foreground_service/contact. onListen called.
2023-10-10T09:11:36.944951Z V BFSSHI: bluetooth_foreground_service/synchronization. onListen called.
2023-10-10T09:11:37.002009Z BFSP: Restoring foreground service
2023-10-10T09:11:37.002186Z BFS: Attempting to restore background service.
2023-10-10T09:11:37.238916Z BFS: Restoring foreground service for C7AB9E23
2023-10-10T09:11:37.239130Z BFS: Starting background service for device id C7AB9E23
2023-10-10T09:11:37.266146Z V BFSP: Updating pacing notification preferences to {"exertion_threshold": 78, "over_exertion_threshold": 92, "over_exertion_threshold_alerts": true, "minute_before_over_exertion_threshold_alerts": 0 }
2023-10-10T09:11:37.266215Z V PNRP: Saving pacing preferences to cache. {"exertion_threshold": 78, "over_exertion_threshold": 92, "over_exertion_threshold_alerts": true, "minute_before_over_exertion_threshold_alerts": 0 }
2023-10-10T09:11:37.266278Z V PNRP: Saving pacing preferences finished.
2023-10-10T09:11:37.268338Z V BFS: Initialising.
2023-10-10T09:11:37.268566Z V BFS: onStartCommand called.
2023-10-10T09:11:37.268634Z BFS: Starting service for device C7AB9E23. Restored: true
2023-10-10T09:11:37.268810Z V NC: Creating notification channel PacingNotificationsReporter.
2023-10-10T09:11:37.269571Z V NC: Creating notification channel ConnectionStateNotificationsReporter.
2023-10-10T09:11:37.270279Z V NC: Creating notification channel BatteryLevelNotificationsReporter.
2023-10-10T09:11:37.271252Z V NC: Creating notification channel BluetoothForegroundServiceChannel.
2023-10-10T09:11:37.289652Z V PC: Initialising.
2023-10-10T09:11:37.289718Z V PC: Bluetooth enabled: false
2023-10-10T09:11:37.289768Z V PC: Setting heart rate listener
2023-10-10T09:11:37.289794Z V PC: Setting acc listener
2023-10-10T09:11:37.289816Z V PC: Setting device connection listener
2023-10-10T09:11:37.289837Z V PC: Setting device battery listener
2023-10-10T09:11:37.289908Z V BFS: Received device battery update {"value": -1, "timestamp": "1696929097289", "deviceId": "" }
2023-10-10T09:11:37.293626Z V BLNR: Battery level is -1, threshold is 30
2023-10-10T09:11:37.293752Z V PC: Device battery updated: {"value": -1, "timestamp": "1696929097289", "deviceId": "" }
2023-10-10T09:11:37.293831Z V PC: Setting device synchronization listener
2023-10-10T09:11:37.293898Z V PC: Setting device version listener
2023-10-10T09:11:37.294017Z V BFS: Received device version update {"deviceId": "", "softwareVersion": "" }
2023-10-10T09:11:37.294204Z V PC: Device version updated: {"deviceId": "", "softwareVersion": "" }
2023-10-10T09:11:37.294259Z V PC: Setting device contact listener
2023-10-10T09:11:37.294560Z V BFS: Received device contact update {"deviceId": "", "timestamp": "0" }
2023-10-10T09:11:37.294788Z V PC: Device contact updated: {"deviceId": "", "timestamp": "0" }
2023-10-10T09:11:37.294864Z PC: Connecting to device C7AB9E23.
2023-10-10T09:11:37.295378Z BFS: Received device connection update {"connectionStatus": 3, "deviceId": "C7AB9E23", "name": "Polar Sense C7AB9E23", "address": "", "isConnectable": null }
2023-10-10T09:11:37.295757Z CSNR: Clearing existing notification.
2023-10-10T09:11:37.296141Z V PC: Device connection updated: {"connectionStatus": 3, "deviceId": "C7AB9E23", "name": "Polar Sense C7AB9E23", "address": "", "isConnectable": null }
2023-10-10T09:11:37.297013Z V PolarSDK: BDScanCallback/commandState state:IDLE action: CLIENT_START_SCAN
2023-10-10T09:11:37.297095Z V PolarSDK: BDScanCallback/Skipped scan start, because of ble power off
2023-10-10T09:11:37.635091Z V BFS: onStartCommand called.
2023-10-10T09:11:37.635139Z BFS: Starting service for device C7AB9E23. Restored: true
2023-10-10T09:11:37.635256Z V NC: Creating notification channel PacingNotificationsReporter.
2023-10-10T09:11:37.636680Z V NC: Creating notification channel ConnectionStateNotificationsReporter.
2023-10-10T09:11:37.637378Z V NC: Creating notification channel BatteryLevelNotificationsReporter.
2023-10-10T09:11:37.638084Z V NC: Creating notification channel BluetoothForegroundServiceChannel.
2023-10-10T09:11:37.639817Z V PC: Setting heart rate listener
2023-10-10T09:11:37.639846Z V PC: Setting acc listener
2023-10-10T09:11:37.639864Z V PC: Setting device connection listener
2023-10-10T09:11:37.639902Z BFS: Received device connection update {"connectionStatus": 3, "deviceId": "C7AB9E23", "name": "Polar Sense C7AB9E23", "address": "", "isConnectable": null }
2023-10-10T09:11:37.640022Z CSNR: Clearing existing notification.
2023-10-10T09:11:37.640971Z V PC: Device connection updated: {"connectionStatus": 3, "deviceId": "C7AB9E23", "name": "Polar Sense C7AB9E23", "address": "", "isConnectable": null }
2023-10-10T09:11:37.641058Z V PC: Setting device battery listener
2023-10-10T09:11:37.641123Z V BFS: Received device battery update {"value": -1, "timestamp": "1696929097289", "deviceId": "" }
2023-10-10T09:11:37.641565Z V BLNR: Battery level is -1, threshold is 30
2023-10-10T09:11:37.641667Z V PC: 

I have noticed in release 5.4.0 that "Oppo" was added to your list of brandsNotImplementingAndroid13Api and wonder if there is a potential issue here?