Nimble BLE config

Alberk
Posts: 55
Joined: Sat Jun 19, 2021 1:49 am

Nimble BLE config

Postby Alberk » Wed Jan 11, 2023 9:58 am

Hi,

I am looking as some sample code. Does this code apply to both Peripheral and Central BLE implementation?

Code: Select all

ble_hs_cfg.store_status_cb = ble_store_util_status_rr;
ble_hs_cfg.sm_io_cap = 0;
ble_hs_cfg.sm_bonding = 1;
ble_hs_cfg.sm_mitm = 1;
ble_hs_cfg.sm_sc = 1;
ble_hs_cfg.sm_our_key_dist = 1 | BLE_SM_PAIR_KEY_DIST_ID;
ble_hs_cfg.sm_their_key_dist = 1 | BLE_SM_PAIR_KEY_DIST_ID;

irahul
Posts: 46
Joined: Fri Jun 18, 2021 10:07 am

Re: Nimble BLE config

Postby irahul » Fri Jan 13, 2023 10:43 am

No, not specific to peripheral role. It depends upon use case and end user requirement. This is host configuration structure fields.

Alberk
Posts: 55
Joined: Sat Jun 19, 2021 1:49 am

Re: Nimble BLE config

Postby Alberk » Fri Jan 13, 2023 10:52 am

Thank you for the information. There is another function.

Code: Select all

ble_gap_security_initiate(conn_id);
Is this a client/central function?

irahul
Posts: 46
Joined: Fri Jun 18, 2021 10:07 am

Re: Nimble BLE config

Postby irahul » Fri Jan 13, 2023 10:55 am

As per my understanding, this API is used to initiate security .It would either go for pairing /encryption or initiate security request. So not specific to central or peripheral role.

ujurmsde
Posts: 38
Joined: Tue Jan 19, 2021 6:37 am

Re: Nimble BLE config

Postby ujurmsde » Sun Jan 15, 2023 4:54 pm

In esp-idf examples folder there are sample codes in bluetooth subdirectory for various roles.

Who is online

Users browsing this forum: No registered users and 80 guests