Now to somehow get a script to be able to send this AT command sequence!
And I think I have found a way!
Amazing what desperation can do!
This is a bit of a dirty way of firing AT commands "blind" at the modem on the MikroTik RB751U's PPP wan connection.
For some reason the ZTE MF190 needed a reset sequence different from the Huawei's
Haven't tested this on any other modems as indicated, but I will be interested to see if it can help to automatically recover my original E272 tx and Rx RF circuits disabled problem.
Code:
## Modem reset script for 3G PPP Wan links ##
## uses PPP Modem Init to send AT command to serial port ##
## Commands are simply fired "blind" at the modem ##
## sends the AT+CFUN=4, AT+CFUN=6 command sequence ##
## ZTE MF-190 requires AT+CFUN=4, AT+CFUN=1 sequence or AT+ZRST ##
## Huawei E367, E272 requires AT+CFUN=4, AT+CFUN=6 sequence ##
## Untested on other modems ##
## This script can be used with Netwatch ##
## You can adjust the delays and AT commands as needed ##
## Peter James 2012-03-12 ##
# Set the wan name #
:local WanName "wan2";
:log info "Starting $WanName Modem Reset Sequence";
# get its ID number #
:local WanID [/interface ppp-client find name=$WanName];
# Modify the dial command to force dial failure, else modem gets confused #
/interface ppp-client set dial-command="AT" $WanID;
/interface ppp-client disable $WanID;
delay 1;
/interface ppp-client enable $WanID;
/interface ppp-client set modem-init="ATZ;AT+CFUN=4" $WanID;
# Wait for tx and rx RF circuits to switch off #
delay 5;
/interface ppp-client set modem-init="ATZ;AT+CFUN=6" $WanID;
# wait for modem to reset #
delay 5;
# Modify the dial command to restore dial capability #
/interface ppp-client set dial-command="ATD" $WanID;
/interface ppp-client set modem-init="" $WanID;
# Modem should now redial and connect #
:log info "$WanName Modem Reset Sequence complete";
Bookmarks