Difference between revisions of "Option Globetrotter HSDPA USB Modem"

From MikroTik Wiki
Jump to navigation Jump to search
Line 56: Line 56:


== Router Configuration for PPP ==
== Router Configuration for PPP ==
Since RouterOS V4 (and latest versions 3) the PPP client configuration is made much easier comparing to how it was previously. A ppp-client interface is added automatically to the /interface ppp-client list:
Since RouterOS V4 (and latest versions 3) the PPP client configuration is made much easier compared to previous versions. There is no need to use ppp profiles, and ppp-client interface might have been added automatically to the /interface ppp-client list:


  [admin@rb411u] > /interface ppp-client  
  [admin@rb411u] > /interface ppp-client  
Line 126: Line 126:
  [admin@rb411u] >  
  [admin@rb411u] >  


You may need to use masquerade to hide your private network when going out through the ppp.
You can get more status information about the modem and network by running the "info" command. In our case the modem uses the same channel for data and info, thus, we disable the ppp-client and run the "info" command then:
 
You can get more status information about the modem and network, if you disable the ppp-client and run the "info" command:


  [admin@rb411u] /interface ppp-client> info 0
  [admin@rb411u] /interface ppp-client> info 0
Line 147: Line 145:
   
   
  [admin@rb411u] /interface ppp-client>
  [admin@rb411u] /interface ppp-client>
You may need to use masquerade to hide your private network when going out through the ppp!


== Troubleshooting ==
== Troubleshooting ==

Revision as of 10:50, 28 October 2009

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

Introduction

This example shows how to get the Option Globetrotter HSDPA USB 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)

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

USB Modem: Option N.V. Globetrotter HSDPA USB Modem H7.2

Img-3g-th.jpg Manufacturer: Teltonika, model number U3G150

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

[admin@rb411u] > /system resource usb print 
 # DEVICE VENDOR                   NAME                  SPEED                 
 0 2:1                             RB400 EHCI            480 Mbps              
 1 1:1                             RB400 OHCI            12 Mbps               
 2 1:3    Option N.V.              Globetrotter HSDPA... 12 Mbps               
[admin@rb411u] > 

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

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

Prior RouterOS V3.23, a modem had all its ports listed. Since V3.23 there is one port per modem, and modem has channels used for commands and data. Channels have numbers 0,1,2, etc. Some modems may have just two channels, some have more. Set the baud rate to 9600 for communicating with the modem, in case it's not done already:

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

Check the modem responses using serial-terminal, like this:

[admin@rb411u] > /system serial-terminal usb2 channel=2

[Ctrl-A is the prefix key]


ATI
Manufacturer: Option N.V.
Model: GTM378
Revision: 2.3.3Hd (Date: Jul 17 2007, Time: 15:49:23)

OK

Disconnect from the modem, by pressing "Ctrl-A", and then "Q":

[Q - quit connection]      [B - send break]
[A - send Ctrl-A prefix]   [R - autoconfigure rate]


Welcome back!
[admin@rb411u] >

Router Configuration for PPP

Since RouterOS V4 (and latest versions 3) the PPP client configuration is made much easier compared to previous versions. There is no need to use ppp profiles, and ppp-client interface might have been added automatically to the /interface ppp-client list:

[admin@rb411u] > /interface ppp-client 
[admin@rb411u] /interface ppp-client> print 
Flags: X - disabled, R - running 
 0 X  name="ppp-out1" max-mtu=1500 max-mru=1500 mrru=disabled port=usb2 
      data-channel=2 info-channel=2 apn="internet" pin="" user="" password="" 
      profile=default phone="" dial-command="ATDT" modem-init="" 
      null-modem=no dial-on-demand=yes add-default-route=yes use-peer-dns=yes 
      allow=pap,chap,mschap1,mschap2 
[admin@rb411u] /interface ppp-client> info 0

The interface has 3G/GPRS modem specific arguments, like apn, pin. Consult your network provider what to use for APN, user, and password. Adjust your peer-dns and default-route settings according to what you want to do over that interface! In our case, we want permanent connection and won't use dial on demand:

[admin@rb411u] /interface ppp-client> set 0 dial-on-demand=no 
[admin@rb411u] /interface ppp-client> enable 0
[admin@rb411u] /interface ppp-client> print
Flags: X - disabled, R - running 
 0  R name="ppp-out1" max-mtu=1500 max-mru=1500 mrru=disabled port=usb2 
      data-channel=2 info-channel=2 apn="internet" pin="" user="" password="" 
      profile=default phone="" dial-command="ATDT" modem-init="" 
      null-modem=no dial-on-demand=no add-default-route=yes use-peer-dns=yes 
      allow=pap,chap,mschap1,mschap2 
[admin@rb411u] /interface ppp-client>

After enabling the interface watch the logs to see how the connection is being established over the USB modem:

[admin@rb411u] /interface ppp-client> /log print 
12:29:16 async,ppp,info ppp-out1: initializing... 
12:29:16 async,ppp,info ppp-out1: reseting link... 
12:29:16 system,info device changed by admin 
12:29:16 system,info dns changed 
12:29:17 async,ppp,info ppp-out1: initializing modem... 
12:29:17 async,ppp,info ppp-out1: dialing out... 
12:29:17 async,ppp,info ppp-out1: authenticated 
12:29:20 async,ppp,info ppp-out1: could not determine remote address, using 10.112.112.119 
12:29:20 async,ppp,info ppp-out1: connected 
12:29:20 system,info dns changed 

[admin@rb411u] /interface ppp-client> 

The serial port is used by ppp client:

[admin@rb411u] > /port print 
Flags: I - inactive 
 #   NAME                      CHANNELS   USED-BY                     BAUD-RATE
 0   serial0                   1          Serial Console              auto     
 1   usb2                      3          PPP <ppp-out1>             9600     
[admin@rb411u] > 

Check the addresses, in our case we have:

[admin@rb411u] > /ip address print 
Flags: X - disabled, I - invalid, D - dynamic 
 #   ADDRESS            NETWORK         BROADCAST       INTERFACE                          
 0 D 10.5.8.64/24       10.5.8.0        10.5.8.255      ether1                             
 1 D 10.40.192.214/32   10.112.112.119  0.0.0.0         ppp-out1                           
[admin@rb411u] > 

and routes:

[admin@rb411u] > /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        GATEWAY            DISTANCE
 0 ADS  0.0.0.0/0                          10.112.112.119     1       
 1 ADC  10.5.8.0/24        10.5.8.64       ether1             0       
 2 ADC  10.112.112.119/32  10.40.192.214   ppp-out1           0       
[admin@rb411u] > 

You can get more status information about the modem and network by running the "info" command. In our case the modem uses the same channel for data and info, thus, we disable the ppp-client and run the "info" command then:

[admin@rb411u] /interface ppp-client> info 0
failure: can't reuse channel while ppp-client running!
[admin@rb411u] /interface ppp-client> disable 0
[admin@rb411u] /interface ppp-client> info 0   
             status: "ready"
         pin-status: "no password required"
      functionality: "minimum"
         gprs-class: "A - GPRS & GSM simultaneous"
       manufacturer: "Option N.V."
              model: "GTM378"
           revision: "2.3.3Hd (Date: Jul 17 2007, Time: 15:49:23)"
      serial-number: "356237010662581,S23977B51N"
   current-operator: "LV LMT GSM"
  access-technology: "3G"
     signal-strengh: -89

[admin@rb411u] /interface ppp-client>

You may need to use masquerade to hide your private network when going out through the ppp!

Troubleshooting

1. If you do not get "authenticated" and "connected", then there is something wrong with your settings. Most likely, the profile or the ppp-client interface settings should be changed to match your provider's requirements.

2. If the USB port settings are wrong, there would be log message when you try to run the ppp client:

00:08:50 async,ppp,info ppp-lmt: initializing... 
00:08:50 async,ppp,info ppp-lmt: reseting link... 
00:08:50 async,ppp,info ppp-lmt: reseting link... - could not acquire serial port 
00:08:50 async,ppp,info ppp-lmt: disconnected

3. You can check if you can communicate with the USB modem by using the serial-terminal. Make sure the ppp-client is disabled! Start the serial terminal and run some AT commands:

[admin@rb411u] > /system serial-terminal usb2 channel=2

[Ctrl-A is the prefix key]


AT
OK
AT+CSQ
+CSQ: 14,99

OK

This must be okay, because the modem responds to your commands. Quit the serial terminal with "Ctrl-A" and "Q":

[Q - quit connection]      [B - send break]
[A - send Ctrl-A prefix]   [R - autoconfigure rate]


Welcome back!
[admin@rb411u] > 

4. Turn off PIN request for your SIM card, it makes the life much easier. Do it in a phone if you do not know the correct AT command.

5. When interface ppp-client info 0 returns OK in few section, wrong channel is used,

/interface ppp-client> info 0
            pin-status: "READY"
          manufacturer: "OK"
                 model: "OK"
              revision: "OK"
         serial-number: "OK"
       activity-status: ""
  functionality-status: ""
             gprs-mode: ""
      current-operator: ""
          signal-level: ""

Change channels,

/interface ppp-client> set 0 command-channel=3 data-channel=3 info-channel=3 

Unless /interface ppp-client info 0 returns,

/interface ppp-client> info 0
            pin-status: "READY"
          manufacturer: "Sierra Wireless, Inc."
                 model: "C885"
              revision: "J1_0_1_6AP C:/WS/FW/J1_0_1_6AP/MSM7200A/SRC/AMSS 2008/07/09 07:52:58"
         serial-number: "xxxxxxxxxxx"
       activity-status: "ready"
  functionality-status: "minimum"
             gprs-mode: "A - HSDPA"
      current-operator: "AT&T@"
          signal-level: "-89 dBm"

6. If you need to add multiple inits (multiline inits) then it is possible by dividing them using ; character. Example:

modem-init="AT+CGDCONT=5,\"IP\",\"internet.lmt.l\";AT+CGDCONT=6,\"IP\",\"internet.lmt.lv\";AT"

Additional Resources

Huawei_EVDO WiKi Page with similar setup for a PCMCIA modem

Teltonika HomePage of the USB modem manufacturer