MikroTik RouterBoard and USB 3G/HSPA/LTE Modems

Hi Guys
Thanks to this thread and another on this forum relating to issues I have with my TP Link TL MR 3420 Router and it dropping the 3G connection (which is the only connection option available where I live) I am now the proud owner of a RB951G which I hope to set up tonight. I have started working through the manuals and I am very impressed. Which is better to use for the setup. Winbox or Webfig? It seems as if you guys prefer Winbox? Thanks
 
I prefer Winbox to Webfig simply because I'm more familiar with Winbox, I don't think Webfig even existed when I started.
I think in the most recent versions of RouterOS you can do almost everything in Webfig anyway, so use whichever you find most convenient.
 
Ok so here is my first issue. I am using an E220 and connected it. It is flickering dark blue i.e. it can see the 8ta network but it is not connecting. How do I instruct it to connect? Dial on demand is unselected. I tried to add the modem to the DHCP Client settings to get address etc at SP but could not find the interface? Is this required?
 
Last edited:
You need to setup a PPP connection for internet access. Select the usb port and set the data / info channels for the modem. You need to change the values until you get a connection. You also need to add a default route and add a masquerade rule in your firewall.
 
You need to setup a PPP connection for internet access. Select the usb port and set the data / info channels for the modem. You need to change the values until you get a connection. You also need to add a default route and add a masquerade rule in your firewall.

Thanks for the info. I think I am going to start a new thread not to hijack this one.
 
Because of this thread I decided to get a Mikrotik RB951G-2hnD router. I was having hassles with my TP-Link 3420 losing connection with the 3G 8ta network and then decided to try the Mikrotik. There is another thread I started dealing with the setup issues I experienced with the 951. I am going to ask the mods to merge that thread into this one for convenience. After setting up the router I experienced a similar issue with the Mikrotik. I suspect it is due to the way that the networks drop the connection to the modem that causes the modem to go into an unresponsive state. All that would help is a reboot or removing and re-inserting the modem. Base122 then drew my attention to the fact that with RouterOS 6 there is a function on the 951 to reset the power of the USB port under the menu items "System - Routerboard".

I decided to upgrade to V6 and did the upgrade. The upgrade somehow failed and I had to go through quite an exercise to get it going again. More of which (and the lessons learnt later). After getting the router operative again Base122 wrote the following script for me. I have tried it and it works like a charm. For those who do not know how to do this (like me) I am also going to include the instructions provided with his blessing.

In winbox,
Go to System-Scripts.
Click on + to add new script.
Give it a name. (Remember for scheduler for later)
Paste the contents below into the source window.
Click apply and then the "Run script" button to test.

(You can open the log window to see what is happening)

To test the actual USB Power Reset, change the test host to an IP that won't respond to a ping. This time the script should drop the modem power and reset.




Code:
## Modem reset script for 3G PPP Wan link using USB Power Reset  ##
## based on ping reply to a known good host. ##. 
## Take note of your wan interface name! ##
## Only works on hardware supporting USB Power Reset feature ##
## Schedule this script at whatever checking interval you require. ##

# Set the 3G PPP wan name #
:local WanName "ppp-out1";


:log info "Starting $WanName 3G Down Check";

:local i 0;
:local result 0;

## Set host to check ###
:local testhost "196.25.1.200";

## Define number of pings to check ##
:local PingCount 10;

## Skip the ping check if the wan interface is not running ##
:if ([/interface get [find name="$WanName"] running]=true) do={

:log info "Checking Host $testhost";
:do {

:set i ($i + 1);

:if ([/ping $testhost interface="$WanName" interval=3 count=1]=1) do={

:set result ($result+1);

} 

} while=($i < $PingCount)

}

# ping has failed PingCount times or ping check was skipped #
:if ($result=0) do={

:log info "Host check Failed - Starting $WanName 3G Modem Reset Sequence";

# get its ID number #
:local WanID [/interface ppp-client find name=$WanName];

# Disable the interface to stop dial attempts #
/interface ppp-client disable $WanID;

:log info "Resetting USB Port Power";
/system routerboard usb power-reset duration=5s

# Wait for modem to connect to network again#
delay 30;

# Enable the interface once again #
/interface ppp-client enable $WanID;
# Modem should now redial  and connect #

delay 10;

# Check if interface is now running #
:if ([/interface get [find name="$WanName"] running]=true) do={

:log info "$WanName Modem Reset Sequence Complete";

} else={

:log info "$WanName Interface Not Running - Modem Reset Sequence Failed";

}

}

:log info "$WanName 3G Down Check Complete";

To schedule the script at regular intervals:

Go to system-Scheduler
Click on + to add new schedule
Give it a name.
Set Start Time to startup
Set interval to 00:03:00 for every 3mins for example.
Put your script name in the On event box.

I did this exactly and it works like an absolute charm. I set the intervals to 10 minutes as this is probably more than adequate for me. Thank you to Base122 for all your help. It is guys like you that make this forum great!:D
 
Last edited:
Resetting the RB951G-2HnD

I thought I would share some of the lessons I learnt trying to unbrick my 951. I was running RouterOS V5.25 and decided to go to V6. I followed the instructions in the RouterOS manual and it seemed as if the upgrade went through. It did not however reboot and when I eventually powered it down and up it ended up with a flickering LAN LED on the port where I had the Ethernet Cable connected. Resetting the router configuration with the Routerboot button made no difference. (The process is to disconnect the power, push and hold the button and power on the router. Continue holding the button until the ACT LED stats flashing.)

I then decided to try and do a Netinstall on the router. The process is also clearly explained in the RouterOS Manual but could not get the modem to get an IP and start the process after trying to activate the PXE Booting mode. (The process is the same as the reset except that you keep on pushing in the Routerboot button until the ACT LED stops flashing). Using Winbox I was able to see the MAC address of the router and could also see that it had obtained no IP. I could also not connect to the router using the MAC address and almost immediately got a timeout error. Eventually I figured that it must be something on my Laptop that was causing the issue. It is using 64 Bit Windows 7 Enterprise as OS. I checked if the firewall was disabled and realised that there were some features on the firewall that the domain administrator had locked down. It appeared as if the firewall was still blocking communication with the router. I suspect that the firewall caused the issues with the failed upgrade in the first place.

I then used another laptop running Vista. I gave it a static IP, disabled the firewall and did the configuration on Netinstall as per the manual, did the reset process and netinstall was able to push down a new version of RouterOS. I decided to go for V5.25 and it seemed to install. Again it would not reboot (I suspect it was due to the many times I tried to reset and reboot the router) This time I was however able to connect to the Router with Winbox using the MAC address. I then went to System - Reset Configuration and reset the config. The router then booted and was alive again! I then installed V6 again on the Vista Laptop and it worked flawlessly. Here are some lessons I learnt:


Updating the Router
1. Make sure you disable the firewall before doing any upgrades to the router.
2. Give the Laptop a static ip in the range of the router (Default 192.168.88.1)
3. Don't run or do any other activities on the computer whilst doing the upgrade

Using Netinstall.
1. Make sure the firewall on the PC is disabled
2. Give the computer a static IP
3. It is not possible to see if the router has gone into the PXE Boot mode but it does if you follow the procedure. If it seemingly does not go into the mode look for other issues.
4. The Ethernet cable must be plugged into Port1 for the router to see the Netinstall app.
5. After doing the install and if the router reboots the firewall on the router blocks Ethernet Port1 so you then need to connect to any of the other ports to do the Winbox or Webfig configuration of the router.
6. Remember to backup the router and to store those backup files off-router
7. Although Webfig works fine Winbox is better to use as you can open multiple windows. e.g. you can check the logs running whilst making changes, testing scripts etc.
 
Last edited:
One could also use the router Tools/Netwatch to effect USB Power Reset instead of a scripted solution.

attachment.php
 
Good to know. The script does it for me as I need to be able to check the connection state and have it reset if required. The router has been rock solid the past two days!
 
My experiences with the script of Mars67 aren't that good on a RB951G-2HnD running ROS v6.1 using a Huawei K3765.
After a few days of uptime, the ppp connection will disconnect. Reconnecting is not possible, error in logs shows 'ppp-out1: resetting link ... - could not acquire serial port'.

Even a hard reboot and manually reinserting the Huawei dongle does not seem to reliably restore the connection.

Is anyone having a reliable 24/7 connection with long uptimes?
If so, could you please share with which dongle?

Thanks a lot in advance!
 
My experiences with the script of Mars67 aren't that good on a RB951G-2HnD running ROS v6.1 using a Huawei K3765.
After a few days of uptime, the ppp connection will disconnect. Reconnecting is not possible, error in logs shows 'ppp-out1: resetting link ... - could not acquire serial port'.

Even a hard reboot and manually reinserting the Huawei dongle does not seem to reliably restore the connection.

Is anyone having a reliable 24/7 connection with long uptimes?
If so, could you please share with which dongle?

Thanks a lot in advance!

I did find the K3765 to be problematic (more so than some of the other modems I have used) in that the router would sometimes be unable to communicate with it via any of the serial comm channels. Usually a power reset of the router or unplugging the modem and plugging in again solved the issue.

Still not sure why this happens though.
However, there were instances where the router assigned a new usb port number to the modem for some reason.
In this case the ppp connection usb port had to be changed to match.

Are you using a script that resets the usb port power?
What do you normally have to do to restore connection when you have this problem?
What network are you on?
Signal strength?
 
Bump.

I updated my RB751G-2HnD to OS 6.5. It added the option for "power-reset" under "\System Routerboard usb", however, running it does absolutely nothing (devices shown in System Resources USB stays exactly the same). I have a MF668 modem that is unresponsive (plugged directly into the router's USB).

According to the Mikrotik site the router doesn't support reset (http://wiki.mikrotik.com/wiki/Manual:USB_Features#USB_power_reset) but previously the option wasn't available either. I was hopeful that seeing the feature (or not getting an error message when run in the terminal) says it is now supported - but I guess not?
 
There is probably no hardware switch on the circuit board for USB power reset in the RB751 model.

I get this error message on Winbox and the terminal. (RouterOS V6.5)

attachment.php
 
There is probably no hardware switch on the circuit board for USB power reset in the RB751 model.

I get this error message on Winbox and the terminal. (RouterOS V6.5)

attachment.php

That's the thing - I don't get any warning message. Just nothing happens.

Oh well - invested in a powered USB hub and will put the AC-DC adapter on a timer to reset once every day.
 
Oh well - invested in a powered USB hub and will put the AC-DC adapter on a timer to reset once every day.
How do you cut power to the modem? If you cut power to the hub, it will keep powering modem by the power coming from the host.
 
How do you cut power to the modem? If you cut power to the hub, it will keep powering modem by the power coming from the host.

A reviewer of the specific hub 'complained' that the hub always requires the AC adapter instead of running from the host. So I see that as an advantage. Got it today - will check if it really is so.
 
So I set up the hub - and no, it is still powered from the host when the external power is disconnect. Darn. Oh well, hopefully a better quality hub than the Canyon one I used first.
 
Thanks of clarifying above.
I don't think you will find a hub satisfying such requirement. You would need to find someone to do electrical modification to the hub for you.

Even if you do it, it is still not sure it will recognise and initialize modem correctly, as there is certain boot protocol using D+/D- lines to select proper USB speed.
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X