clearly, searching for it first
in the array would help.... but as craig replied in an earlier
response, apparently there is no way to just discover *one*
characteristic in practice; as he tells it, *all* of the
characteristics are in fact discovered, though the retained list
may be filtered....
bottom line -- when you need just *one* characteristic (and its
hasn't yet been discovered), you will effectively be discovering
all of them at that moment if i understand what craig was
saying....
On 11/18/2011 1:06 PM, Joakim Linde wrote:
Hi Bob,
There are advantages to not explicitly discover the
characteristics which you don't immediately need. You can also
speed up the discovery process by reducing the connection
interval from the Peripheral.
All the characteristics which have been discovered during a
connection is available in characteristics property. It might be
faster, given that you already have discovered the
characteristic, to just search for it in the array. Or, as you
mentioned, maintain your own directory.
Although, Bluetooth LE allows, and the Apple implementation
supports, having large number of characteristics it does lead to
some issues. As with all design, it is all about making the
right trade-offs after considering the various options. In some
cases, it might make sense to reduce the number of
characteristics, either by consolidating or using a different
design. I'm sure you will reach a balanced design after working
though the issues.
Regards,
Joakim
On Nov 18, 2011, at 10:11 AM, Bob Frankel wrote:
i have a profile with a large number of
characteristics in some service (say, 100).... clearly,
asking to discover all of these characteristics at once
takes some time (several seconds)....
is there an advantage being lazy about characteristic
discovery??? that is to say, only request discovery of
a *particular* characteristics when/if the need to
read/write it comes along....
from what i can see, however, the service "remembers"
all previously discovered characteristics.... worse
case, i can search this list first; or perhaps i can
maintain my own dictionary...
bob.
_______________________________________________
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
|