This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Find a way to control Notify flow to prevent stock notify between device and phone App

Hi

We follow the chart to design our notify flow to control the data in notify queue.

but we face a problem, the data in the queue always get more than 2 when the 9 or 8 mins, then our flow stop to notify,

please reference the code below, s_not_send is the data in the queue.

We what to know how to deal with this issue to make to notify stable.

device information
SDK:14.2

SD:5.1.0 GATTS Handle Value Notification flow chart
Nordic Semiconductor Infocenter.pdf

	  if ( s_device_mode == e_only_data  ) {              
			if ( s_not_send < 3 ) {                          // if notify queue have 2 data, stop notify until under 2 data
	      err_code = ble_cus_custom_value_update( &m_cus, notify_data ) ;                                   
					if(err_code==8){
						SEGGER_RTT_printf(0,"process error err_code=8\n");
						  err_code = sd_ble_gap_disconnect( m_conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION ) ;
							s_not_send=0;
						  return ; 
					}				
        APP_ERROR_CHECK( err_code ) ;
				s_not_send++ ;
			} // if
		} // if

Parents Reply Children
No Data
Related