bt_nus_client_send failed (err -120) happend in certain frequency

Hi,

I have twp device: one peripheral and one central. My peripheral is sending out high payload data continiously. And my central is sending data ()in 10Hz frequency. However, every few times  I 'll receive bt_nus_client_send failed (err -120). I noticed that 120 means Operation already in progress. How to solve this issue? Or the central can only sending data very slow.

Whether it is relative to my setting interval=320 (400 ms), latency=0, timeout=400

Thank you for your help!

	 err = bt_nus_client_send(&nus_client, nus_data.data, nus_data.len);
				 if (err) {
					 LOG_WRN("Failed to send data over BLE connection"
						 "(err %d)", err);
				 }
 

Parents
  • Hello,

    If you want to send data every 100ms, I think it also make most sense to set the interval to 100ms. Else you will get very prone to interference and packet loss, since you will depend having to send multiple packets every interval.

    If you experience operation in progress error, you can simply go to sleep and wait until for instance next connection interval and try again.

    Kenneth

Reply
  • Hello,

    If you want to send data every 100ms, I think it also make most sense to set the interval to 100ms. Else you will get very prone to interference and packet loss, since you will depend having to send multiple packets every interval.

    If you experience operation in progress error, you can simply go to sleep and wait until for instance next connection interval and try again.

    Kenneth

Children
Related