2022-06-21 23:05:16

by John Klug

[permalink] [raw]
Subject: Is there an attribute for the name field in bluetoothctl?

Gatttool Example:

? [CC:78:AB:7E:87:07][LE]> char-read-uuid 2a00
? handle: 0x0003 ? value: 53 65 6e 73 6f 72 54 61 67 20 32 2e 30
? [CC:78:AB:7E:87:07][LE]> char-read-uuid 00002a00-0000-1000-8000-00805f9b34fb
? ?handle: 0x0003 ? value: 53 65 6e 73 6f 72 54 61 67 20 32 2e 30
?
From Bluetoothctl:

? [CC2650 SensorTag]# attribute-info 2a00
? Attribute 2a00 not available
? [CC2650 SensorTag]# attribute-info 00002a00-0000-1000-8000-00805f9b34fb
? Attribute 00002a00-0000-1000-8000-00805f9b34fb not available

John Klug


2022-06-21 23:42:55

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: Is there an attribute for the name field in bluetoothctl?

Hi John,

On Tue, Jun 21, 2022 at 4:05 PM John Klug <[email protected]> wrote:
>
> Gatttool Example:
>
> [CC:78:AB:7E:87:07][LE]> char-read-uuid 2a00
> handle: 0x0003 value: 53 65 6e 73 6f 72 54 61 67 20 32 2e 30
> [CC:78:AB:7E:87:07][LE]> char-read-uuid 00002a00-0000-1000-8000-00805f9b34fb
> handle: 0x0003 value: 53 65 6e 73 6f 72 54 61 67 20 32 2e 30
>
> From Bluetoothctl:
>
> [CC2650 SensorTag]# attribute-info 2a00
> Attribute 2a00 not available
> [CC2650 SensorTag]# attribute-info 00002a00-0000-1000-8000-00805f9b34fb
> Attribute 00002a00-0000-1000-8000-00805f9b34fb not available

Certain attributes are controlled by the daemon so they are not
exposed over D-Bus, this is not unique to BlueZ since I remember
saying that on iOS it also don't allow applications to access some
attributes directly.

Anyway the name is actually parsed and you can even see it on your
prompt and you can also give it an alias with set-alias command.

> John Klug



--
Luiz Augusto von Dentz

2022-06-22 00:03:26

by John Klug

[permalink] [raw]
Subject: Re: Is there an attribute for the name field in bluetoothctl?

The value from gatttool does not match the prompt ([CC2650 SensorTag]# )

2A00 is "SensorTag 2.0"

This was defined by TI and is in their documentation with the value gatttool presents.

How do I get the value "SensorTag 2.0" with bluetoothctl for the UUID 2A00?


John Klug





From: Luiz Augusto von Dentz <[email protected]>
Sent: Tuesday, June 21, 2022 6:40 PM
To: John Klug <[email protected]>
Cc: Linux-Bluetooth MailingList <[email protected]>
Subject: Re: Is there an attribute for the name field in bluetoothctl?
?
Hi John,

On Tue, Jun 21, 2022 at 4:05 PM John Klug <[email protected]> wrote:
>
> Gatttool Example:
>
>??? [CC:78:AB:7E:87:07][LE]> char-read-uuid 2a00
>??? handle: 0x0003?? value: 53 65 6e 73 6f 72 54 61 67 20 32 2e 30
>??? [CC:78:AB:7E:87:07][LE]> char-read-uuid 00002a00-0000-1000-8000-00805f9b34fb
>??? handle: 0x0003?? value: 53 65 6e 73 6f 72 54 61 67 20 32 2e 30
>
> From Bluetoothctl:
>
>?? [CC2650 SensorTag]# attribute-info 2a00
>?? Attribute 2a00 not available
>?? [CC2650 SensorTag]# attribute-info 00002a00-0000-1000-8000-00805f9b34fb
>?? Attribute 00002a00-0000-1000-8000-00805f9b34fb not available

Certain attributes are controlled by the daemon so they are not
exposed over D-Bus, this is not unique to BlueZ since I remember
saying that on iOS it also don't allow applications to access some
attributes directly.

Anyway the name is actually parsed and you can even see it on your
prompt and you can also give it an alias with set-alias command.

> John Klug



--
Luiz Augusto von Dentz

2022-06-22 06:16:09

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: Is there an attribute for the name field in bluetoothctl?

Hi John,

On Tue, Jun 21, 2022 at 4:57 PM John Klug <[email protected]> wrote:
>
> The value from gatttool does not match the prompt ([CC2650 SensorTag]# )
>
> 2A00 is "SensorTag 2.0"
>
> This was defined by TI and is in their documentation with the value gatttool presents.
>
> How do I get the value "SensorTag 2.0" with bluetoothctl for the UUID 2A00?

Perhaps the name CC2650 SensorTag comes from the advertising? Anyway,
bluetoothd will read the name and update it on device information e.g.
info <address>

>
> John Klug
>
>
>
>
>
> From: Luiz Augusto von Dentz <[email protected]>
> Sent: Tuesday, June 21, 2022 6:40 PM
> To: John Klug <[email protected]>
> Cc: Linux-Bluetooth MailingList <[email protected]>
> Subject: Re: Is there an attribute for the name field in bluetoothctl?
>
> Hi John,
>
> On Tue, Jun 21, 2022 at 4:05 PM John Klug <[email protected]> wrote:
> >
> > Gatttool Example:
> >
> > [CC:78:AB:7E:87:07][LE]> char-read-uuid 2a00
> > handle: 0x0003 value: 53 65 6e 73 6f 72 54 61 67 20 32 2e 30
> > [CC:78:AB:7E:87:07][LE]> char-read-uuid 00002a00-0000-1000-8000-00805f9b34fb
> > handle: 0x0003 value: 53 65 6e 73 6f 72 54 61 67 20 32 2e 30
> >
> > From Bluetoothctl:
> >
> > [CC2650 SensorTag]# attribute-info 2a00
> > Attribute 2a00 not available
> > [CC2650 SensorTag]# attribute-info 00002a00-0000-1000-8000-00805f9b34fb
> > Attribute 00002a00-0000-1000-8000-00805f9b34fb not available
>
> Certain attributes are controlled by the daemon so they are not
> exposed over D-Bus, this is not unique to BlueZ since I remember
> saying that on iOS it also don't allow applications to access some
> attributes directly.
>
> Anyway the name is actually parsed and you can even see it on your
> prompt and you can also give it an alias with set-alias command.
>
> > John Klug
>
>
>
> --
> Luiz Augusto von Dentz



--
Luiz Augusto von Dentz

2022-06-22 14:52:24

by John Klug

[permalink] [raw]
Subject: Re: Is there an attribute for the name field in bluetoothctl?

Thank you Luiz:
>Anyway,
>bluetoothd will read the name and update it on device information e.g.
>info <address>

info <address> does produce the correct result for the name:

? Name: SensorTag 2.0

Thank you for answering my question.