Bluetooth services/features


Tamra <tamrako@...>
 

Hi Zephyr Team,

I'm trying to find out what services bluetooth devices have just by scanning without making a connection with the device, similarly to the scan_cb function and print these services/features. Is there a function that does this? I've looked at the bt_sdp_get_features function but got stuck when I couldn't find where the struct, bt_sdp_client_result was defined.

Any help or advice would be greatly appreciated!

Thank you,
Tamra


Carles Cufi
 

GATT is the profile and ATT the protocol. That’s what you use in BLE to discover services and interact with values.

 

Carles

 

From: Tamra Oyama <tamrako@...>
Sent: 21 June 2018 09:00
To: Cufi, Carles <carles.cufi@...>; zephyr-devel@...
Subject: Re: [Zephyr-devel] Bluetooth services/features

 

Low energy. What would be that function/protocol?

 

On Wed, Jun 20, 2018 at 8:59 PM Cufi, Carles <Carles.Cufi@...> wrote:

Hi Tamra,

 

Are you looking to use classical Bluetooth or Bluetooth Low Energy? SDP is a classical Bluetooth protocol.

 

Carles

 

From: <devel@...> on behalf of Tamra <tamrako@...>
Date: Thursday, 21 June 2018 at 03:14
To: "zephyr-devel@..." <zephyr-devel@...>
Subject: [Zephyr-devel] Bluetooth services/features

 

Hi Zephyr Team,

 

I'm trying to find out what services bluetooth devices have just by scanning without making a connection with the device, similarly to the scan_cb function and print these services/features. Is there a function that does this? I've looked at the bt_sdp_get_features function but got stuck when I couldn't find where the struct, bt_sdp_client_result was defined.

 

Any help or advice would be greatly appreciated!

 

Thank you,

Tamra


Tamra <tamrako@...>
 

Thanks Carles. I’ll look into that now.


On Wed, Jun 20, 2018 at 9:19 PM Cufi, Carles <Carles.Cufi@...> wrote:

GATT is the profile and ATT the protocol. That’s what you use in BLE to discover services and interact with values.

 

Carles

 

From: Tamra Oyama <tamrako@...>
Sent: 21 June 2018 09:00
To: Cufi, Carles <carles.cufi@...>; zephyr-devel@...
Subject: Re: [Zephyr-devel] Bluetooth services/features

 

Low energy. What would be that function/protocol?

 

On Wed, Jun 20, 2018 at 8:59 PM Cufi, Carles <Carles.Cufi@...> wrote:

Hi Tamra,

 

Are you looking to use classical Bluetooth or Bluetooth Low Energy? SDP is a classical Bluetooth protocol.

 

Carles

 

From: <devel@...> on behalf of Tamra <tamrako@...>
Date: Thursday, 21 June 2018 at 03:14
To: "zephyr-devel@..." <zephyr-devel@...>
Subject: [Zephyr-devel] Bluetooth services/features

 

Hi Zephyr Team,

 

I'm trying to find out what services bluetooth devices have just by scanning without making a connection with the device, similarly to the scan_cb function and print these services/features. Is there a function that does this? I've looked at the bt_sdp_get_features function but got stuck when I couldn't find where the struct, bt_sdp_client_result was defined.

 

Any help or advice would be greatly appreciated!

 

Thank you,

Tamra


Tamra <tamrako@...>
 

Low energy. What would be that function/protocol?


On Wed, Jun 20, 2018 at 8:59 PM Cufi, Carles <Carles.Cufi@...> wrote:

Hi Tamra,

 

Are you looking to use classical Bluetooth or Bluetooth Low Energy? SDP is a classical Bluetooth protocol.

 

Carles

 

From: <devel@...> on behalf of Tamra <tamrako@...>
Date: Thursday, 21 June 2018 at 03:14
To: "zephyr-devel@..." <zephyr-devel@...>
Subject: [Zephyr-devel] Bluetooth services/features

 

Hi Zephyr Team,

 

I'm trying to find out what services bluetooth devices have just by scanning without making a connection with the device, similarly to the scan_cb function and print these services/features. Is there a function that does this? I've looked at the bt_sdp_get_features function but got stuck when I couldn't find where the struct, bt_sdp_client_result was defined.

 

Any help or advice would be greatly appreciated!

 

Thank you,

Tamra


Luiz Augusto von Dentz
 

Hi Tamra,

Have a look at 'bt' shell module gatt-discovery* command:

https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/shell/gatt.c#L148

On Thu, Jun 21, 2018 at 10:20 AM, Tamra <tamrako@...> wrote:
Thanks Carles. I’ll look into that now.

On Wed, Jun 20, 2018 at 9:19 PM Cufi, Carles <Carles.Cufi@...>
wrote:

GATT is the profile and ATT the protocol. That’s what you use in BLE to
discover services and interact with values.



Carles



From: Tamra Oyama <tamrako@...>
Sent: 21 June 2018 09:00
To: Cufi, Carles <carles.cufi@...>;
zephyr-devel@...
Subject: Re: [Zephyr-devel] Bluetooth services/features



Low energy. What would be that function/protocol?



On Wed, Jun 20, 2018 at 8:59 PM Cufi, Carles <Carles.Cufi@...>
wrote:

Hi Tamra,



Are you looking to use classical Bluetooth or Bluetooth Low Energy? SDP is
a classical Bluetooth protocol.



Carles



From: <devel@...> on behalf of Tamra
<tamrako@...>
Date: Thursday, 21 June 2018 at 03:14
To: "zephyr-devel@..."
<zephyr-devel@...>
Subject: [Zephyr-devel] Bluetooth services/features



Hi Zephyr Team,



I'm trying to find out what services bluetooth devices have just by
scanning without making a connection with the device, similarly to the
scan_cb function and print these services/features. Is there a function that
does this? I've looked at the bt_sdp_get_features function but got stuck
when I couldn't find where the struct, bt_sdp_client_result was defined.



Any help or advice would be greatly appreciated!



Thank you,

Tamra
--
Luiz Augusto von Dentz


Carles Cufi
 

Hi Tamra,

 

Are you looking to use classical Bluetooth or Bluetooth Low Energy? SDP is a classical Bluetooth protocol.

 

Carles

 

From: <devel@...> on behalf of Tamra <tamrako@...>
Date: Thursday, 21 June 2018 at 03:14
To: "zephyr-devel@..." <zephyr-devel@...>
Subject: [Zephyr-devel] Bluetooth services/features

 

Hi Zephyr Team,

 

I'm trying to find out what services bluetooth devices have just by scanning without making a connection with the device, similarly to the scan_cb function and print these services/features. Is there a function that does this? I've looked at the bt_sdp_get_features function but got stuck when I couldn't find where the struct, bt_sdp_client_result was defined.

 

Any help or advice would be greatly appreciated!

 

Thank you,

Tamra


Theis Orthmann Blickfeldt Jørgensen (TTJO)
 

You should use int bt_gatt_discover(struct bt_conn *conn, struct bt_gatt_discover_params *params); found in gatt.h. Also you should register a CB-function of type typedef u8_t (*bt_gatt_discover_func_t)(struct bt_conn *conn, const struct bt_gatt_attr *attr, struct bt_gatt_discover_params *params); - also found in gatt.h.
You will get a CB for each discovered service/charateristic (Depending on what you give as discovery-param).

In general look at gatt.h line #777 - #908.

 

 

Venlig hilsen/kind regards

Theis Orthmann Blickfeldt Jørgensen

Embedded Software Developer, M.Sc.EE.

 

Oticon A/S

Kongebakken 9

DK-2765 Smørum

 

ttjo@...

www.oticon.com