How to stop end devices going to sleep after 30 seconds

I have a Co-ordinator and an End Device.

Anything I send from the co-ordinator arrives at the end device as expected.

Any response from the end device arrives at the Co-ordinator as expected UNLESS there is a gap of no data for 30 seconds.

In this case, data entered at the end device does not get sent for 15 seconds. Anything entered into the end device during that 15 seconds is lost.

So for example a command is sent from the co-ordinator to the end device. As long as the end device replies within 30 seconds, all is ok. If the end device takes longer than 30 seconds to reply, the reply is lost.

How can I fix this?

Try using CTS flow control and adjusting your sleep settings.

Sleep settings on end device are:

Sleep Mode 4
Time Before Sleep 8000
Cyclic sleep period 20
No of Cycles to Power Down IO 1
Sleep Options 0
Poll Rate 0

Serial Settings:

Paketization Timeout 3
DIO7 Config CTS flow control
DIO6 Config Disable

I have just tried monitoring CTS and I can see the end device turns CTS off after 30 seconds of inactivity.

Actually, it pulses CTS on for 9ms every 260ms once in this state.

Data arriving from the Co-ordinator sets CTS back on for another 30 seconds.

Sending data while CTS is pulsing will also force it to go back on but only after a few bytes are entered (these are lost and not send over the air).

Adjust the SP and ST time frames on the module.