This turned out to be sort of easy. The solution was to,
- Remove the
PPPDConfig.add_child_spec
from the modem driveradd_raw_config/3
definition. - Use PowerManager to handle the modem power-on + watchdog.
- Have the modem driver handle AT commands for modem config, setup, etc.
- Once the modem driver is happy with a ready modem, it initiates the PPPD child process.
So the change mostly boils down to, move the PPPD child from being a child of VintageNetMobile and at the same level as the modem driver, to a child of the modem driver.