{"action":"created","issue":{"url":"https://api.github.com/repos/randdusing/cordova-plugin-bluetoothle/issues/448","repository_url":"https://api.github.com/repos/randdusing/cordova-plugin-bluetoothle","labels_url":"https://api.github.com/repos/randdusing/cordova-plugin-bluetoothle/issues/448/labels{/name}","comments_url":"https://api.github.com/repos/randdusing/cordova-plugin-bluetoothle/issues/448/comments","events_url":"https://api.github.com/repos/randdusing/cordova-plugin-bluetoothle/issues/448/events","html_url":"https://github.com/randdusing/cordova-plugin-bluetoothle/issues/448","id":245059542,"number":448,"title":"Subscribe callbacks not executed when subscribing to a protected characteristic - Android","user":{"login":"acutetech","id":6894822,"avatar_url":"https://avatars1.githubusercontent.com/u/6894822?v=4","gravatar_id":"","url":"https://api.github.com/users/acutetech","html_url":"https://github.com/acutetech","followers_url":"https://api.github.com/users/acutetech/followers","following_url":"https://api.github.com/users/acutetech/following{/other_user}","gists_url":"https://api.github.com/users/acutetech/gists{/gist_id}","starred_url":"https://api.github.com/users/acutetech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acutetech/subscriptions","organizations_url":"https://api.github.com/users/acutetech/orgs","repos_url":"https://api.github.com/users/acutetech/repos","events_url":"https://api.github.com/users/acutetech/events{/privacy}","received_events_url":"https://api.github.com/users/acutetech/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-07-24T12:09:41Z","updated_at":"2017-07-31T09:48:21Z","closed_at":null,"body":"I attempt to subscribe to notifications from a characteristic that has protection, while unbonded, I see this:\r\n(a) The phone and peripheral execute a bonding operation. As I understand it, this is expected: the link is not encrypted until attempting to access a protected resource.\r\n(b) Neither of the .subscribe() callbacks (subscribeSuccess, subscribeError) are executed. \r\n\r\nI would expect the subscribeError call should be executed.\r\n\r\nThe next time I attempt the subscribe it works (the onSuccess callback executes), because the right level of encryption is in place.\r\n\r\nIn contrast, when attempting to read a protected characteristic, the phone and peripheral also perform a bonding operation, but the .read() call returns an error \"Unable to read on return\".\r\n"},"comment":{"url":"https://api.github.com/repos/randdusing/cordova-plugin-bluetoothle/issues/comments/319020799","html_url":"https://github.com/randdusing/cordova-plugin-bluetoothle/issues/448#issuecomment-319020799","issue_url":"https://api.github.com/repos/randdusing/cordova-plugin-bluetoothle/issues/448","id":319020799,"user":{"login":"acutetech","id":6894822,"avatar_url":"https://avatars1.githubusercontent.com/u/6894822?v=4","gravatar_id":"","url":"https://api.github.com/users/acutetech","html_url":"https://github.com/acutetech","followers_url":"https://api.github.com/users/acutetech/followers","following_url":"https://api.github.com/users/acutetech/following{/other_user}","gists_url":"https://api.github.com/users/acutetech/gists{/gist_id}","starred_url":"https://api.github.com/users/acutetech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acutetech/subscriptions","organizations_url":"https://api.github.com/users/acutetech/orgs","repos_url":"https://api.github.com/users/acutetech/repos","events_url":"https://api.github.com/users/acutetech/events{/privacy}","received_events_url":"https://api.github.com/users/acutetech/received_events","type":"User","site_admin":false},"created_at":"2017-07-31T09:48:21Z","updated_at":"2017-07-31T09:48:21Z","body":"I do indeed use this workaround: call isbonded() and if unbonded, call bond(), before accessing the protected resources. So there is a simple workaround. I was just pointing out the anomaly - perhaps either to be fixed or to be documented. "}}
{"actor":{"display_login":"acutetech"}}