Return-Path: MIME-Version: 1.0 In-Reply-To: References: <1319497579-8859-1-git-send-email-pkrystad@codeaurora.org> <4EA6143E.4000606@googlemail.com> <7769C83744F2C34A841232EF77AEA20C01DCAA8D28@dnce01.ent.ti.com> <7769C83744F2C34A841232EF77AEA20C01DCAA8F85@dnce01.ent.ti.com> Date: Wed, 11 Jan 2012 11:57:31 -0300 Message-ID: Subject: Re: GATT Dbus API on BlueZ From: Claudio Takahasi To: Vijaykumar Dadmode Cc: "Ganir, Chen" , "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Vijay, On Wed, Jan 11, 2012 at 11:25 AM, Vijaykumar Dadmode wrote: > > Hi, > >> You are disabling all the GATT plugins, so my suggestion is: open the >> ATT L2CAP socket directly in your JNI bindings. Using this approach >> you will have all the control that you need. > >> We track the users/clients based on the D-Bus connection, if the >> client(dbus-send or any other) leaves the bus the core will disconnect >> link if watcher list is empty. > >> BR, >> Claudio. > > If we are using plugins, considering the case, the device sends disconnect request if there is no activity on the device. On GATT Client we get GATT Disconnect (attio_disconnect). Then once there is some activity on device then it will start sending a ADV_DIREC_IND. The plan is to get the disconnection reason through the socket(getsockopt SO_ERROR). I suppose that you are talking about HoG(HID over GATT). Indeed, background LE scanning(in the kernel) needs to be active if the service requires automatic reconnection. If we detect power consumption problems one additional command can be added in the management interface. Basically, the idea is to control LE scanning and connections automatically in the kernel based on inputs provided by the userspace: keys, socket(connection requested). > > How do we handle this case? As we have to again CONNECT/DISCOVER ? Services/plugins need to keep the ATTIO callback registered only. Scanning and connections should be handled automatically by the bluetoothd core and kernel. BR, Claudio