I have a Raspberry Pi 3 device to which I have added a MultiTech MTQ-LAT3-B02 modem. I am able to successfully use pppd to connect to the cellular network. I then can add a ppp0 route and successfully use the cellular as a backup route to the internet when I lose the main eth0 connectivity. This works.
The problem: This approach leaves an open connection to the cellular network.
The question: How can I configure the cellular pppd to only connect (and subsequently disconnect after some idle timeout) when needed. That being when eth0 is down and there is something that needs to send data to the Internet. I have toyed with the ppp option "demand", but that does not seem to work as I think that is really intended for dial-up implementations.
Here is the Raspbian Version:
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
Here are my ppp option settings:
debug lcp-echo-failure 3 lcp-echo-interval 3 nomagic /dev/ttyACM3 460800 crtscts noauth noipdefault ipcp-accept-local ipcp-accept-remote usepeerdns novj nobsdcomp novjccomp nopcomp noaccomp lock connect "/usr/sbin/chat -v -f /etc/ppp/peers/multitech-chat" defaultroute nodeflate updetach
Any advice is appreciated.