Zephyr: How to get active Bluetooth connections

I can see all the options i have in the Bluetooth connection management but what I can't figure out is how to retrieve the bt_conn objects for the active connections. 
https://docs.zephyrproject.org/latest/connectivity/bluetooth/api/connection_mgmt.html

What I'm trying to do is see if there is something like:

main(){ 

while(1) { 

     if(BT_Connected){   // This is what I can't figure out, is there a handle for this? 

        power up sensor and read 

        send notification 

    } else{

        LOG_INF("no bluetooth connection") 
    }

wait 5 seconds

}


This must be something super simple but i'm running out of novel google queries to try. 

Parents Reply Children
No Data
Related