Return-Path: MIME-Version: 1.0 In-Reply-To: References: <20120910235838.GA26986@samus> Date: Thu, 13 Sep 2012 16:18:15 -0400 Message-ID: Subject: Re: Dropping connection (bit off-topic) From: Anderson Lizardo To: John Tobias Cc: Vinicius Costa Gomes , linux-bluetooth@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi John, On Thu, Sep 13, 2012 at 4:11 PM, John Tobias wrote: > Hi Anderson, > > If I add a simple GATT/GAP server on gatttool, should I still use the > DBUS to listen or I can communicate directly to the kernel?. You either talk to bluetoothd (using D-Bus, like those test-* python scripts do), which will handle connections for you, or you talk directly to kernel using bluetooth socket (like gatttool does). You have more flexibility talking to the kernel directly, but your app will not be interoperable with other apps running at the same time, specially if they try to call connect() at the same time (one of them will get a EBUSY error). Using D-Bus, on the other hand, bluetoothd queues the connections properly. So you should use what is more appropriate for your use case. Best Regards, -- Anderson Lizardo Instituto Nokia de Tecnologia - INdT Manaus - Brazil