2015-07-29 23:22:45

by Mark Rages

[permalink] [raw]
Subject: bluetoothctl list-attributes command

I solved my previous problem with list-attributes, but now I face another one.

I am trying to interact with the heart rate monitor strap
'CB:D7:A0:40:C4:01' using bluetoothctl:

$ bluetoothctl
[NEW] Controller 00:02:72:C8:B1:AD qountdown [default]
[NEW] Device CB:D7:A0:40:C4:01 mar
[NEW] Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023 Vendor
specific (Primary)
[NEW] Characteristic
/org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0026 Vendor
specific
[NEW] Characteristic
/org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0024 Vendor
specific
[NEW] Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012
Battery Service (Primary)
[NEW] Characteristic
/org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013 Battery
Level
[NEW] Descriptor
/org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013/desc0015
Client Characteristic Configuration
[bluetooth]# connect CB:D7:A0:40:C4:01
Attempting to connect to CB:D7:A0:40:C4:01
Connection successful
[mar]# list-attributes
Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023 Vendor
specific (Primary)
Characteristic /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0026
Vendor specific
Characteristic /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0024
Vendor specific
Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012 Battery
Service (Primary)
Characteristic /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013
Battery Level
Descriptor /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013/desc0015
Client Characteristic Configuration
[mar]#

So only two services are listed.

But according to the Nordic Semiconductor "Master Control Panel" app,
this device offers six services:

Generic Access (0x1800)
Generic Attribute (0x1801)
Heart Rate (0x180d)
Battery (0x180f)
Device Information (0x180a)
Unknown (0x4001-ceed)

list-attributes only lists the Battery and 0x4001 services.

Why is list-attributes only showing two services? How can I connect
to the Heart Rate (0x180d) service?

--
Regards,
Mark
markrages@gmail


2015-07-29 23:08:01

by Mark Rages

[permalink] [raw]
Subject: Re: bluetoothctl list-attributes command

On Thu, Jul 23, 2015 at 1:27 PM, Luiz Augusto von Dentz
<[email protected]> wrote:
>
> Take the log then, bluetoothd and HCI using btmon should show us what
> is happening.
>

I solved my problem.

I was not starting bluetoothd with the -E (experimental) option.

Once I did that, I could list attributes after connecting.

--
Regards,
Mark
markrages@gmail

2015-07-23 19:27:42

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: bluetoothctl list-attributes command

Hi Mark,

On Thu, Jul 23, 2015 at 9:57 PM, Mark Rages <[email protected]> wrote:
> On Thu, Jul 23, 2015 at 2:11 AM, Luiz Augusto von Dentz
> <[email protected]> wrote:
>
>>> [DfuTarg]# list-attributes
>>> (hangs forever)
>>
>> Does it hangs or just doesn't print anything?
>>
>
> Doesn't print anything. The prompt is still "live".
>
>>
>> I suspect something else is going on, perhaps bluetoothd could not
>> find any attributes or maybe it is connected over classic?
>
> It is the nRF51822 firmware update example, so I'm sure it's not
> connected over classic.

Take the log then, bluetoothd and HCI using btmon should show us what
is happening.


--
Luiz Augusto von Dentz

2015-07-23 18:57:47

by Mark Rages

[permalink] [raw]
Subject: Re: bluetoothctl list-attributes command

On Thu, Jul 23, 2015 at 2:11 AM, Luiz Augusto von Dentz
<[email protected]> wrote:

>> [DfuTarg]# list-attributes
>> (hangs forever)
>
> Does it hangs or just doesn't print anything?
>

Doesn't print anything. The prompt is still "live".

>
> I suspect something else is going on, perhaps bluetoothd could not
> find any attributes or maybe it is connected over classic?

It is the nRF51822 firmware update example, so I'm sure it's not
connected over classic.

--
Regards,
Mark
markrages@gmail

2015-07-23 08:11:15

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: bluetoothctl list-attributes command

Hi Mark,

On Thu, Jul 23, 2015 at 2:20 AM, Mark Rages <[email protected]> wrote:
> Hi,
>
> I am trying to interact with a low-energy device using bluetoothctl:
>
> $ bluetoothctl
> [NEW] Controller 00:02:72:C8:B1:AD qountdown-0 [default]
> [NEW] Device F1:4A:78:BD:9C:9F DfuTarg
> [bluetooth]# connect F1:4A:78:BD:9C:9F
> Attempting to connect to F1:4A:78:BD:9C:9F
> [CHG] Device F1:4A:78:BD:9C:9F Connected: yes
> Connection successful
> [DfuTarg]# info
> Device F1:4A:78:BD:9C:9F
> Name: DfuTarg
> Alias: DfuTarg
> Paired: no
> Trusted: no
> Blocked: no
> Connected: yes
> LegacyPairing: no
> UUID: Vendor specific (00001530-1212-efde-1523-785feabcd123)
> UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
> UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
> RSSI: -57
> [DfuTarg]# list-attributes
> (hangs forever)

Does it hangs or just doesn't print anything?

> Is list-attributes meant to do something here?
>
> Alternately, can anyone supply an example of select-attribute that
> would allow me to interact with an attribute on this device? I was
> hoping the output of "list-attributes" would be the clue I need.

I suspect something else is going on, perhaps bluetoothd could not
find any attributes or maybe it is connected over classic?

> --
> Regards,
> Mark
> markrages@gmail
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html



--
Luiz Augusto von Dentz

2015-08-03 07:40:42

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: bluetoothctl list-attributes command

Hi Mark,

On Mon, Aug 3, 2015 at 2:00 AM, Mark Rages <[email protected]> wrote:
> On Sun, Aug 2, 2015 at 2:48 AM, Luiz Augusto von Dentz
> <[email protected]> wrote:
>> Hi Mark,
>>
>> On Sun, Aug 2, 2015 at 2:24 AM, Mark Rages <[email protected]> wrote:
>>> On Wed, Jul 29, 2015 at 5:22 PM, Mark Rages <[email protected]> wrote:
>>>> I solved my previous problem with list-attributes, but now I face another one.
>>>>
>>>> I am trying to interact with the heart rate monitor strap
>>>> 'CB:D7:A0:40:C4:01' using bluetoothctl:
>>>>
>>>> $ bluetoothctl
>>>> [NEW] Controller 00:02:72:C8:B1:AD qountdown [default]
>>>> [NEW] Device CB:D7:A0:40:C4:01 mar
>>>> [NEW] Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023 Vendor
>>>> specific (Primary)
>>>> [NEW] Characteristic
>>>> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0026 Vendor
>>>> specific
>>>> [NEW] Characteristic
>>>> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0024 Vendor
>>>> specific
>>>> [NEW] Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012
>>>> Battery Service (Primary)
>>>> [NEW] Characteristic
>>>> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013 Battery
>>>> Level
>>>> [NEW] Descriptor
>>>> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013/desc0015
>>>> Client Characteristic Configuration
>>>> [bluetooth]# connect CB:D7:A0:40:C4:01
>>>> Attempting to connect to CB:D7:A0:40:C4:01
>>>> Connection successful
>>>> [mar]# list-attributes
>>>> Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023 Vendor
>>>> specific (Primary)
>>>> Characteristic /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0026
>>>> Vendor specific
>>>> Characteristic /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0024
>>>> Vendor specific
>>>> Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012 Battery
>>>> Service (Primary)
>>>> Characteristic /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013
>>>> Battery Level
>>>> Descriptor /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013/desc0015
>>>> Client Characteristic Configuration
>>>> [mar]#
>>>>
>>>> So only two services are listed.
>>>>
>>>> But according to the Nordic Semiconductor "Master Control Panel" app,
>>>> this device offers six services:
>>>>
>>>> Generic Access (0x1800)
>>>> Generic Attribute (0x1801)
>>>> Heart Rate (0x180d)
>>>> Battery (0x180f)
>>>> Device Information (0x180a)
>>>> Unknown (0x4001-ceed)
>>>>
>>>> list-attributes only lists the Battery and 0x4001 services.
>>>>
>>>> Why is list-attributes only showing two services? How can I connect
>>>> to the Heart Rate (0x180d) service?
>>>
>>> Is it possible to connect to subscribe to notifications on the heart
>>> rate service?
>>
>> Try > notify on on the characteristic you want to receive notification.
>>
>
> Neither the heart rate service nor the characteristics within are
> listed on the dbus. So how can I subscribe to notification on them?

You have to disable Heart Rate plugin if you want to use it over
D-Bus, you can do that by passing -P heartrate option to bluetoothd


--
Luiz Augusto von Dentz

2015-08-02 23:00:57

by Mark Rages

[permalink] [raw]
Subject: Re: bluetoothctl list-attributes command

On Sun, Aug 2, 2015 at 2:48 AM, Luiz Augusto von Dentz
<[email protected]> wrote:
> Hi Mark,
>
> On Sun, Aug 2, 2015 at 2:24 AM, Mark Rages <[email protected]> wrote:
>> On Wed, Jul 29, 2015 at 5:22 PM, Mark Rages <[email protected]> wrote:
>>> I solved my previous problem with list-attributes, but now I face another one.
>>>
>>> I am trying to interact with the heart rate monitor strap
>>> 'CB:D7:A0:40:C4:01' using bluetoothctl:
>>>
>>> $ bluetoothctl
>>> [NEW] Controller 00:02:72:C8:B1:AD qountdown [default]
>>> [NEW] Device CB:D7:A0:40:C4:01 mar
>>> [NEW] Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023 Vendor
>>> specific (Primary)
>>> [NEW] Characteristic
>>> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0026 Vendor
>>> specific
>>> [NEW] Characteristic
>>> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0024 Vendor
>>> specific
>>> [NEW] Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012
>>> Battery Service (Primary)
>>> [NEW] Characteristic
>>> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013 Battery
>>> Level
>>> [NEW] Descriptor
>>> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013/desc0015
>>> Client Characteristic Configuration
>>> [bluetooth]# connect CB:D7:A0:40:C4:01
>>> Attempting to connect to CB:D7:A0:40:C4:01
>>> Connection successful
>>> [mar]# list-attributes
>>> Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023 Vendor
>>> specific (Primary)
>>> Characteristic /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0026
>>> Vendor specific
>>> Characteristic /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0024
>>> Vendor specific
>>> Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012 Battery
>>> Service (Primary)
>>> Characteristic /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013
>>> Battery Level
>>> Descriptor /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013/desc0015
>>> Client Characteristic Configuration
>>> [mar]#
>>>
>>> So only two services are listed.
>>>
>>> But according to the Nordic Semiconductor "Master Control Panel" app,
>>> this device offers six services:
>>>
>>> Generic Access (0x1800)
>>> Generic Attribute (0x1801)
>>> Heart Rate (0x180d)
>>> Battery (0x180f)
>>> Device Information (0x180a)
>>> Unknown (0x4001-ceed)
>>>
>>> list-attributes only lists the Battery and 0x4001 services.
>>>
>>> Why is list-attributes only showing two services? How can I connect
>>> to the Heart Rate (0x180d) service?
>>
>> Is it possible to connect to subscribe to notifications on the heart
>> rate service?
>
> Try > notify on on the characteristic you want to receive notification.
>

Neither the heart rate service nor the characteristics within are
listed on the dbus. So how can I subscribe to notification on them?

Regards,
Mark
markrages@gmail

2015-08-02 08:48:19

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: bluetoothctl list-attributes command

Hi Mark,

On Sun, Aug 2, 2015 at 2:24 AM, Mark Rages <[email protected]> wrote:
> On Wed, Jul 29, 2015 at 5:22 PM, Mark Rages <[email protected]> wrote:
>> I solved my previous problem with list-attributes, but now I face another one.
>>
>> I am trying to interact with the heart rate monitor strap
>> 'CB:D7:A0:40:C4:01' using bluetoothctl:
>>
>> $ bluetoothctl
>> [NEW] Controller 00:02:72:C8:B1:AD qountdown [default]
>> [NEW] Device CB:D7:A0:40:C4:01 mar
>> [NEW] Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023 Vendor
>> specific (Primary)
>> [NEW] Characteristic
>> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0026 Vendor
>> specific
>> [NEW] Characteristic
>> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0024 Vendor
>> specific
>> [NEW] Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012
>> Battery Service (Primary)
>> [NEW] Characteristic
>> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013 Battery
>> Level
>> [NEW] Descriptor
>> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013/desc0015
>> Client Characteristic Configuration
>> [bluetooth]# connect CB:D7:A0:40:C4:01
>> Attempting to connect to CB:D7:A0:40:C4:01
>> Connection successful
>> [mar]# list-attributes
>> Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023 Vendor
>> specific (Primary)
>> Characteristic /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0026
>> Vendor specific
>> Characteristic /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0024
>> Vendor specific
>> Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012 Battery
>> Service (Primary)
>> Characteristic /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013
>> Battery Level
>> Descriptor /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013/desc0015
>> Client Characteristic Configuration
>> [mar]#
>>
>> So only two services are listed.
>>
>> But according to the Nordic Semiconductor "Master Control Panel" app,
>> this device offers six services:
>>
>> Generic Access (0x1800)
>> Generic Attribute (0x1801)
>> Heart Rate (0x180d)
>> Battery (0x180f)
>> Device Information (0x180a)
>> Unknown (0x4001-ceed)
>>
>> list-attributes only lists the Battery and 0x4001 services.
>>
>> Why is list-attributes only showing two services? How can I connect
>> to the Heart Rate (0x180d) service?
>
> Is it possible to connect to subscribe to notifications on the heart
> rate service?

Try > notify on on the characteristic you want to receive notification.


--
Luiz Augusto von Dentz

2015-08-01 23:24:37

by Mark Rages

[permalink] [raw]
Subject: Re: bluetoothctl list-attributes command

On Wed, Jul 29, 2015 at 5:22 PM, Mark Rages <[email protected]> wrote:
> I solved my previous problem with list-attributes, but now I face another one.
>
> I am trying to interact with the heart rate monitor strap
> 'CB:D7:A0:40:C4:01' using bluetoothctl:
>
> $ bluetoothctl
> [NEW] Controller 00:02:72:C8:B1:AD qountdown [default]
> [NEW] Device CB:D7:A0:40:C4:01 mar
> [NEW] Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023 Vendor
> specific (Primary)
> [NEW] Characteristic
> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0026 Vendor
> specific
> [NEW] Characteristic
> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0024 Vendor
> specific
> [NEW] Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012
> Battery Service (Primary)
> [NEW] Characteristic
> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013 Battery
> Level
> [NEW] Descriptor
> /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013/desc0015
> Client Characteristic Configuration
> [bluetooth]# connect CB:D7:A0:40:C4:01
> Attempting to connect to CB:D7:A0:40:C4:01
> Connection successful
> [mar]# list-attributes
> Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023 Vendor
> specific (Primary)
> Characteristic /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0026
> Vendor specific
> Characteristic /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0023/char0024
> Vendor specific
> Service /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012 Battery
> Service (Primary)
> Characteristic /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013
> Battery Level
> Descriptor /org/bluez/hci0/dev_CB_D7_A0_40_C4_01/service0012/char0013/desc0015
> Client Characteristic Configuration
> [mar]#
>
> So only two services are listed.
>
> But according to the Nordic Semiconductor "Master Control Panel" app,
> this device offers six services:
>
> Generic Access (0x1800)
> Generic Attribute (0x1801)
> Heart Rate (0x180d)
> Battery (0x180f)
> Device Information (0x180a)
> Unknown (0x4001-ceed)
>
> list-attributes only lists the Battery and 0x4001 services.
>
> Why is list-attributes only showing two services? How can I connect
> to the Heart Rate (0x180d) service?

Is it possible to connect to subscribe to notifications on the heart
rate service?

Regards,
Mark
markrages@gmail