RB750UP + 3G USB = freezes completely

remezen

I’ve got stupid Megafon too :slight_smile: But on completely different configuration RB411UAHR and PCI-e modem Sierra Wireles.
I found that all “freezing” problem is due to incorrect handling of 3G modem errors by ROS.

Mikrotik sent ATH command if caught en error in connection.
Modern 3G Modem do nothing when recieve ATH command, just reply OK.

For huawei modems works AT+CHUP

For Siera Wireless nor ATH, or AT+CHUP works, only AT!GRESET actualy restart connection, and sometimes interface enable only can helps.

Here is my script for check and restart 3G modem

/system script
add name=ppp-restart source=":local iface;\r\
    \n:foreach i in=[/interface find type=\"ppp-out\"]  do={\r\
    \n    :set iface [/interface get \$i name];\r\
    \n    /interface ppp-client monitor \$i once do={\r\
    \n        :if (\$status!=\"connected\") do={  \r\
    \n            /interface disable \$iface;\r\
    \n            :delay 5s;\r\
    \n            :log info \"ppp-watch status: \$status,  restarted: \$iface\";\r\
    \n            /interface enable  \$iface;\r\
    \n           }\r\
    \n    :log info \"ppp-watch status: \$status\";  \r\
    \n    }\r\
    \n}\r\
    \n"