Private: Re: [Zephyr-users] bt_set_name() and setting local name #ble #bt #bluetooth #api


Carles Cufi
 

Hi there,

 

The name is placed in the advertising data automatically when you call bt_le_adv_start(BT_LE_ADV_CONN_NAME).  When you call bt_set_name(), that is updated as well:

https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/host/hci_core.c#L5444

 

That said, the name is placed in the scan response, so you need to make sure the scanner is performing active scanning.

 

Regards,

 

Carles

 

From: j.cheng via Lists.Zephyrproject.Org <j.cheng=de-haardt.com@...>
Sent: 10 February 2020 10:56
To: Cufi; Cufi, Carles <Carles.Cufi@...>
Subject: Private: Re: [Zephyr-users] bt_set_name() and setting local name #ble #bt #bluetooth #api

 

Hi,

Thanks for the quick reply.

I tried connecting and disconnecting several times. Also tried reinstalling the app. After waiting for some minutes, it still displays Zephyr. Is it possible that the local name differs from the advertising name?

Regards,

Jamie