- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I wanted to disconnect my WICED device(BLE peripheral) from Smartphone(BLE central) after all operations are completed.
To do this, I was looking for an API to disconnect, but can't find the same.
Is there any API available or any other alternative way to disconnect from central device ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rajvirsinh,
So sorry for my mistake! WICED indeed supports this feature and can be used with following function
tGATT_STATUS wiced_bt_gatt_disconnect (UINT16 conn_id)
The conn_id is the wiced_bt_gatt_connection_status_t.conn_id reported in GATT_CONNECTION_STATUS_EVT. For every device you will have to keep track of the conn_id that it wants to disconnect from.
Hope this helped.
Thanks,
Jaeyoung
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rajvirsinh,
In BLE the peripheral device is the slave and the central device the master, thus it has to be the central device initiating the disconnection. You would have to detect when all operations are completed on your Smartphone and initiate the disconnection from there.
Thanks,
Jaeyoung
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi jaeyoung
Acc to BLE specs it is possible to disconn BLE link from peripheral device. I personally have tried on TI & Nordic stack.
So my question is, @does wiced wifi supports this feature or not?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rajvirsinh,
So sorry for my mistake! WICED indeed supports this feature and can be used with following function
tGATT_STATUS wiced_bt_gatt_disconnect (UINT16 conn_id)
The conn_id is the wiced_bt_gatt_connection_status_t.conn_id reported in GATT_CONNECTION_STATUS_EVT. For every device you will have to keep track of the conn_id that it wants to disconnect from.
Hope this helped.
Thanks,
Jaeyoung
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content