How to deal with GATT TIMEOUT

I'm develping application on nrf52832 with nrf5SDK v17.0.

The connection interval is set to 12  to 16.And the conn_sup_timeout is set to 1000.

The condition happened frequently in my application that the connection is still display connected but the nus service is not avaliable.

And when I check the log in my phone,there always show gatt conn timeout or gatt conn lmp timeout etc.

I hope if the connection is still connected and gatt timeout happened, the application can try to reconnect gatt automatically.

Below is the source code.

1202蓝牙程序v0.0.6.rar

Related