bt_conn_get_info returns error -22

Hello Nordic,

the function bt_conn_get_info returns error -22 when called from my thread. please note I followed the throughput example 

 Building a Bluetooth application on nRF Connect SDK - Part 3 Optimizing the connection 

not sure whats going on as the example is also calling it from the thread. I am using NCS 2.0.0 and custom nRF52833 board. your help will be greatly appreciated. 

Regards,

  • Hi,

    Looking at the bt_conn_get_info() implementation, it will return -EINVAL in the end, if none of the earlier checks are met. Those are a combination of static configurations. I don't know enough about your code, though. Could it be that the connection object pointer you passed is invalid? If you don't see anything obvious from looking at your code, I would suggest checking with a debugger what happens in bt_conn_get_info() to get an idea of what is happening.

Related