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 Reply
  • Hi,

    In BLE there will always be packets going both ways, either empty packets or packets with useful data for the application. Data is only sent at each connection event, which happens at each connection interval. This means that if you have written several packets between interval, the packets will be sent one after the other, with a bidirectional packet between each packet. Also not that if there is any interference or noise occurring that cause the CRC to fail, then it will immediately stop communication that connection event, and retry on next connection interval.

    Kenneth

Children
Related