- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there function or other mean after have conn_id to get from conn_id if this connection is BLE or classic?
Let say the example given in 002-23400_AN223400_Getting_Started_with_EZ-BT_WICED_Modules.pdf
where SPP and Hello_sensor are merged - how in the code can distinguish the type of bluetooth connection and at what stage, because at the beginning both processes are same?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Depending up on the connection call backs , you can distinguish the type of Bluetooth connection.
For example , in the project which you are referring , call back function registered for GATT connection (wiced_bt_gatt_connection_status_t) will tell its a BLE connection and for Classic it will be spp_connection_up_callback in wiced_bt_spp_reg_t .
Thanks,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Depending up on the connection call backs , you can distinguish the type of Bluetooth connection.
For example , in the project which you are referring , call back function registered for GATT connection (wiced_bt_gatt_connection_status_t) will tell its a BLE connection and for Classic it will be spp_connection_up_callback in wiced_bt_spp_reg_t .
Thanks,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is how I'm doing it right now, but was interested if there is some ready function from the stack that could give the connection type by providing connectionId as parameter, because BR/EDR is not only the SPP. For the BLE part is quite easy as have to "hook" only in one place*_gatts_conn_status_cb
BTW: wiced_bt_gatt_connection_status_t has a field wiced_bt_transport_t transport; which could be: BT_TRANSPORT_BR_EDR 1 or BT_TRANSPORT_LE 2, so I'm curious how this field could become ever 1 (BT_TRANSPORT_BR_EDR) when BR/EDR doesnt have GATT?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
As per BT spec, there is an option for opening GATT over BR/EDR connection. In WICED , we have the API wiced_bt_gatt_bredr_connect .
In that case, wiced_bt_transport_t of wiced_bt_gatt_connection_status_t should result in BT_TRANSPORT_BR_EDR
As per my knowledge this is not used in any profiles currently. So this case will not occur in any applications.
Reference: https://epxx.co/artigos/bluetooth_gatt.html
Thanks,
Anjana