enable serial port only when cell connection is established

I have a situation where a terminal is connected to a digi wr31 that uses a cellular connection via a serial cable. In this case I’m looking to have the serial interface be disabled until the cellular connection is established since otherwise it would drop some of the logging information from the terminal.

I’ve considered writing a python script for it but I’m wondering if there is a better way potentially via cli commands that can establish sort of a dependency between the serial interface and the cellular interface.

Hello and welcome to the Digi Forums Jason L84

This is definitely custom Python application.
Contact our sales representative will
get you in touch with Professional Services group at Digi

Regards. Michael S