Gli MiFi 150M 3G does not reconnect by itself after a signal lost


#1

Hi all,

 

I have 2 GL-MiFi 150M Smart Routers and I like them, but there is a really big Problem with the 3G Connection.

I have installed them in a backpack for my workers. If they come in a area with no mobile Signal, the 3G goes down (led on the device stops). But after that it won’t restart again.

 

I tried to do a cron job to bring the wan interface back on, but it does not help. Only a restart of the device helps. Has anyone the same? Is there a solution for it?

https://wiki.openwrt.org/doc/recipes/3gdongle
<pre class=“code”>#!/bin/sh
if ! ping -q -c 1 -W 10 -I 3g-wan 8.8.8.8 > /dev/null; then
ifup wan &
fi


#2

Hi, seems 3g dongle could have problems if they lose connection. We are having a script to deal with this automatically. Sometime we need to hard reset the module using GPIO. A software reset of the wan interface may not help.

Hope to release the script with the firmware soon.


#3

Hi @alzhao, is there a way to install the script into the current firmware to have it hard reset via GPIO when the LTE / 3G chip hangs?

How would I install it?

Thanks


#4

I’m interested in getting the MiFi as well, but was wondering if there was a solution to this problem yet?

Like @heavymetal, would you be willing to share a script that would do a hard reset alfie?

Thanks


#5

A hard reset is easy, the problem is that when should you decide a hard reset. A hard reset takes around 1 minutes.

To do a hard reset in MiFi, just do this.

First upgrade to v2.22, which is available here: http://www.gl-inet.com/firmware/testing/. The control GPIO-LED name is a different

echo 1 > /sys/class/leds/gl-mifi:usbpow/brightness

sleep 1

echo 0 > /sys/class/leds/gl-mifi:usbpow/brightness

just wait and the the network should connect using the same settings.

 


Gl-mifi ec-25 starts using ttyUSB4 after losing signal
#6

Thanks @alzhao on how to hard reset the modem.

For anyone that is interested on getting the 3G / 4G card to reset on its own when signal drops follow instructions below:

Put the script below in /sbin/restart3g and chmod +x /sbin/restart3g

#!/bin/sh
date >> /tmp/restart3g.log
echo 1 > /sys/class/leds/gl_mifi:usbpow/brightness
sleep 1
echo 0 > /sys/class/leds/gl_mifi:usbpow/brightness

 

To have OpenWRT run the script when the 3g-modem interface goes down put this script in /etc/hotplug.d/iface/99-3g and chmod +x /etc/hotplug.d/iface/99-3g

I have updated the script below for firmware v2.22

#!/bin/sh
[ “$ACTION” = “remove” ] && {
if [ “$INTERFACE” = “3g-modem” ]; then
/sbin/restart3g
fi
}

Every time the 3g-modem interface goes down it will run the restart3g script to reset the modem and reconnect to mobile network.

 


#7

I created and chmod +x the two scripts exactly as mentioned in the post above, but it does not reconnect after a signal lost. I’m on firmware v2.22

 

Does it work at someone else? What could I made wrong?

 


#8

@Lukas, can you execute the two script manually to ensure they works? If you copy from the forum, most likely the script will broke because of the double quota


#9

The 99-3g had the Problem with the double quotas. But now I get a Syntax Error:

./99-3g: line 3: syntax error: unexpected “then” (expecting “}”)

 

My Script is like yours I think:

#!/bin/sh
["$ACTION"=“remove”]&&{
if["$INTERFACE"=“3g-modem”];then
/sbin/restart3g
fi
}


#10

Hi @Lukas, I have attached the scripts from my router in this post.

Hope this will help with the syntax error.


#11

I really appreciate your help guys. I’ll try it and will report then. (the restart3g is working)


#12

And YES, it helped. With these Scripst it runs. Thx


#13

Glad that is working for you @Lukas

@alzhao would this be integrated into the next firmware update?

Thanks


#14

I just wanted to find out if this fix has been integrated in the version 2.24 firmware? If it hasn’t are there any changes that need to be made to get it to work in the V2.24 firmware?

Thanks


#15

I have the same problem with my AR300m - that’s my “emergency access” into my homelab in case the regular line should be down. Unfortunately the stick connection “dies” here as well every few days and is not being restarted.

I’ve implemented the scripts in this thread but nothing happens :tired_face:

/sbin/restart3g responds:

/sbin/restart3g: line 3: can't create /sys/class/leds/gl_mifi:usbpow/brightness: nonexistent directory
/sbin/restart3g: line 5: can't create /sys/class/leds/gl_mifi:usbpow/brightness: nonexistent directory

Is the stick restart different on that model?


#16

OK, I found that the commands

/sys/class/leds# echo 0 > /sys/class/leds/gl-ar300m\:usb/brightness
/sys/class/leds# echo 1 > /sys/class/leds/gl-ar300m\:usb/brightness

are switching the power of the 3G stick. But after powering it down and up again it does not initialize … which means the GL.Inet does not establish the PPP connection automatically.

/etc/init.d/network restart does not help.

What is missing here to bring the connection up again after rebooting the stick?


#17

If you use the official firmware, it should be connect automatically when hard reset(down and up) the usb stick. If it doesn’t connect, could you execute those commands and paste the output here.

cat /etc/config/network
dmsg
logread

#18

@kyson-lok Unfortunately it doesn’t. I’m running the official firmware 2.27 without any modifications.

Please see the requested output attached: First the results of the commands with the stick not connected, then I switched it off and on again, then I did the readings of the logs again. The stick was still not initializing.

AR300M_3G.zip (21.3 KB)

Finally I trebooted the device, the stick does connect properly and I issued the log reading commands again:

AR300M_3G_after reboot.zip (9.6 KB)


#19

It seems the stick cannot be reinitialized after rebooting the stick. Not sure why.

[76052.789469] usb usb1-port1: unable to enumerate USB device
[165484.173705] usb 1-1: new full-speed USB device number 10 using ehci-platform
[165489.313758] usb 1-1: device descriptor read/64, error -145
[165504.603920] usb 1-1: device descriptor read/64, error -145
[165504.833919] usb 1-1: new full-speed USB device number 11 using ehci-platform
[165509.973974] usb 1-1: device descriptor read/64, error -145
[165525.264139] usb 1-1: device descriptor read/64, error -145
[165525.494135] usb 1-1: new full-speed USB device number 12 using ehci-platform
[165535.954252] usb 1-1: device not accepting address 12, error -145
[165536.074251] usb 1-1: new full-speed USB device number 13 using ehci-platform
[165546.534364] usb 1-1: device not accepting address 13, error -145
[165546.540725] usb usb1-port1: unable to enumerate USB device

#20

I also have no idea why :wink:

It works without issues when I give the “reboot” command for the whole AR300M. So the AR300M does something different regarding the initialization on a reboot then on powering down the USB port/stick. Maybe something different with the USB port initialization itself?

How can the issue been solved?