OS/other apps' services being discovered in didDiscoverServices?
OS/other apps' services being discovered in didDiscoverServices?
- Subject: OS/other apps' services being discovered in didDiscoverServices?
- From: William Henderson <email@hidden>
- Date: Mon, 21 Jul 2014 13:40:49 -0700
On iOS 8 (including the latest iOS beta), I am occasionally seeing an odd behavior where I am seeing services from the OS and/or other apps being discovered in didDiscoverServices
in addition to my own app’s UUID. Stranger still, sometimes (usually right after my app has been woken up or relaunched) I temporarily see the other UUID’s but
not my own apps. Usually disconnecting and reconnecting (sometimes a couple times) will let me see them all.
This is problematic because (for various reasons I can get into if necessary), I need to call discoverServices on my central with nil – meaning scan for all services. I can’t scan just for my app’s UUID. To work around that, I keep track of peripherals that are advertising things I don’t care about and ‘reject’ them – meaning next time I see their device UUID I don’t bother connecting. But in this case I don’t know whether it’s a bogus device or I just haven’t waited long enough to see my app’s own service UUID. Only work around I’ve found is to attempt connecting/discovering several times before finally rejecting – gross.
Here are the other services I see:
(lldb) po [[[aPeripheral services] objectAtIndex:0] UUID]
Unknown (<d0611e78 bbb44591 a5f84879 10ae4366>)(lldb) po [[[aPeripheral services] objectAtIndex:1] UUID]
Unknown (<7905f431 b5ce4e99 a40f4b1e 122d00d0>)(lldb) po [[[aPeripheral services] objectAtIndex:2] UUID]
Battery(lldb) po [[[aPeripheral services] objectAtIndex:3] UUID]
Current Time(lldb) po [[[aPeripheral services] objectAtIndex:4] UUID]
Unknown (<89d3502b 0f36433a 8ef4c502 ad55f8dc>)(lldb) po [[[aPeripheral services] objectAtIndex:5] UUID]
Unknown ([my app’s UUID])
Thanks,
William Henderson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden