Return-Path: MIME-Version: 1.0 In-Reply-To: References: <78b536a7d359e37bf8a147079a114b78.squirrel@www.codeaurora.org> Date: Thu, 30 Jun 2011 15:03:47 -0400 Message-ID: Subject: Re: Generic Attribute API race condition From: Anderson Lizardo To: Claudio Takahasi Cc: ingas@codeaurora.org, linux-bluetooth@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi, On Thu, Jun 30, 2011 at 2:48 PM, Claudio Takahasi wrote: > On Wed, Jun 29, 2011 at 8:50 PM, ? wrote: >> I ran into a similar problem. Cannot we just delay the return of >> DiscoverCharacteristics method call until after the characteristic >> values/properties have been acquired? I tried out this solution and it >> seems to work fine. The trick is to implement internal counter for >> received responses from the remote device + timeout that is reset on each >> successful response. Any thoughts on this? > > IMO delay the return of DiscoverCharacteristics method is the most > simple solution. What about the D-Bus timeout (small) versus GATT timeout (30 seconds) ? We should avoid getting those "org.freedesktop.DBus.Error.NoReply: Did not receive a reply." errors. Regards, -- Anderson Lizardo Instituto Nokia de Tecnologia - INdT Manaus - Brazil