Is it possible for peripheral device to close the connection itself when it wants to?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
wewu_1392881
Level 3
Level 3
First like received First like given Welcome!

As described in the title, any suggestion for this feature?

0 Likes
1 Solution
JacobT_81
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

dianke02

Please look at puart_control example:

   if (con_index > PUART_CONTROL_MAX_CONNECTIONS)

 

  ble_trace1("---!!!puart_control_connection_up handle:%x", con_handle);

  blecm_disconnect(BT_ERROR_CODE_CONNECTION_TERMINATED_BY_LOCAL_HOST);

   return;

Jacob

View solution in original post

1 Reply
JacobT_81
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

dianke02

Please look at puart_control example:

   if (con_index > PUART_CONTROL_MAX_CONNECTIONS)

 

  ble_trace1("---!!!puart_control_connection_up handle:%x", con_handle);

  blecm_disconnect(BT_ERROR_CODE_CONNECTION_TERMINATED_BY_LOCAL_HOST);

   return;

Jacob