{"action":"created","issue":{"url":"https://api.github.com/repos/Polidea/RxBluetoothKit/issues/81","repository_url":"https://api.github.com/repos/Polidea/RxBluetoothKit","labels_url":"https://api.github.com/repos/Polidea/RxBluetoothKit/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/Polidea/RxBluetoothKit/issues/81/comments","events_url":"https://api.github.com/repos/Polidea/RxBluetoothKit/issues/81/events","html_url":"https://github.com/Polidea/RxBluetoothKit/issues/81","id":192027870,"number":81,"title":"Support for multiple service instances with same UUID","user":{"login":"abeintopalo","id":7497004,"avatar_url":"https://avatars.githubusercontent.com/u/7497004?v=3","gravatar_id":"","url":"https://api.github.com/users/abeintopalo","html_url":"https://github.com/abeintopalo","followers_url":"https://api.github.com/users/abeintopalo/followers","following_url":"https://api.github.com/users/abeintopalo/following{/other_user}","gists_url":"https://api.github.com/users/abeintopalo/gists{/gist_id}","starred_url":"https://api.github.com/users/abeintopalo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abeintopalo/subscriptions","organizations_url":"https://api.github.com/users/abeintopalo/orgs","repos_url":"https://api.github.com/users/abeintopalo/repos","events_url":"https://api.github.com/users/abeintopalo/events{/privacy}","received_events_url":"https://api.github.com/users/abeintopalo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/Polidea/RxBluetoothKit/milestones/5","html_url":"https://github.com/Polidea/RxBluetoothKit/milestones/4.0.0","labels_url":"https://api.github.com/repos/Polidea/RxBluetoothKit/milestones/5/labels","id":2006015,"number":5,"title":"4.0.0","description":"API redesign to more Rx version","creator":{"login":"Kacper20","id":6010341,"avatar_url":"https://avatars.githubusercontent.com/u/6010341?v=3","gravatar_id":"","url":"https://api.github.com/users/Kacper20","html_url":"https://github.com/Kacper20","followers_url":"https://api.github.com/users/Kacper20/followers","following_url":"https://api.github.com/users/Kacper20/following{/other_user}","gists_url":"https://api.github.com/users/Kacper20/gists{/gist_id}","starred_url":"https://api.github.com/users/Kacper20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kacper20/subscriptions","organizations_url":"https://api.github.com/users/Kacper20/orgs","repos_url":"https://api.github.com/users/Kacper20/repos","events_url":"https://api.github.com/users/Kacper20/events{/privacy}","received_events_url":"https://api.github.com/users/Kacper20/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":1,"state":"open","created_at":"2016-09-15T07:13:40Z","updated_at":"2016-11-29T20:07:37Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-11-28T15:01:53Z","updated_at":"2016-11-30T19:50:26Z","closed_at":null,"body":"Hello,\r\n\r\nFirst of all I'd like to thank you for your great work to make this awesome library.\r\nI really like the API and it is a pleasure to work with. :)\r\n\r\nI have a use case when the peripheral has multiple instances of a BLE service (i.e. multiple service instances with same UUID).\r\nEach service instance have the same set of characteristics.\r\n\r\nI have tried the following code to test if RxBluetoothKit can handle this scenario.\r\nThe code below supposed to read the value of the same characteristic for each service instances:\r\n\r\n```\r\nperipheral.connect()\r\n    .flatMap { $0.discoverServices([serviceId]) }\r\n    .flatMap { Observable.from($0) }\r\n    .flatMap { $0.discoverCharacteristics([characteristicId])}\r\n    .flatMap { Observable.from($0) }\r\n    .flatMap { $0.readValue() }\r\n    .subscribe(onNext: { characteristic in\r\n        guard let data = characteristic.value else { return }\r\n        let dataString = NSString(data: data, encoding: String.Encoding.utf8.rawValue)!\r\n        print(\"Value: \\(dataString)\")\r\n    })\r\n```\r\n\r\nUnfortunately, the code above prints the characteristic value only for the first service instance.\r\nThe value printing code is invoked as many times as many instances of the same service has been discovered but\r\nit seems that the characteristic passed to \"subscriber(onNext:)\" will be connected only to the first discovered service instance.\r\n\r\nI would like to ask if you know any way to get this working when there are multiple service instances with same UUID?\r\nAny help is appreciated."},"comment":{"url":"https://api.github.com/repos/Polidea/RxBluetoothKit/issues/comments/263975932","html_url":"https://github.com/Polidea/RxBluetoothKit/issues/81#issuecomment-263975932","issue_url":"https://api.github.com/repos/Polidea/RxBluetoothKit/issues/81","id":263975932,"user":{"login":"Kacper20","id":6010341,"avatar_url":"https://avatars.githubusercontent.com/u/6010341?v=3","gravatar_id":"","url":"https://api.github.com/users/Kacper20","html_url":"https://github.com/Kacper20","followers_url":"https://api.github.com/users/Kacper20/followers","following_url":"https://api.github.com/users/Kacper20/following{/other_user}","gists_url":"https://api.github.com/users/Kacper20/gists{/gist_id}","starred_url":"https://api.github.com/users/Kacper20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kacper20/subscriptions","organizations_url":"https://api.github.com/users/Kacper20/orgs","repos_url":"https://api.github.com/users/Kacper20/repos","events_url":"https://api.github.com/users/Kacper20/events{/privacy}","received_events_url":"https://api.github.com/users/Kacper20/received_events","type":"User","site_admin":false},"created_at":"2016-11-30T19:50:26Z","updated_at":"2016-11-30T19:50:26Z","body":"Hi @abeintopalo,\r\n\r\nOf course. I haven't mentioned it explicitely but we have this in mind - it should work in exact the same way for characteristics. \r\n\r\nIt's great that you posted specifics about your use case.\r\nWe will setup mock device that works in similar way and will test implementation on this.\r\nBefore the release I will probably ask you to get lib from branch and test this for us aswell on real device. :)\r\n\r\nRegarding dates - we have the scope of 4.0 ready and basic planning behind us so now we're jumping right to the implementation. You could expect it in coming weeks. Don't want to make promises right now because of the coming christmas.\r\n Will surely update you with more specific date in a couple of days when we'll have some major architectural changes behind us :)\r\n\r\nThank you for feedback\r\nKacper,"}}
{"actor":{"display_login":"Kacper20"}}