How to keep connection alive with external control

The module I’ve created connects fine but the Roku2 disconnects every 4 seconds. Is there a way to keep the Roku from disconnecting using external control?

Andy