Hi, I want to use ble_app_multilink_central example for my own application. Here are my problems:
- Setting MIN and MAX CONN_INTERVAL to more-less 20ms or lower (both on peripheral and central) causes that central goes of when peripherial is trying to connect.
- I want to read data from TWI and send it via BLE with frequency min 30 Hz. To do this I configured TIMER2 to raise interrupt with desired frequency. In timer interrupt event handler my sending flag is set to true and my main function is:
if (sending_flag) { mpu6050_get_measurements(mpu_data, &mpu_data[6], NULL); // read data TWI ble_send_mpu_data(); // send data using notification sending_flag = 0; }
I'm able to send data (12 bytes) with frequency 10Hz. When I try to send it with frequency 20Hz then peripheral sends a few packets of data and then connection with central is reseted (and so on).
How to set connections parameters both on central and periph. side to achive min 30Hz freq. ? How to read data from TWI and send it via BLE - Is my way to read and send data in main loop correct? Or maybe I should use app_scheduler or something else?