I’m trying to disable a ppp-client I use to send some commands through serial port.
I’m able to send commands succesfully with the ppp-client when enabled+disabled manually.
Now I’m trying to script it but I can’t disable interface 1s after enabling it.
add name="Send_code1" policy=ftp,read,write,test,winbox source="/interface ppp-client add \
add-default-route=no allow=pap,chap,mschap1,mschap2 comment=\"Sends prestored 1\" \\
dial-command=\"AT\" dial-on-demand=no disabled=yes max-mru=1500 max-mtu=1500 \\
modem-init=\"commands" mrru=disabled name=\"Code_1\" null-modem=no password=\"\" phone=\"\" \\
port=serial0 profile=default use-peer-dns=no user=\"\"
/interface ppp-client enable Code_1
:delay 1;
log info \"Command Sent!!!\";
/interface ppp-client disable Code_1;
log info \"IF Disabled!\";
/interface ppp-client remove Code_1;
log info \"IF Removed!\";
I can’t get it working. It gets blocked after “Command Sent!!!”. When I mannually disable the ppp-client, then it logs “IF Disabled!” but it never delets the interface nor log “IF Removed!”.
If my serial device is disconnected, it creates ppp-client, enable it, tries link, then logs “IF Disabled!” and disable interface. But ppp-client is not removed ![]()
Any ideas?
Many thanks in advance for your great help!!