Skip to content

attach user data to bt_conn context #93466

@fariouche

Description

@fariouche

Is your feature request related to a problem? Please describe.

Hello.
It would be nice to be able to attach a user data pointer to a bt_conn context to avoid having to set a global variable.
In my case it's to be able to set a flag from my application when it doesn't want to accept pairings. In the callback pairing_confirm for example there is only one parameter, the bt_conn.

Or maybe there is a way to do it?

Thanks!

Describe the solution you'd like

a function like bt_conn_attach_user_data or a way to pass a custom data to various callbacks

Describe alternatives you've considered

No response

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions