Option Globetrotter HSDPA USB Modem: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
''Document Revision 2009-03-26: RouteroOS changes since V3.22''
''Document Revision 2009-04-21: RouteroOS changes since V3.23''


== Introduction ==
== Introduction ==
Line 5: Line 5:


== Hardware ==
== Hardware ==
Router Hardware: MikroTik Router with USB port(s) (RB230, any x86 system, or, RB433 when available with USB)
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)
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
USB Modem: Option N.V. Globetrotter HSDPA USB Modem H7.2
Line 15: Line 15:


The USB Modem is recognized in RouterOS as an USB device and listed under the USB resources:
The USB Modem is recognized in RouterOS as an USB device and listed under the USB resources:
  [admin@rb433_USB_test] > /system resource usb print
  [admin@rb411u] > /system resource usb print  
   # DEVICE VENDOR                           NAME                           SPEED                          
   # DEVICE VENDOR                   NAME                 SPEED                
   0 1:1                                     RB400 OHCI                     12 Mbps                        
   0 2:1                            RB400 EHCI            480 Mbps             
   1 1:2   Option N.V.                       Globetrotter HSDPA Modem        12 Mbps                        
  1 1:1                             RB400 OHCI           12 Mbps              
  [admin@rb433_USB_test] >
   2 1:3   Option N.V.             Globetrotter HSDPA... 12 Mbps              
  [admin@rb411u] >  


Make sure the USB ports are are listed under the port menu:
Make sure the USB port is listed under the port menu:
  [admin@rb433_USB_test] > port print  
  [admin@rb411u] > /port print                    
  Flags: I - inactive  
  Flags: I - inactive  
   #  NAME                         USED-BY                         BAUD-RATE
   #  NAME                     CHANNELS  USED-BY                     BAUD-RATE
   0  serial0                       Serial Console                 auto     
   0  serial0                   1          Serial Console             auto     
   1  hs1                                                          115200 
   1  usb2                      3                                     9600   
  2  hs2                                                          115200 
  [admin@rb411u] >  
  3   hs3                                                          115200 
 
  4  hs4                                                          115200 
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@rb433_USB_test] >  


Prior RouterOS V3.22, the ports of this particular modem were usb1, usb2, and usb3. Since V3.22, due to driver changes, there are four ports named hs1..hs4. The baud rate setting seems to be irrelevant now, i.e., there is no need to set it to 9600 for communicating with the modem.
[admin@rb411u] > /port set usb2 baud-rate=9600  


Check the modem responses using serial-terminal, like this:
Check the modem responses using serial-terminal, like this:
  [admin@rb433_USB_test] > /sys serial-terminal hs1
  [admin@rb411u] > /system serial-terminal usb2 channel=2
 
  [Ctrl-A is the prefix key]
  [Ctrl-A is the prefix key]
   
   
Line 67: Line 67:
     user="" password="" \
     user="" password="" \
     add-default-route=yes use-peer-dns=yes\
     add-default-route=yes use-peer-dns=yes\
     port=hs1 disabled=yes
     port=usb2 command-channel=2 data-channel=2 info-channel=2\
    disabled=yes
  add name="ppp-amigo" modem-init="AT+CGDCONT=1,\"IP\",\"amigo.lv\"" \
  add name="ppp-amigo" modem-init="AT+CGDCONT=1,\"IP\",\"amigo.lv\"" \
     dial-command="ATDT" phone="*99***1#" profile=ppp-Amigo \
     dial-command="ATDT" phone="*99***1#" profile=ppp-Amigo \
     user="amigo" password="amigo" \
     user="amigo" password="amigo" \
     add-default-route=yes use-peer-dns=yes\
     add-default-route=yes use-peer-dns=yes\
     port=hs1 disabled=yes
     port=usb2 command-channel=2 data-channel=2 info-channel=2\
    disabled=yes


Two profiles are created (because we have two different SIM cards from two providers). Then, ppp-client interfaces are created (adjust your peer-dns and default-route settings according to what you want to do over that interface).
Two profiles are created (because we have two different SIM cards from two providers). Then, ppp-client interfaces are created (adjust your peer-dns and default-route settings according to what you want to do over that interface).


Enable the ppp-lmt interface and watch the logs to see how the connection is being established over the USB modem:
Enable the ppp-amigo interface and watch the logs to see how the connection is being established over the USB modem:


  00:54:06 async,ppp,info ppp-lmt: initializing...  
  15:56:39 system,info device changed by admin
  00:54:06 async,ppp,info ppp-lmt: reseting link...  
15:56:39 async,ppp,info ppp-amigo: reseting link...  
  00:54:06 system,info device changed by admin
  15:56:39 async,ppp,info ppp-amigo: disconnected
  00:54:07 async,ppp,info ppp-lmt: initializing modem...  
15:56:39 async,ppp,info ppp-amigo: initializing...  
  00:54:07 async,ppp,info ppp-lmt: dialing out...  
  15:56:39 async,ppp,info ppp-amigo: reseting link...
  00:54:07 async,ppp,info ppp-lmt: authenticated  
  15:56:40 async,ppp,info ppp-amigo: initializing modem...  
  00:54:10 system,info dns changed
  15:56:41 async,ppp,info ppp-amigo: dialing out...  
00:54:10 async,ppp,info ppp-lmt: connected
  15:56:41 async,ppp,info ppp-amigo: authenticated  
  15:56:43 async,ppp,info ppp-amigo: connected  
15:56:43 system,info dns changed


The serial port is used by ppp client:
The serial port is used by ppp client:
  [admin@rb433_USB_test] > /port print  
  [admin@rb411u] > /port print  
  Flags: I - inactive  
  Flags: I - inactive  
   #  NAME                         USED-BY                         BAUD-RATE
   #  NAME                     CHANNELS  USED-BY                     BAUD-RATE
   0  serial0                       Serial Console                 auto     
   0  serial0                   1          Serial Console             auto     
   1  hs1                          PPP <ppp-lmt>                   115200 
   1  usb2                      3          PPP <ppp-amigo>             9600   
  2  hs2                                                          115200 
  [admin@rb411u] >  
  3  hs3                                                          115200 
  4  hs4                                                          115200 
  [admin@rb433_USB_test] >  


Check the addresses and routes! In our case we have:
Check the addresses and routes! In our case we have:


  [admin@rb433_USB_test] > /ip address print  
  [admin@rb411u] > ip address print  
  Flags: X - disabled, I - invalid, D - dynamic  
  Flags: X - disabled, I - invalid, D - dynamic  
   #  ADDRESS            NETWORK        BROADCAST      INTERFACE                    
   #  ADDRESS            NETWORK        BROADCAST      INTERFACE                      
   0 D 10.5.8.62/24       10.5.8.0        10.5.8.255      ether1                        
   0   10.5.8.169/24     10.5.8.0        10.5.8.255      ether1                        
   1 D 10.34.252.96/32    212.93.97.200  0.0.0.0        ppp-lmt                       
   1 D 10.38.150.52/32    212.93.97.200  0.0.0.0        ppp-amigo                     
  [admin@rb433_USB_test] > /ip route print  
  [admin@rb411u] > ip route print  
  Flags: X - disabled, A - active, D - dynamic,  
  Flags: X - disabled, A - active, D - dynamic,  
  C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,  
  C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,  
  B - blackhole, U - unreachable, P - prohibit  
  B - blackhole, U - unreachable, P - prohibit  
   #      DST-ADDRESS        PREF-SRC        G GATEWAY                  DISTANCE INTER...
   #      DST-ADDRESS        PREF-SRC        G GATEWAY                  DISTANCE INTERFACE
   0 ADS  0.0.0.0/0                          r 212.93.97.200            1        ppp-lmt
   0 ADS  0.0.0.0/0                          r 212.93.97.200            1        ppp-amigo
   1 ADC  10.5.8.0/24        10.5.8.62                                  0        ether1   
   1 A S  10.0.0.0/24                        r 10.5.8.1                1        ether1 
   2 ADC  212.93.97.200/32  10.34.252.96                               0        ppp-lmt
  2 ADC  10.5.8.0/24        10.5.8.169                                0        ether1  
  [admin@rb433_USB_test] >  
  3 A S 159.148.172.196/32                r 10.5.8.1                1        ether1 
   4 ADC  212.93.97.200/32  10.38.150.52                               0        ppp-amigo
  [admin@rb411u] >  


You may need to use masquerade to hide your private network when going out through the ppp.
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, if you disable the ppp-client and run the "info" command:
[admin@rb411u] /interface ppp-client> info ppp-amigo
            pin-status: "READY"
          manufacturer: "Option N.V."
                  model: "GTM378"
              revision: "2.3.3Hd (Date: Jul 17 2007, Time: 15:49:23)"
          serial-number: "356237010659249,S23977B6EM"
        activity-status: "ready"
  functionality-status: "minimum"
              gprs-mode: "A - HSDPA"
      current-operator: "Amigo"
          signal-level: "-87 dBm"
[admin@rb411u] /interface ppp-client>


== Troubleshooting ==
== Troubleshooting ==
Line 129: Line 149:
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:
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@rb433_USB_test] > system serial-terminal hs4
  [admin@rb411u] > /system serial-terminal usb2 channel=2
   
   
  [Ctrl-A is the prefix key]
  [Ctrl-A is the prefix key]
   
   
  AT
  AT
  OK
  OK
  AT+CSQ
  AT+CSQ
  +CSQ: 12,99
  +CSQ: 14,99
   
   
  OK
  OK
Line 147: Line 168:
   
   
  Welcome back!
  Welcome back!
  [admin@rb433_USB_test] >  
  [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.
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.

Revision as of 13:14, 21 April 2009

Document Revision 2009-04-21: RouteroOS 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 when available with USB)

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:

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


Welcome back!
[admin@rb433_USB_test] > 

Router Configuration for PPP

Copy and paste the following text into the router console:

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

/interface ppp-client 
add name="ppp-lmt" modem-init="AT+CGDCONT=1,\"IP\",\"internet.lmt.lv\"" \
    dial-command="ATDT" phone="*99***1#" profile=ppp-LMT \
    user="" password="" \
    add-default-route=yes use-peer-dns=yes\
    port=usb2 command-channel=2 data-channel=2 info-channel=2\
   disabled=yes
add name="ppp-amigo" modem-init="AT+CGDCONT=1,\"IP\",\"amigo.lv\"" \
    dial-command="ATDT" phone="*99***1#" profile=ppp-Amigo \
    user="amigo" password="amigo" \
    add-default-route=yes use-peer-dns=yes\
    port=usb2 command-channel=2 data-channel=2 info-channel=2\
   disabled=yes

Two profiles are created (because we have two different SIM cards from two providers). Then, ppp-client interfaces are created (adjust your peer-dns and default-route settings according to what you want to do over that interface).

Enable the ppp-amigo interface and watch the logs to see how the connection is being established over the USB modem:

15:56:39 system,info device changed by admin 
15:56:39 async,ppp,info ppp-amigo: reseting link... 
15:56:39 async,ppp,info ppp-amigo: disconnected 
15:56:39 async,ppp,info ppp-amigo: initializing... 
15:56:39 async,ppp,info ppp-amigo: reseting link... 
15:56:40 async,ppp,info ppp-amigo: initializing modem... 
15:56:41 async,ppp,info ppp-amigo: dialing out... 
15:56:41 async,ppp,info ppp-amigo: authenticated 
15:56:43 async,ppp,info ppp-amigo: connected 
15:56:43 system,info dns changed 

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-amigo>             9600     
[admin@rb411u] > 

Check the addresses and routes! In our case we have:

[admin@rb411u] > ip address print 
Flags: X - disabled, I - invalid, D - dynamic 
 #   ADDRESS            NETWORK         BROADCAST       INTERFACE                       
 0   10.5.8.169/24      10.5.8.0        10.5.8.255      ether1                          
 1 D 10.38.150.52/32    212.93.97.200   0.0.0.0         ppp-amigo                       
[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        G GATEWAY                  DISTANCE INTERFACE
 0 ADS  0.0.0.0/0                          r 212.93.97.200            1        ppp-amigo
 1 A S  10.0.0.0/24                        r 10.5.8.1                 1        ether1   
 2 ADC  10.5.8.0/24        10.5.8.169                                 0        ether1   
 3 A S  159.148.172.196/32                 r 10.5.8.1                 1        ether1   
 4 ADC  212.93.97.200/32   10.38.150.52                               0        ppp-amigo
[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, if you disable the ppp-client and run the "info" command:

[admin@rb411u] /interface ppp-client> info ppp-amigo 
            pin-status: "READY"
          manufacturer: "Option N.V."
                 model: "GTM378"
              revision: "2.3.3Hd (Date: Jul 17 2007, Time: 15:49:23)"
         serial-number: "356237010659249,S23977B6EM"
       activity-status: "ready"
  functionality-status: "minimum"
             gprs-mode: "A - HSDPA"
      current-operator: "Amigo"
          signal-level: "-87 dBm"

[admin@rb411u] /interface ppp-client> 


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.

Additional Resources

Huawei_EVDO WiKi Page with similar setup for a PCMCIA modem

Teltonika HomePage of the USB modem manufacturer