Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bonding Fails and Device is not discoverable if Pairing dialog does not appear twice #117

Open
ghost opened this issue Jun 13, 2022 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented Jun 13, 2022

Devices: Samsung A52S

Hi I got a strange case trying to bonding a device. When I select a device from scanner, a Pairing dialog appears. When dialog appears twice, I got the device paired and I can see it in Bluetooth Settings as Bonded. But when the Pairing dialogs appears only once, I receive data but the device disappears from Settings and also from Scan. If I want that device appears again I have to reset the NDK.
I attach a video demo in which you can see that the device AIHBAND (which is the name of the NDK) disappears and I can connect again when the pairing dialog appears just once.

Also you can find the logs here:

2022-06-13 13:21:22.591 19346-19346/no.nordicsemi.android.nrftoolbox I/BluetoothAdapter: STATE_ON
2022-06-13 13:21:22.591 19346-19346/no.nordicsemi.android.nrftoolbox D/BluetoothLeScanner: Start Scan with callback
2022-06-13 13:21:22.593 19346-19361/no.nordicsemi.android.nrftoolbox D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=14 mScannerId=0
2022-06-13 13:21:23.141 19346-19357/no.nordicsemi.android.nrftoolbox D/InputTransport: Input channel destroyed: 'ClientS', fd=108
2022-06-13 13:21:24.249 19346-19346/no.nordicsemi.android.nrftoolbox E/Internal: Register bonding broadcast receiver
2022-06-13 13:21:24.252 19346-19346/no.nordicsemi.android.nrftoolbox V/nRF Toolbox: Connecting...
2022-06-13 13:21:24.253 19346-19346/no.nordicsemi.android.nrftoolbox D/nRF Toolbox: gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, LE 1M)
2022-06-13 13:21:24.253 19346-19346/no.nordicsemi.android.nrftoolbox I/BluetoothAdapter: STATE_ON
2022-06-13 13:21:24.255 19346-19346/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: connect() - device: C0:DE:26:EF:B9:28, auto: false
2022-06-13 13:21:24.255 19346-19346/no.nordicsemi.android.nrftoolbox I/BluetoothAdapter: isSecureModeEnabled
2022-06-13 13:21:24.255 19346-19346/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: registerApp()
2022-06-13 13:21:24.255 19346-19346/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: registerApp() - UUID=966daff2-30b0-45a9-82d2-103aafac5a46
2022-06-13 13:21:24.258 19346-19361/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: onClientRegistered() - status=0 clientIf=15
2022-06-13 13:21:24.286 19346-19346/no.nordicsemi.android.nrftoolbox D/BLE-CONNECTION: onDeviceConnecting()
2022-06-13 13:21:24.311 19346-19361/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: onTimeSync() - eventCount=0 offset=1
2022-06-13 13:21:24.316 19346-19361/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=15 device=C0:DE:26:EF:B9:28
2022-06-13 13:21:24.325 19346-19346/no.nordicsemi.android.nrftoolbox D/nRF Toolbox: [Callback] Connection state changed with status: 0 and new state: 2 (CONNECTED)
2022-06-13 13:21:24.326 19346-19346/no.nordicsemi.android.nrftoolbox I/nRF Toolbox: Connected to C0:DE:26:EF:B9:28
2022-06-13 13:21:24.328 19346-19346/no.nordicsemi.android.nrftoolbox D/nRF Toolbox: wait(300)
2022-06-13 13:21:24.328 19346-19346/no.nordicsemi.android.nrftoolbox D/BLE-CONNECTION: onDeviceConnected()
2022-06-13 13:21:24.576 19346-19346/no.nordicsemi.android.nrftoolbox I/BluetoothAdapter: STATE_ON
2022-06-13 13:21:24.576 19346-19346/no.nordicsemi.android.nrftoolbox D/BluetoothLeScanner: Stop Scan with callback
2022-06-13 13:21:24.629 19346-19346/no.nordicsemi.android.nrftoolbox V/nRF Toolbox: Discovering services...
2022-06-13 13:21:24.630 19346-19346/no.nordicsemi.android.nrftoolbox D/nRF Toolbox: gatt.discoverServices()
2022-06-13 13:21:24.630 19346-19346/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: discoverServices() - device: C0:DE:26:EF:B9:28
2022-06-13 13:21:24.757 19346-19400/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: onConnectionUpdated() - Device=C0:DE:26:EF:B9:28 interval=6 latency=0 timeout=500 status=0
2022-06-13 13:21:24.759 19346-19346/no.nordicsemi.android.nrftoolbox I/nRF Toolbox: Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
2022-06-13 13:21:24.827 19346-19346/no.nordicsemi.android.nrftoolbox D/nRF Toolbox: [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BOND_BONDING (11)
2022-06-13 13:21:24.889 19346-19346/no.nordicsemi.android.nrftoolbox D/nRF Toolbox: [Broadcast] Action received: android.bluetooth.device.action.PAIRING_REQUEST, pairing variant: PAIRING_VARIANT_CONSENT (3); key: -1
2022-06-13 13:21:25.025 19346-19400/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: onPhyUpdate() - status=0 address=C0:DE:26:EF:B9:28 txPhy=2 rxPhy=2
2022-06-13 13:21:25.029 19346-19346/no.nordicsemi.android.nrftoolbox I/nRF Toolbox: PHY updated (TX: LE 2M, RX: LE 2M)
2022-06-13 13:21:25.532 19346-19400/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: onSearchComplete() = Device=C0:DE:26:EF:B9:28 Status=0
2022-06-13 13:21:25.533 19346-19346/no.nordicsemi.android.nrftoolbox I/nRF Toolbox: Services discovered
2022-06-13 13:21:25.534 19346-19346/no.nordicsemi.android.nrftoolbox V/nRF Toolbox: Primary service found
2022-06-13 13:21:25.535 19346-19346/no.nordicsemi.android.nrftoolbox D/nRF Toolbox: gatt.setCharacteristicNotification(00002a1c-0000-1000-8000-00805f9b34fb, true)
2022-06-13 13:21:25.535 19346-19346/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: setCharacteristicNotification() - uuid: 00002a1c-0000-1000-8000-00805f9b34fb enable: true
2022-06-13 13:21:25.537 19346-19346/no.nordicsemi.android.nrftoolbox V/nRF Toolbox: Enabling indications for 00002a1c-0000-1000-8000-00805f9b34fb
2022-06-13 13:21:25.537 19346-19346/no.nordicsemi.android.nrftoolbox D/nRF Toolbox: gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x02-00)
2022-06-13 13:21:25.552 19346-19346/no.nordicsemi.android.nrftoolbox I/nRF Toolbox: Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 02-00
2022-06-13 13:21:25.552 19346-19346/no.nordicsemi.android.nrftoolbox I/nRF Toolbox: Indications enabled
2022-06-13 13:21:25.553 19346-19346/no.nordicsemi.android.nrftoolbox D/nRF Toolbox: gatt.setCharacteristicNotification(00002a19-0000-1000-8000-00805f9b34fb, true)
2022-06-13 13:21:25.553 19346-19346/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: setCharacteristicNotification() - uuid: 00002a19-0000-1000-8000-00805f9b34fb enable: true
2022-06-13 13:21:25.555 19346-19346/no.nordicsemi.android.nrftoolbox V/nRF Toolbox: Enabling notifications for 00002a19-0000-1000-8000-00805f9b34fb
2022-06-13 13:21:25.555 19346-19346/no.nordicsemi.android.nrftoolbox D/nRF Toolbox: gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
2022-06-13 13:21:25.574 19346-19346/no.nordicsemi.android.nrftoolbox I/nRF Toolbox: Data written to descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 01-00
2022-06-13 13:21:25.575 19346-19346/no.nordicsemi.android.nrftoolbox I/nRF Toolbox: Notifications enabled
2022-06-13 13:21:25.575 19346-19346/no.nordicsemi.android.nrftoolbox D/BLE-CONNECTION: onDeviceReady()
2022-06-13 13:21:25.626 19346-19361/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: onConnectionUpdated() - Device=C0:DE:26:EF:B9:28 interval=24 latency=0 timeout=500 status=0
2022-06-13 13:21:25.627 19346-19346/no.nordicsemi.android.nrftoolbox I/nRF Toolbox: Connection parameters updated (interval: 30.0ms, latency: 0, timeout: 5000ms)
2022-06-13 13:21:25.900 19346-19346/no.nordicsemi.android.nrftoolbox I/nRF Toolbox: Indication received from 00002a1c-0000-1000-8000-00805f9b34fb, value: (0x) 06-5F-0E-00-FE-E6-07-01-0C-17-00-00-04
2022-06-13 13:21:26.412 19346-19346/no.nordicsemi.android.nrftoolbox I/nRF Toolbox: Indication received from 00002a1c-0000-1000-8000-00805f9b34fb, value: (0x) 06-5F-0E-00-FE-E6-07-01-0C-17-00-00-04
2022-06-13 13:21:26.775 19346-19346/no.nordicsemi.android.nrftoolbox I/DecorView: notifyKeepScreenOnChanged: keepScreenOn=false
2022-06-13 13:21:26.776 19346-19655/no.nordicsemi.android.nrftoolbox V/FA: Activity resumed, time: 258558746
2022-06-13 13:21:26.781 19346-19346/no.nordicsemi.android.nrftoolbox I/ViewRootImpl@3667ae5[MainActivity]: Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) req=(1080,2400)0 dur=4 res=0x1 s={true -5476376637857056960} ch=false fn=430
2022-06-13 13:21:26.820 19346-19346/no.nordicsemi.android.nrftoolbox D/nRF Toolbox: [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BOND_NONE (10)
2022-06-13 13:21:26.823 19346-19346/no.nordicsemi.android.nrftoolbox W/nRF Toolbox: Bonding failed
2022-06-13 13:21:26.888 19346-19346/no.nordicsemi.android.nrftoolbox I/nRF Toolbox: Indication received from 00002a1c-0000-1000-8000-00805f9b34fb, value: (0x) 06-5F-0E-00-FE-E6-07-01-0C-17-00-00-04

Video:
https://user-images.githubusercontent.com/59198102/173342726-8b48ea34-5753-45b2-bce9-3361c1c5adcd.mov

@philips77
Copy link
Member

We also encounter double pairing popups. I don't understand the root cause. A far as I know, some method is called twice on the firmware side causing this issue, but I don't know which one. Please, ask on https://devzone.nordicsemi.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant