{"action":"closed","issue":{"url":"https://api.github.com/repos/Raizlabs/RZBluetooth/issues/42","repository_url":"https://api.github.com/repos/Raizlabs/RZBluetooth","labels_url":"https://api.github.com/repos/Raizlabs/RZBluetooth/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/Raizlabs/RZBluetooth/issues/42/comments","events_url":"https://api.github.com/repos/Raizlabs/RZBluetooth/issues/42/events","html_url":"https://github.com/Raizlabs/RZBluetooth/issues/42","id":195797604,"number":42,"title":"Should `enableNotify` continue to work after a peripheral reconnects?","user":{"login":"fabiorodella","id":1909604,"avatar_url":"https://avatars.githubusercontent.com/u/1909604?v=3","gravatar_id":"","url":"https://api.github.com/users/fabiorodella","html_url":"https://github.com/fabiorodella","followers_url":"https://api.github.com/users/fabiorodella/followers","following_url":"https://api.github.com/users/fabiorodella/following{/other_user}","gists_url":"https://api.github.com/users/fabiorodella/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiorodella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiorodella/subscriptions","organizations_url":"https://api.github.com/users/fabiorodella/orgs","repos_url":"https://api.github.com/users/fabiorodella/repos","events_url":"https://api.github.com/users/fabiorodella/events{/privacy}","received_events_url":"https://api.github.com/users/fabiorodella/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-15T12:50:05Z","updated_at":"2016-12-15T17:33:14Z","closed_at":"2016-12-15T17:33:14Z","body":"### Issue\r\nHere's my scenario:\r\n\r\n- have a peripheral UUID that was discovered previously\r\n- as soon as the app is launched, obtain a new `RZBPeripheral` instance from `RZBCentralManager` and enable `maintainConnection`\r\n- call `enableNotify` and observe that updated values are received correctly\r\n- power cycle the peripheral\r\n- updated values are no longer received\r\n\r\nI can work around this by setting a `connectionDelegate` and having it call `enableNotify` again once the connection succeeds, but should this be needed at all? From the docs I was expecting that the framework would handle this.\r\n\r\n### Bluetooth Logs\r\n```\r\n10:40:28.438 🔵DEBUG BluetoothController.init():55 - centralManagerDidUpdateState: - <CBCentralManager: 0x1720616c0>\r\n10:40:28.439 🔵DEBUG BluetoothController.init():55 - State=5\r\n10:40:28.439 🔵DEBUG BluetoothController.init():55 - connectPeripheral:89CF787A-F177-45F6-BE49-0F3DD92D7E20 options:(null)\r\n10:40:28.757 🔵DEBUG BluetoothController.init():55 - centralManager:didConnectPeripheral: - <CBCentralManager: 0x1720616c0> 89CF787A-F177-45F6-BE49-0F3DD92D7E20\r\n10:40:28.758 🔵DEBUG BluetoothController.init():55 - 89CF787A-F177-45F6-BE49-0F3DD92D7E20 discoverServices:@[181D]\r\n10:40:28.831 🔵DEBUG BluetoothController.init():55 - peripheral:didDiscoverServices: - 89CF787A-F177-45F6-BE49-0F3DD92D7E20 (null)\r\n10:40:28.831 🔵DEBUG BluetoothController.init():55 - Services=@[181D]\r\n10:40:28.832 🔵DEBUG BluetoothController.init():55 - 89CF787A-F177-45F6-BE49-0F3DD92D7E20 discoverCharacteristics:@[2A9D] forService:181D\r\n10:40:28.832 🔵DEBUG BluetoothController.init():55 - peripheral:didDiscoverCharacteristicsForService:error: - 89CF787A-F177-45F6-BE49-0F3DD92D7E20 181D (null)\r\n10:40:28.832 🔵DEBUG BluetoothController.init():55 - Characteristics=@[2A9D]\r\n10:40:28.833 🔵DEBUG BluetoothController.init():55 - 89CF787A-F177-45F6-BE49-0F3DD92D7E20 setNotifyValue:YES forCharacteristic:2A9D\r\n10:40:28.861 🔵DEBUG BluetoothController.init():55 - peripheral:didUpdateNotificationStateForCharacteristic:error: - 89CF787A-F177-45F6-BE49-0F3DD92D7E20 2A9D (null)\r\n10:40:28.862 🔵DEBUG BluetoothController.init():55 - Notify=YES\r\n10:40:40.758 🔵DEBUG BluetoothController.init():55 - peripheral:didUpdateValueForCharacteristic:error: - 89CF787A-F177-45F6-BE49-0F3DD92D7E20 2A9D (null)\r\n10:40:40.759 🔵DEBUG BluetoothController.init():55 - Value=<205050>\r\n10:40:45.509 🔵DEBUG BluetoothController.init():55 - centralManager:didDisconnectPeripheral:error: - <CBCentralManager: 0x1720616c0> 89CF787A-F177-45F6-BE49-0F3DD92D7E20 Error Domain=CBErrorDomain Code=7 \"The specified device has disconnected from us.\" UserInfo={NSLocalizedDescription=The specified device has disconnected from us.}\r\n10:40:45.512 🔵DEBUG BluetoothController.init():55 - connectPeripheral:89CF787A-F177-45F6-BE49-0F3DD92D7E20 options:(null)\r\n10:40:51.601 🔵DEBUG BluetoothController.init():55 - centralManager:didConnectPeripheral: - <CBCentralManager: 0x1720616c0> 89CF787A-F177-45F6-BE49-0F3DD92D7E20\r\n```"}}
{"actor":{"display_login":"KingOfBrian"}}