linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Belau <pbelau1@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: Problems reading characteristics with Bluez 5.52
Date: Thu, 2 Jan 2020 19:57:58 -0600	[thread overview]
Message-ID: <CAAERL8SK8rHhhGFN95+gWZF-2K4vozRcmZkA5aU9Fwx3a58+7w@mail.gmail.com> (raw)
In-Reply-To: <CABBYNZLe=ZmiPXg8mrU2BxY9H0hv_WvkvigyJBAs_wnq5ct_Cg@mail.gmail.com>

Thank you very much for the response;  I did not realize that
'indicate' was exclusive to doing an attribute read. However, "notify
on" doesn't seem to help. The device disconnects after a read and now
I can no longer connect to it at all:

QardioARM:/service0400/char0410]# notify on
Notify started
[CHG] Device 5C:D6:1F:0E:0A:7D ServicesResolved: no
[CHG] Device 5C:D6:1F:0E:0A:7D Connected: no

[bluetooth]#  connect 5C:D6:1F:0E:0A:7D


Attempting to connect to 5C:D6:1F:0E:0A:7D
Failed to connect: org.bluez.Error.Failed


On the bluetoothd side I'm seeing:

bluetoothd[20426]: src/agent.c:agent_disconnect() Agent :1.626 disconnected
bluetoothd[20426]: src/agent.c:remove_default_agent() Default agent cleared
bluetoothd[20426]: src/adapter.c:set_mode() sending set mode command for index 0
bluetoothd[20426]: src/agent.c:agent_destroy() agent :1.626
bluetoothd[20426]: src/agent.c:agent_unref() 0x55e718787df0: ref=0
bluetoothd[20426]: src/adapter.c:new_settings_callback() Settings: 0x00000a01
bluetoothd[20426]: src/adapter.c:settings_changed() Changed settings: 0x00000010
bluetoothd[20426]: src/adapter.c:settings_changed() Pending settings: 0x00000000
bluetoothd[20426]: src/agent.c:add_default_agent() Default agent set
to :1.627 /org/bluez/agent
bluetoothd[20426]: src/adapter.c:set_mode() sending set mode command for index 0
bluetoothd[20426]: src/agent.c:agent_ref() 0x55e7187b7a00: ref=1
bluetoothd[20426]: src/agent.c:register_agent() agent :1.627
bluetoothd[20426]: src/adapter.c:new_settings_callback() Settings: 0x00000a11
bluetoothd[20426]: src/adapter.c:settings_changed() Changed settings: 0x00000010
bluetoothd[20426]: src/adapter.c:settings_changed() Pending settings: 0x00000000
bluetoothd[20426]: src/device.c:att_connect_cb() connect error:
Connection refused (111)

I should note that I've tried a number of BTLE blood pressure devices
with a variety of BT controllers and Bluez cannot seem to maintain
reliable connections with any of the configurations I've tried. Any
help would be much appreciated.

On Thu, Jan 2, 2020 at 7:30 PM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> Hi Peter,
>
> On Thu, Jan 2, 2020 at 5:22 PM Peter Belau <pbelau1@gmail.com> wrote:
> >
> > I'm trying to get a Qardio ARM BP monitor working with Linux/Bluez but
> > cannot seem to read any device characteristics with Bluez. My
> > interaction through bluetoothctl looks like this:
> >
> > # menu gatt
> > # attribute-info  00002a35-0000-1000-8000-00805f9b34fb
> > Characteristic - Blood Pressure Measurement
> >     UUID: 00002a35-0000-1000-8000-00805f9b34fb
> >     Service: /org/bluez/hci0/dev_B0_49_5F_02_B5_61/service0400
> >     Value:
> >   16 7f 00 49 00 5b 00 00 00 00 00 00 00 00 35 00  ...I.[........5.
> >   00 00                                            ..
> >     Notifying: no
> >     Flags: indicate
> > # select-attribute 00002a35-0000-1000-8000-00805f9b34fb
> > # read
> > # Attempting to read /org/bluez/hci0/dev_B0_49_5F_02_B5_61/service0400/char0410
> > Failed to read: org.bluez.Error.Failed
> >
> > I have bluetoothd running with debug flags but nothing appears in the
> > debug logs. What am I doing wrong?
>
> Look at the flags, it only has indicate so it doesn't support reading directly.
>
> --
> Luiz Augusto von Dentz

  reply	other threads:[~2020-01-03  1:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-03  1:20 Problems reading characteristics with Bluez 5.52 Peter Belau
2020-01-03  1:30 ` Luiz Augusto von Dentz
2020-01-03  1:57   ` Peter Belau [this message]
2020-01-03  2:03     ` Luiz Augusto von Dentz
2020-01-03  2:10       ` Peter Belau
2020-01-03  2:19         ` Luiz Augusto von Dentz
2020-01-03  2:29           ` Peter Belau
2020-01-03  2:39             ` Luiz Augusto von Dentz
2020-01-03  2:47               ` Peter Belau
2020-01-03  4:04                 ` Peter Belau

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=CAAERL8SK8rHhhGFN95+gWZF-2K4vozRcmZkA5aU9Fwx3a58+7w@mail.gmail.com \
    --to=pbelau1@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    /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).