Page 1 of 1

Modem hunged up problem

Posted: Tue Jan 31, 2012 2:12 pm
by Marjan
Hi all,

I have about 20 411U routerboards with 3G WAN connection deployed in different towns and on couple of them I get following problem:
01:36:03 async,ppp,info PPP: initializing...
01:36:03 async,ppp,info PPP: reseting link...
01:36:04 async,ppp,info PPP: initializing modem...
01:36:04 async,ppp,info PPP: dialing out...
01:36:04 async,ppp,info PPP: terminating... - modem hunged up
01:36:04 async,ppp,info PPP: disconnected


All routerboards have the same PPP-client configuration, same OS (5.8), same 3G provider, same modems, everything except LAN config (which is irrelevant for this problem)...
This is configuration for PPP-client:
name="PPP" max-mtu=1500 max-mru=1500 mrru=disabled port=usb2 data-channel=0
info-channel=0 apn="*****" pin="" user="" password="" profile=default phone=""
dial-command="ATDT" modem-init="" null-modem=no dial-on-demand=no add-default-route=no
use-peer-dns=yes keepalive-timeout=30 allow=pap,chap,mschap1,mschap2


Routerboard reboots do not help, nor do modem resets. Could anyone explain what is the reason for this problem, please?

Re: Modem hunged up problem

Posted: Tue Jan 31, 2012 4:10 pm
by hedele
Usually this happens when the modem has some kind of hickup and needs a power-cycle (unplug/replug)
to work normally again. Unfortunately, RB411U does not support USB power-reset.

To test this, try opening a serial-terminal on the data channel (disable ppp-client first),
and try ATDT*99***1# - you should get the error message "NO CARRIER".

A workaround that sometimes helps (if this still occurs after modem unplug/replug),
is to remove APN name from routeros configuration,
and use init string AT+CGDCONT=1,"IP","apn.name"
and use phone number *99#

I needed to use that to make some versions of Huawei E160 work correctly.

Re: Modem hunged up problem

Posted: Wed Feb 01, 2012 3:02 pm
by DIMENTOR
Unfortunately, RB411U does not support USB power-reset.
I have RB751U-2HnD's and RB433UAH's which also have this problem. It would be nice to have an option to make a USB power reset. It could be used as a script to automate te process.

Re: Modem hunged up problem

Posted: Thu Feb 02, 2012 1:49 pm
by uldis
maybe this troubleshooting link could help you:
http://wiki.mikrotik.com/wiki/Option_Gl ... s_to_check

maybe this could help you to reset the modem:
After executing some AT commands the modem doesn't respond correctly or reports error values
* resetting the modem functionality might solve the problem
* use /system serial-terminal usbX channel=X
* execute the at+cfun=0 command and wait few seconds and execute at+cfun=1
Also add async,debug topics in the logging so you could see what exactly the modem didn't like.

Re: Modem hunged up problem

Posted: Mon Dec 26, 2022 4:01 pm
by grzaks
Sorry for reviving a post from 10 years ago but I'm currently in similar situation: 30+ Ltap Mini devices deployed in different locations, all of them with HP hs2340 HSPA+ (says Ericsson F5521gw on the device itself) modems and ppp-client connections. I manage them remotely via VPN they all connect to (via ovpn-client interface), but some of them are offline at any moment. I know from other signals, that the devices are powered on etc. - they just can't connect to the Internet and consequently to the VPN.

The hints here sometimes help, sometimes not. I've also observed that sometimes sending an SMS message from the modem "unhungs" it.

My idea is to automate the process of resetting the modem when the ppp link is down and came up with this script:
       /interface/ppp-client
       monitor ppp-out1 once do={
           :if ("$status" != "connected") do={
               :put "$status"
               disable ppp-out1
               :delay 1
               at-chat ppp-out1 input="AT+CFUN=0"
               :delay 3
               at-chat ppp-out1 input="AT+CFUN=1"
               /tool/sms/send phone-number=REDACTED message=("modem reset at ".[/system/identity get name])
               :delay 1
               enable ppp-out1
           }
       }
The script is added to the
/system/scheduler
to launch every 5 min. By theory it should solve the issue but it's not. Some devices went offline anyway and this script did not help getting them back online.

Is there something wrong with the above script? Any "link down" scenario it might be missing or something like that? Any hints guys? I'm spending a lot of time trying to have those devices online in a stable way but I'm out of ideas. And it's just 30+ devices. We're about to scale it to 300+ but this "device offline" issue is holding this project.

Re: Modem hunged up problem

Posted: Mon Dec 26, 2022 4:56 pm
by Amm0
Should open a new topic with the config if your having trouble instead of commenting on a 10 year thread...

As quick suggestion...maybe try running the latest V7 (or V6 stable) with these modems? You shouldn't really need to mess with CFUN directly nowadays.
If you found the modem getting stuck, then could disable/enable the PPP interface if you lose ping via a netwatch script. Might be a better approach than messing with the PPP profile script. As noted here too, you can use logging to see what's going on when this happen.

Re: Modem hunged up problem

Posted: Mon Dec 26, 2022 6:53 pm
by mada3k
Ericsson F5521gw
At least in my country, all providers are shutting down 3G services (making room for 5G) this last year. Maybe that's you old 3G modems are getting kicked out.

Re: Modem hunged up problem

Posted: Tue Dec 27, 2022 12:51 pm
by grzaks
Ericsson F5521gw
At least in my country, all providers are shutting down 3G services (making room for 5G) this last year. Maybe that's you old 3G modems are getting kicked out.
This may be a valid point. But wouldn't this cause all devices offline? For example in one city in Germany I have two devices. They were both online when I was last there to install them. After 2 days one of those devices went offline and never got back. One is always online since then (>1week).


As quick suggestion...maybe try running the latest V7 (or V6 stable) with these modems? You shouldn't really need to mess with CFUN directly nowadays.
They are all running v7.3.1. Sorry - I didn't provide enough details. Below is the
ppp-client
config:
# dec/27/2022 11:48:30 by RouterOS 7.3.1
# software id = PYNL-LF5M
#
# model = RB912R-2nD
# serial number = EB820F82F168
/interface ppp-client add apn=internet data-channel=2 disabled=no info-channel=2 modem-init="AT+CFUN=1" name=ppp-out1 phone=*99# port=usb2


Should open a new topic with the config if your having trouble instead of commenting on a 10 year thread...
Will do next time. I just though people find this thread when searching for solutions just like I did.

Re: Modem hunged up problem

Posted: Tue Dec 27, 2022 1:58 pm
by Amm0
The Ericsson is listed on the help page: https://help.mikrotik.com/docs/display/ROS/Peripherals
But yeah be worthless, at least in the US, in 3 days – maybe HSPA isn't getting phased out in Germany, but if this all work for a while and recently got flaky...

One note about old thread is part of the problem is that something like this, actually exists (/system/routerboard/usb/power-reset), that even more complete reset than CFUN.
It would be nice to have an option to make a USB power reset. It could be used as a script to automate te process.
so in theory you can use a netwatch script to do a power reset if you'd like nowadays. Normally just disable and enable the ppp-client interface works and less invasive on the system.

But really think you should enable more logging first to see what's actually being sent, and what happens when it fails. This is in fact the advice @uldis from Mikrotik gives above:
Also add async,debug topics in the logging so you could see what exactly the modem didn't like.
which be "/system logging add topics=async,debug". But in V7, it might use "ppp" instead of "async" (not sure), and you might want to use !packet (again not sure 100% PPP's current logging topics):
/system logging add topics=ppp,!raw,!packet

Anyway, you'd want the logs to show what AT commands are getting set by Mikrotik first. Or just script enable/disable the interface (or a power-reset) in netwatch for "On Down".

Since the modem is listed as supported you could open a ticket with Mikrotik & they may know more about the current status in V7 of it – but they'd want you to collect debug logs too, and a supout.rif.

Re: Modem hunged up problem

Posted: Wed Dec 28, 2022 10:25 pm
by mada3k
This may be a valid point. But wouldn't this cause all devices offline? For example in one city in Germany I have two devices. They were both online when I was last there to install them. After 2 days one of those devices went offline and never got back. One is always online since then (>1week).
Or maybe it have just roamed to another tower that still has 3G service. If I was in you shoes I would begin update to 4G immediately. Make sure to enable watchdog services and other service recovery functions as well.

Re: Modem hunged up problem

Posted: Wed Dec 28, 2022 11:52 pm
by Amm0
Yeah, I wasn't sure what was happening with 3G elsewhere...

@grzaks, Some more modern approaches to scripting recovery are here:
viewtopic.php?p=939176