- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Running hello_sensor example on CYW20719 (CYBT_413034_EVAL)
On the other side Android 5.0 with CySmart and nRfConnect
Also attached logs from Tera Term
Description of the bug: Once BLE device is bonded and future attempts to reconnect fail until the bonding/ pairing info is deleted at the Android client.
Primary suspect: Cypress’s BLE stack / code. Could be a problem and from Android, but I tried with CC2540 keyfob and connects/disconnect many times without problem to the same clients (CySmart and nRfConnect) after bonded.
The log from CySmart is quite scanty:
…
[01-Jun-2019|14:35:17] , [Hello1|20:71:9B:19:3E:41] Connection request sent
[01-Jun-2019|14:35:18] , [Hello1|20:71:9B:19:3E:41] Connection established
[01-Jun-2019|14:35:18] , [Hello1|20:71:9B:19:3E:41] Disconnected
[01-Jun-2019|14:38:35] , [Hello1|20:71:9B:19:3E:41] Connection request sent
[01-Jun-2019|14:38:36] , [Hello1|20:71:9B:19:3E:41] Connection established
[01-Jun-2019|14:38:37] , [Hello1|20:71:9B:19:3E:41] Service discovery request sent
[01-Jun-2019|14:38:51] , [Hello1|20:71:9B:19:3E:41] Service discovery status - Failed with error code : 129
[01-Jun-2019|14:38:51] , [Hello1|20:71:9B:19:3E:41] Disconnected
[01-Jun-2019|14:39:20] , [Hello1|20:71:9B:19:3E:41] Connection request sent
[01-Jun-2019|14:39:22] , [Hello1|20:71:9B:19:3E:41] Connection established
[01-Jun-2019|14:39:22] , [Hello1|20:71:9B:19:3E:41] Disconnected
[01-Jun-2019|14:39:58] , [Hello1|20:71:9B:19:3E:41] Unable to pair. Check whether the device is advertising and supports pairing.
…
While when device is not paired/bonded or the pairing information is just cleared:
[01-Jun-2019|14:33:00] , [Hello1|20:71:9B:19:3E:41] Connection request sent
[01-Jun-2019|14:33:00] , [Hello1|20:71:9B:19:3E:41] Connection established
[01-Jun-2019|14:33:01] , [Hello1|20:71:9B:19:3E:41] Service discovery request sent
[01-Jun-2019|14:33:02] , [Hello1|20:71:9B:19:3E:41] Service discovery status – Success
…
Attached are and the logs from nRf Connect where there are quite more details:
V 13:16:41.081 Connecting to 20:71:9B:19:3E:41...
D 13:16:41.081 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE) (hidden)
D 13:16:41.975 [Server callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 13:16:41.975 [Server] Device with address 20:71:9B:19:3E:41 connected
D 13:16:42.009 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 13:16:42.009 Connected to 20:71:9B:19:3E:41
D 13:16:42.013 wait(1600ms)
D 13:16:42.031 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
D 13:16:42.215 [Server callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
I 13:16:42.215 [Server] Device disconnected
D 13:16:42.215 [Callback] Connection state changed with status: 61 and new state: DISCONNECTED (0)
E 13:16:42.240 Error 61 (0x3d): UNKNOWN (61)
I 13:16:42.240 Disconnected
D 13:16:42.272 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
vs. normal connection to not bonded/paired device:
V 13:34:31.891 Connecting to 20:71:9B:19:3E:41...
D 13:34:31.891 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE) (hidden)
D 13:34:32.309 [Server callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 13:34:32.309 [Server] Device with address 20:71:9B:19:3E:41 connected
D 13:34:32.318 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 13:34:32.318 Connected to 20:71:9B:19:3E:41
V 13:34:32.353 Discovering services...
D 13:34:32.353 gatt.discoverServices()
D 13:34:32.365 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
D 13:34:34.313 [Callback] Services discovered with status: 0
I 13:34:34.313 Services discovered
V 13:34:34.345 Generic Attribute (0x1801)