Huawei EVDO

From MikroTik Wiki
Jump to: navigation, search

Document Revision 2009-04-21: RouteroOS changes since V3.23


This example shows how to get HUAWEI E630 Data Card modem working with LMT (Latvian Mobile Telephone UMTS/GPRS networks), or with Amigo (GPRS network) in Latvia. Service in your country might have different requirements and strings, but this is just to give you an outline of what is required.


Router Hardware: MikroTik Router with USB port(s) (RB230, any x86 system, RB433UAH, or, RB411U when available with USB)

Router Software: RouterOS V3.x (works in v2.9.x as well). Configuration is changed since V3.23.

USB Modem: HUAWEI E630 Data Card

The USB Modem is recognized in RouterOS as an USB device and listed under the USB resources:

[admin@RB433UAH] > system resource usb print 
 # DEVICE VENDOR                      NAME                     SPEED                    
 0 2:1                                RB400 EHCI               480 Mbps                 
 1 2:2    ST                          ST980811AS               480 Mbps                 
 2 1:1                                RB400 OHCI               12 Mbps                  
 3 1:4    HUAWEI Technologies         HUAWEI Mobile            12 Mbps                  
[admin@RB433UAH] > 

Make sure the USB port is listed under the port menu:

[admin@RB433UAH] > port print 
Flags: I - inactive 
 #   NAME                      CHANNELS   USED-BY                     BAUD-RATE
 0   serial0                   1          Serial Console              auto     
 1   usb2                      2                                      9600     
[admin@RB433UAH] > 

Set the baud rate to 9600 for communicating with the modem, in case it's not done already:

[admin@RB433UAH] > port set usb2 baud-rate=9600

Check the modem response using serial-terminal:

[admin@RB433UAH] > /system serial-terminal usb2 channel=0

[Ctrl-A is the prefix key]

Manufacturer: huawei
Model: E220
IMEI: 351827013145181


Router Configuration for PPP

LMT requires, that you specify remote IP address for the ppp connection, therefore we create a new profile:

/ppp profile add name=ppp-LMT remote-address=

The modem initialization string for HUAWEI is


the number to dial is *99***1# no username and no password. Therefore we create a ppp-client interface as follows:

/interface ppp-client \
add port=usb2 profile=ppp-LMT dial-command=ATDT phone=*99***1# \
modem-init="AT+CGDCONT=1,\"IP\",\"\"" \
add-default-route=yes use-peer-dns=yes name=ppp-lmt

You will get a nice interface, just enable it and go!

[admin@RB433UAH] /interface ppp-client> print
Flags: X - disabled, R - running 
 0 X  name="ppp-lmt" max-mtu=1500 max-mru=1500 mrru=disabled port=usb2 
      command-channel=0 data-channel=0 info-channel=0 user="" password="" 
      profile=ppp-LMT phone="*99***1#" dial-command="ATDT" 
      modem-init="AT+CGDCONT=1,"IP",""" null-modem=no 
      dial-on-demand=no add-default-route=yes use-peer-dns=yes 

The interface monitor will show the status:

[admin@RB433UAH] /interface ppp-client> monitor ppp-lmt 
     status: "connected"
     uptime: 47s
  idle-time: 47s
        mtu: 1500
        mru: 1500
-- [Q quit|D dump|C-z pause]

There is an IP address assigned and default route installed:

[admin@RB433UAH] > ip address print 
Flags: X - disabled, I - invalid, D - dynamic 
 #   ADDRESS            NETWORK         BROADCAST       INTERFACE                            
 0      ether1                               
 1 D         ppp-lmt                              
[admin@RB433UAH] > ip route print   
Flags: X - disabled, A - active, D - dynamic, 
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
 #      DST-ADDRESS        PREF-SRC        G GATEWAY                     DISTANCE INTERFACE  
 0 ADS                          r               1        ppp-lmt    
 1 A S                        r                    1        ether1     
 2 ADC                                    0        ether1     
 3 ADC                                 0        ppp-lmt    
[admin@RB433UAH] > 

We were achieving ~770kbps download speeds when the HUAWEI cards indicator was blue (UMTS), and ~122kbps when green (GPRS). Better results are if you turn off compression in the ppp profile.

If you disable the ppp-client and run the "info" command, you can get more status information about the modem and network:

[admin@RB433UAH] /interface ppp-client> info ppp-lmt 
            pin-status: "READY"
          manufacturer: "huawei"
                 model: "E220"
              revision: ""
         serial-number: "351827013145181"
       activity-status: "call in progress"
  functionality-status: "full"
             gprs-mode: "B - EDGE"
      current-operator: "LV LMT GSM, LV L"
          signal-level: "-59 dBm"

[admin@RB433UAH] /interface ppp-client> 

You can scan for available GSM networks using the "scan" command:

[admin@RB433UAH] /interface ppp-client> scan ppp-lmt 
Flags: A - active 
  OPERATOR                              SIGNAL-STRENGH                             NUMBER    
A LV LMT GSM, LV L                      -57 dBm                                    24701     
  LV TELE2                                                                         24702     
  BITE LV                                                                          24705     
-- [Q quit|D dump|C-z pause]

Additional Resources

Option_Globetrotter_HSDPA_USB_Modem WiKi page with similar setup for an USB modem.