Hi Bob,
I'm curious how many services and characteristics you have since it's taking noticeable time. Please see comments inline below. Thanks, Joakim
On Feb 17, 2012, at 7:27 AM, Bob Frankel < email@hidden> wrote:
hi joakim,
i was already running with a 50ms connection interval.... at
20ms, the speed-up is barely noticeable.... i'll take a look
with packet sniffer to get a better idea of the timeline....
perhaps related, is the following paragraph in your bluetooth
design guidelines relevant???
The Bluetooth
accessory should implement the Service Changed characteristic
only if the accessory has the
ability to change its
services during its lifetime.
The Apple product may use the
Service Changed characteristic to determine if it can rely on
previously read
(cached) information from the
device. See the Bluetooth 4.0 specification, Volume 3, Part G,
Section 7.1.
is this for the case when the Service can change *during* a
connection -- in which case info would have to be
re-discovered???
It's actually both. Both between connections and during connections.
somewhat related, would a bonded relationship with the
peripheral help??? i know the BLE spec talks about use of
handles, etc in this context... more important, the BLE spec
talks about use of handles *across* connections....
A bonded relationship will currently not help.
bob.
On 2/17/2012 12:35 AM, Joakim Linde wrote:
Hi Bob,
You can speed up the service and characteristic discovery
process by decreasing the connection interval. The Peripheral ca
request a shorter connection interval (20 ms for instance)l to
speed up the process. After the process is complete, the
Peripheral switches to a longer connection interval to save
power.
Thanks,
Joakim
On Feb 10, 2012, at 2:03 PM, Bob Frankel wrote:
hi,
benchmarks reveal that i can connect to my BLE
peripheral in well under .5 secs (time from
connectPeripheral to didConnectPeripheral), but then
subsequent discovery of services and characteristics
takes over 4 secs.... in my case, i have *one* service;
and its takes over 2 secs to discover it (even if i
explicitly specifiy its UUID in discoverServices)....
my profile has 25 characteristics, which likewise take
over 2 secs to discover.... [i've found that the
discovery time is definitely proportional to the number
of characteristics in the profile; and we happen to have
lots of these]
is there any thing i can do accelerate this??? is it
possible to "persist" a peripheral, once i've discovered
its services/characteristics so i don't have to repeat
this step upon each (re-)connection??? the
user-experience suffers, despite that fact that BLE
connect is very fast indeed....
thanks,
bob.
|