zephyriot / zephyr-issues

0 stars 0 forks source link

BLE Central and BLE Peripheral roles at a moment on nRF52832 #2446

Closed nashif closed 7 years ago

nashif commented 7 years ago

Reported by Thanh Do:

Hi,

I have an application with BLE on Nordic nRF52832 with BLE Central and Peripheral at a moment.

(Imported from Jira ZEP-2622)

nashif commented 7 years ago

by Johan Hedberg:

I don't think Jira is the right place for questions (you should use the mailing list or IRC instead), however let me give you a quick answer anyway: you can use the bt_conn_get_info() API for this. The role member of the info struct will be BT_CONN_ROLE_MASTER when Zephyr is central and BT_CONN_ROLE_SLAVE when Zephyr is peripheral.

nashif commented 7 years ago

by Thanh Do:

Many thanks Johan.