Huawei EVDO

From MikroTik Wiki
Jump to navigation Jump to search

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

Introduction

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.

Hardware

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]


ATI
Manufacturer: huawei
Model: E220
Revision: 11.110.01.03.00
IMEI: 351827013145181
+GCAP: +CGSM,+FCLASS,+DS

OK

Router Configuration for PPP

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

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

The modem initialization string for HUAWEI is

AT+CGDCONT=1,"IP","internet.lmt.lv"

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\",\"internet.lmt.lv\"" \
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","internet.lmt.lv"" null-modem=no 
      dial-on-demand=no add-default-route=yes use-peer-dns=yes 
      allow=pap,chap,mschap1,mschap2 

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   10.5.8.157/24      10.5.8.0        10.5.8.255      ether1                               
 1 D 10.35.151.128/32   212.93.97.200   0.0.0.0         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  0.0.0.0/0                          r 212.93.97.200               1        ppp-lmt    
 1 A S  10.5.0.0/16                        r 10.5.8.1                    1        ether1     
 2 ADC  10.5.8.0/24        10.5.8.157                                    0        ether1     
 3 ADC  212.93.97.200/32   10.35.151.128                                 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: "11.110.01.03.00"
         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.