Return-Path: Date: Mon, 11 Jan 2016 14:57:21 -0500 From: Don Zickus To: Luiz Augusto von Dentz Cc: "linux-bluetooth@vger.kernel.org" Subject: Re: example GATT code to talk with a sensortag Message-ID: <20160111195721.GB152924@redhat.com> References: <20160108222608.GU152924@redhat.com> <20160111181454.GZ152924@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: linux-bluetooth-owner@vger.kernel.org List-ID: On Mon, Jan 11, 2016 at 03:43:40PM -0300, Luiz Augusto von Dentz wrote: > Hi Don, > > On Mon, Jan 11, 2016 at 3:14 PM, Don Zickus wrote: > > On Sun, Jan 10, 2016 at 07:13:56PM -0300, Luiz Augusto von Dentz wrote: > >> Hi Don, > >> > >> On Fri, Jan 8, 2016 at 7:26 PM, Don Zickus wrote: > >> > Hi, > >> > > >> > Sorry for the newbie question. I stumbled upon a TI sensortag and was able > >> > to communicate with it using the gatttool. Now I am trying to figure out > >> > how to build an app around that. Googling has shown me lots of examples of > >> > folks using expect scripts (around the gatttool). > >> > > >> > I was hoping for something in C or python. Is there an example > >> > program/script around that I can copy and expand to get me started? > >> > > >> > Thanks! > >> > > >> > Cheers, > >> > Don > >> > >> bluetoothctl has some generic support for GATT attributes, in addition > >> we have some examples in python under test/example-gatt-client and > >> test/example-gatt-server. > > > > Hi Luiz, > > > > Hmm, the example program complains about no such interface 'org.bluez.GattService1'. > > > > Originally I thought that was a generic bluez interface but now I am > > wondering if that was specific to the example program. > > > > Any tip on what the expected interface should be (so I know what to add)? > > > > (by the way, I am using bluez-5.36 if that helps) > > > You will need to pass -E to bluetoothd to enable the experimental > intefaces, btw there is a recent change to GATT server/peripheral so I > suggest you try with the current version on git. Hi Luiz, Thanks for the tip! I will play with that and see how far I get. Cheers, Don