Re: Problems reading characteristics with Bluez 5.52

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't have any trouble getting reads off the device with the
supplied Android app. As I mentioned these connection troubles seem to
be ubiquitous with BlueZ. This particular device initiates a read
through an Android app, so it seems logical that I would need to send
it something in order to initiate a read, although I'm not entirely
sure how I would figure out what that something is. I've tried to do
reads off of push-button devices but those appear to be even more
reliable (at least this device connects somewhat reliably -- the
others crap out even earlier).

On Thu, Jan 2, 2020 at 8:20 PM Luiz Augusto von Dentz
<luiz.dentz@xxxxxxxxx> wrote:
>
> Hi Peter,
>
> On Thu, Jan 2, 2020 at 6:10 PM Peter Belau <pbelau1@xxxxxxxxx> wrote:
> >
> > hci trace doesn't give me much of anything although I'd be happy to
> > attach the trace. Which 'spec' should I check here?
>
> https://www.bluetooth.org/docman/handlers/DownloadDoc.ashx?doc_id=243126
>
> It doesn't look like there is anything required to subscribe but
> perhaps it is disconnecting because there is no measurement in
> progress or you have to set the time via CTS.
>
> > On Thu, Jan 2, 2020 at 8:04 PM Luiz Augusto von Dentz
> > <luiz.dentz@xxxxxxxxx> wrote:
> > >
> > > Hi Peter,
> > >
> > > On Thu, Jan 2, 2020 at 5:58 PM Peter Belau <pbelau1@xxxxxxxxx> wrote:
> > > >
> > > > 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.
> > >
> > > HCI trace would probably help here, you can collect it using btmon.
> > > Have you check the spec if there are other steps before subscribing?
> > >
> > > > On Thu, Jan 2, 2020 at 7:30 PM Luiz Augusto von Dentz
> > > > <luiz.dentz@xxxxxxxxx> wrote:
> > > > >
> > > > > Hi Peter,
> > > > >
> > > > > On Thu, Jan 2, 2020 at 5:22 PM Peter Belau <pbelau1@xxxxxxxxx> 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
> > >
> > >
> > >
> > > --
> > > Luiz Augusto von Dentz
>
>
>
> --
> Luiz Augusto von Dentz



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux