linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: "Łukasz Rymanowski" <lukasz.rymanowski@codecoup.pl>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>
Subject: Re: example GATT code to talk with a sensortag
Date: Mon, 18 Jan 2016 17:29:07 -0500	[thread overview]
Message-ID: <20160118222907.GA127976@redhat.com> (raw)
In-Reply-To: <CAExxLLBo+Aytnztc1BhMjExeThZiG_NDey1JQq37+eknsBv3HA@mail.gmail.com>

On Wed, Jan 13, 2016 at 10:44:02PM +0100, Łukasz Rymanowski wrote:
> Hi Don,
> > Did I miss a step or misunderstand your suggestion?
> 
> You got it well.
> To be more clear.
> If your bluetoothd runs with -E option and you connect to BLE device
> which expose any GATT services, after connect you should see new
> objects paths. Smth like this:
> 
> a) /org/bluez/hci0/dev_XXXXX/servicexxxx
> b) /org/bluez/hci0/dev_XXXXX/servicexxxx/charyyyy
> c) /org/bluez/hci0/dev_XXXXX/servicexxxx/charzzzz
> 
> etc.
> 
> Inside a) you should see GattService1 and inside b) and c) GattCharacteristic1
> 
> Just make sure -E is there and if still not work, provide btmon.log

Hi Łukasz,

Sorry to bother you again.  I am trying to turn what I learned from d-feet
into something for python.  I can get UUIDs from the GetAll() command, but
no GattService info.  I then noticed the device is not connected.  So I
tried connecting it using the Connect() command.  It keeps timing out.

There isn't much fomr btmon, but it looks useful so I attached it below.
Help?

I tried doing this under bluetootctl too and had some strange timeout
requests.  When I execute 'connect xx:xx:xx', it seems to connect, start
dumping info, then disconnects with an error/timeout.

Cheers,
Don

python snippet..

    service = bus.get_object(BLUEZ_SERVICE_NAME, "/org/bluez/hci0/dev_68_C9_0B_06_FA_8A")
    service.Connect(dbus_interface="org.bluez.Device1")
    service_props = service.GetAll("org.bluez.Device1", dbus_interface=DBUS_PROP_IFACE)


btmon output


< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 [hci0] 374.345329
        Type: Passive (0x00)
        Interval: 60.000 msec (0x0060)
        Window: 30.000 msec (0x0030)
        Own address type: Public (0x00)
        Filter policy: Ignore not in white list (0x01)
> HCI Event: Command Complete (0x0e) plen 4  [hci0] 374.346096
      LE Set Scan Parameters (0x08|0x000b) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 [hci0] 374.346190
        Scanning: Enabled (0x01)
        Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4  [hci0] 374.347102
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 [hci0] 414.345224
        Scanning: Disabled (0x00)
        Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4  [hci0] 414.347154
      LE Set Scan Enable (0x08|0x000c) ncmd 1
        Status: Success (0x00)

python failure message:


Did not receive a reply. Possible causes include: the remote application did
not send a reply, the message bus security policy blocked the reply, the
reply timeout expired, or the network connection was broken.



      parent reply	other threads:[~2016-01-18 22:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 22:26 example GATT code to talk with a sensortag Don Zickus
2016-01-09  8:08 ` Barry Byford
2016-01-10 22:13 ` Luiz Augusto von Dentz
2016-01-11 14:57   ` Don Zickus
2016-01-11 18:45     ` Bastien Nocera
2016-01-11 19:58       ` Don Zickus
2016-04-01 20:21       ` Don Zickus
2016-01-11 18:14   ` Don Zickus
2016-01-11 18:43     ` Luiz Augusto von Dentz
2016-01-11 19:57       ` Don Zickus
2016-01-11 22:22       ` Don Zickus
2016-01-12 21:52         ` Łukasz Rymanowski
2016-01-13 15:06           ` Don Zickus
2016-01-13 21:44             ` Łukasz Rymanowski
2016-01-14 22:03               ` Don Zickus
2016-01-15 19:06               ` Don Zickus
2016-01-18 22:29               ` Don Zickus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160118222907.GA127976@redhat.com \
    --to=dzickus@redhat.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=lukasz.rymanowski@codecoup.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).