Difference between revisions of "Option Globetrotter HSDPA USB Modem"

From MikroTik Wiki
Jump to: navigation, search
(Troubleshooting)
(Troubleshooting)
 
(28 intermediate revisions by 6 users not shown)
Line 1: Line 1:
''Document Revision 2009-04-21: RouterOS changes since V3.23''
+
''Document Revision 2009-10-28: RouterOS changes since V4.2''
  
 
== Introduction ==
 
== Introduction ==
Line 5: Line 5:
  
 
== Hardware ==
 
== Hardware ==
Router Hardware: MikroTik Router with USB port(s) (RB230, any x86 system, RB433UAH, or, RB411U)
+
USB Modem: Option N.V. Globetrotter HSDPA USB Modem H7.2
  
Router Software: RouterOS V3.x (works in v2.9.x as well). Configuration is changed since V3.23.
+
[[Image:img-3g-th.jpg]]
 +
Modem manufacturer: Teltonika, model number U3G150
  
USB Modem: Option N.V. Globetrotter HSDPA USB Modem H7.2
+
Router Hardware: MikroTik Router with USB port(s)
 +
(RB230, any x86 system, RB433UAH, or, RB411U)
 +
 
 +
[[Image:USB_Teltonika_rb411u.jpg]]
 +
 
 +
== Router Software ==
  
[[Image:img-3g-th.jpg]]
+
RouterOS V4.2. Works in previous versions 2.9 and 3, but slightly different configuration.
Manufacturer: Teltonika, model number U3G150
 
  
 
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:
Line 47: Line 52:
 
  OK
 
  OK
  
Disconnect from the modem:
+
Disconnect from the modem, by pressing "Ctrl-A", and then "Q":
 
  [Q - quit connection]      [B - send break]
 
  [Q - quit connection]      [B - send break]
 
  [A - send Ctrl-A prefix]  [R - autoconfigure rate]
 
  [A - send Ctrl-A prefix]  [R - autoconfigure rate]
Line 53: Line 58:
 
   
 
   
 
  Welcome back!
 
  Welcome back!
  [admin@rb433_USB_test] >
+
  [admin@rb411u] >
 +
 
 +
Setting AT command as "user-command" value can be useful for sending it from RouterOS scripts. Delay is required between RouterOS commands to send AT commands sequentially:
 +
<pre>
 +
[admin@rb411u] > /int ppp-client info ppp-out1 user-command=AT once do={:delay 1}
 +
</pre>
 +
 
 +
== Workaround for Globetrotter devices offering no modem interface ==
 +
[[File:Webnwalkstick.jpg|left]]
 +
 
 +
There is no guarantee that the commands above work on all the modems that need the HSO driver. The tested device was a T-Mobile branded Globetrotter iCON 225 "web'n'walk Stick". That device was able to connect without problems after the method described. Some Globetrotter HSDPA cards, for example the iCON 225 (branded as Orange, T-Mobile web'n'walk stick, etc. have the serial modem interface disabled by default, and only offer an NDIS network interface for the data connection. If a dial command is issued, but no CONNECT response happens from the modem, it might be helpful to check this. To check on the setting, issue:
 +
 
 +
<pre>
 +
[admin@MikroTik] > /system serial-terminal port=usb1 channel=0
 +
 
 +
[Ctrl-A is the prefix key]
 +
 
 +
 
 +
ATZ
 +
OK
 +
ATI0
 +
Manufacturer: Option N.V.
 +
Model: GlobeTrotter HSDPA Modem
 +
Revision: 2.5.24Hd (Date: Apr 17 2009, Time: 08:59:36)
 +
 
 +
OK
 +
AT_OIFC?
 +
_OIFC: 2,1,1,0
 +
 
 +
OK
 +
AT_OIFC=?
 +
 
 +
_OIFC: [2-3], [0,1], [1], [0-5]
 +
        mdm,  diag,  app1,  pcsc/gps
 +
MDM      (0: N/A)  (1: N/A) (2: ndis) (3: modem and ndis)
 +
DIAG    (0: none) (1: enable)
 +
APP1    (0: none) (1: enable)
 +
PCSC/GPS (0: none) (1: pcsc enable) (2: GPS enable) (3: app2 enable) (4: GPS & PCSC) (5: GPS & app2)
 +
OK
 +
 
 +
</pre>
 +
 
 +
In this example, the MDM (modem) interface is set to 2, so no serial modem interface is enabled in the device.
 +
 
 +
To change the setting, issue:
 +
 
 +
<pre>AT_OIFC=3,1,1,0</pre>
 +
 
 +
You should get: OK
 +
 
 +
To write the change permanently to the NVRAM of the device, issue:
 +
 
 +
<pre>AT&W</pre>
 +
 
 +
Unplug and re-plug the device, and issue:
 +
 
 +
<pre>
 +
[admin@MikroTik] > /port print
 +
Flags: I - inactive
 +
#  NAME                        CHANNELS USED-BY                    BAUD-RATE
 +
0  usb1                              4                            9600
 +
</pre>
 +
 
 +
Number of channels should have increased. On the tested device, the last channel is the modem-interface (number 3 in RouterOS).
 +
 
 +
According to [http://www.peck.org.uk/hso.html] the Linux HSO driver page at least five Option devices exist which  do not have the modem interface enabled by default.
  
 
== Router Configuration for PPP ==
 
== Router Configuration for PPP ==
Copy and paste the following text into the router console:
+
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:
+
 
  /ppp profile
+
  [admin@rb411u] > /interface ppp-client
add name="ppp-LMT" remote-address=212.93.97.200
+
  [admin@rb411u] /interface ppp-client> print
add name="ppp-Amigo" remote-address=212.93.97.200
+
  Flags: X - disabled, R - running
+
  0 X  name="ppp-out1" max-mtu=1500 max-mru=1500 mrru=disabled port=usb2  
  /interface ppp-client  
+
      data-channel=2 info-channel=2 apn="internet" pin="" user="" password=""  
  add name="ppp-lmt" modem-init="AT+CGDCONT=1,\"IP\",\"internet.lmt.lv\"" \
+
      profile=default phone="" dial-command="ATDT" modem-init=""  
    dial-command="ATDT" phone="*99***1#" profile=ppp-LMT \
+
      null-modem=no dial-on-demand=yes add-default-route=yes use-peer-dns=yes  
    user="" password="" \
+
      allow=pap,chap,mschap1,mschap2
    add-default-route=yes use-peer-dns=yes\
+
[admin@rb411u] /interface ppp-client> info 0
    port=usb2 command-channel=2 data-channel=2 info-channel=2\
+
 
    disabled=yes
+
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:
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).
+
[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>
  
Enable the ppp-amigo interface and watch the logs to see how the connection is being established over the USB modem:
+
After enabling the interface watch the logs to see how the connection is being established over the USB modem:
  
  15:56:39 system,info device changed by admin  
+
  [admin@rb411u] /interface ppp-client> /log print
  15:56:39 async,ppp,info ppp-amigo: reseting link...  
+
  12:29:16 async,ppp,info ppp-out1: initializing...  
  15:56:39 async,ppp,info ppp-amigo: disconnected
+
  12:29:16 async,ppp,info ppp-out1: reseting link...
  15:56:39 async,ppp,info ppp-amigo: initializing...
+
  12:29:16 system,info device changed by admin
  15:56:39 async,ppp,info ppp-amigo: reseting link...  
+
12:29:16 system,info dns changed
  15:56:40 async,ppp,info ppp-amigo: initializing modem...  
+
  12:29:17 async,ppp,info ppp-out1: initializing modem...  
  15:56:41 async,ppp,info ppp-amigo: dialing out...
+
  12:29:17 async,ppp,info ppp-out1: dialing out...  
  15:56:41 async,ppp,info ppp-amigo: authenticated
+
  12:29:17 async,ppp,info ppp-out1: authenticated
  15:56:43 async,ppp,info ppp-amigo: connected  
+
  12:29:20 async,ppp,info ppp-out1: could not determine remote address, using 10.112.112.119
  15:56:43 system,info dns changed  
+
  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:
 
The serial port is used by ppp client:
Line 96: Line 172:
 
   #  NAME                      CHANNELS  USED-BY                    BAUD-RATE
 
   #  NAME                      CHANNELS  USED-BY                    BAUD-RATE
 
   0  serial0                  1          Serial Console              auto     
 
   0  serial0                  1          Serial Console              auto     
   1  usb2                      3          PPP <ppp-amigo>            9600     
+
   1  usb2                      3          PPP <ppp-out1>            9600     
 
  [admin@rb411u] >  
 
  [admin@rb411u] >  
  
Check the addresses and routes! In our case we have:
+
Check the addresses, in our case we have:
  
  [admin@rb411u] > 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   10.5.8.169/24     10.5.8.0        10.5.8.255      ether1                        
+
   0 D 10.5.8.64/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                     
+
   1 D 10.40.192.214/32   10.112.112.119  0.0.0.0        ppp-out1                         
  [admin@rb411u] > ip route print  
+
  [admin@rb411u] >  
 +
 
 +
and routes:
 +
 
 +
[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 INTERFACE
+
   #      DST-ADDRESS        PREF-SRC        GATEWAY           DISTANCE
   0 ADS  0.0.0.0/0                          r 212.93.97.200            1       ppp-amigo
+
   0 ADS  0.0.0.0/0                          10.112.112.119    1      
   1 A S  10.0.0.0/24                        r 10.5.8.1                1        ether1 
+
   1 ADC  10.5.8.0/24        10.5.8.64      ether1            0      
  2 ADC  10.5.8.0/24        10.5.8.169                                0       ether1 
+
   2 ADC 10.112.112.119/32 10.40.192.214   ppp-out1          0     
   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] >  
 
  [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
 
+
failure: can't reuse channel while ppp-client running!
  [admin@rb411u] /interface ppp-client> info ppp-amigo
+
[admin@rb411u] /interface ppp-client> disable 0
            pin-status: "READY"
+
  [admin@rb411u] /interface ppp-client> info
          manufacturer: "Option N.V."
+
              status: "ready"
                  model: "GTM378"
+
          pin-status: "no password required"
              revision: "2.3.3Hd (Date: Jul 17 2007, Time: 15:49:23)"
+
      functionality: "minimum"
          serial-number: "356237010659249,S23977B6EM"
+
          gprs-class: "A - GPRS & GSM simultaneous"
        activity-status: "ready"
+
        manufacturer: "Option N.V."
   functionality-status: "minimum"
+
              model: "GTM378"
              gprs-mode: "A - HSDPA"
+
            revision: "2.3.3Hd (Date: Jul 17 2007, Time: 15:49:23)"
      current-operator: "Amigo"
+
      serial-number: "356237010662581,S23977B51N"
          signal-level: "-87 dBm"
+
    current-operator: "LV LMT GSM"
 +
   access-technology: "3G"
 +
      signal-strengh: -89
 
   
 
   
  [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 ==
+
== Modem Preferred Operation Settings ==
  
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.
+
OPTION modems can be set for preferred operation in UMTS(3G) or GPRS networks. To change the operation mode, use AT_OPSYS command via terminal, or, include it into the modem init string:
  
2. If the USB port settings are wrong, there would be log message when you try to run the ppp client:
+
  AT_OPSYS=0,2 Only GPRS
  00:08:50 async,ppp,info ppp-lmt: initializing...
+
  AT_OPSYS=1,2 Only UMTS(3g)
  00:08:50 async,ppp,info ppp-lmt: reseting link...
+
  AT_OPSYS=2,2 Prefer GPRS over UMTS(3G)
  00:08:50 async,ppp,info ppp-lmt: reseting link... - could not acquire serial port
+
  AT_OPSYS=3,2 Prefer UMTS(3G) over GPRS
  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:
+
Query the current _OPSYS setting using the AT_OPSYS? command:
  
  [admin@rb411u] > /system serial-terminal usb2 channel=2
+
  [admin@rb411u] > sys serial-terminal usb4 channel=0
 
   
 
   
 
  [Ctrl-A is the prefix key]
 
  [Ctrl-A is the prefix key]
 
   
 
   
 
   
 
   
  AT
+
  AT_OPSYS?
  OK
+
  _OPSYS: 3,2
AT+CSQ
 
+CSQ: 14,99
 
 
   
 
   
 
  OK
 
  OK
  
This must be okay, because the modem responds to your commands. Quit the serial terminal with "Ctrl-A" and "Q":
+
The _OPSYS operation mode setting stays intact after router reboot or power off/on. If you lock the modem operation setting to 3G only, the scan command won't show GPRS networks, and vice versa.
 +
 
 +
== Troubleshooting ==
 +
 
 +
{{ Note | RouterOS does not support memory slot like SD for USB modems. Use USB hub with USB modem and USB flash instead!".  }}
  
[Q - quit connection]      [B - send break]
+
; You do not get "authenticated" and "connected"
[A - send Ctrl-A prefix]  [R - autoconfigure rate]
+
: There is something wrong with your settings. Most likely, the ppp-client interface settings should be changed to match your provider's requirements.
 
 
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.
+
: If the data-channel setting is wrong, there will be no connection. The number of available channels is shown under the /port list, port numbers start with 0. Disable the interface and try another port number!
  
5. When interface ''ppp-client info 0'' returns OK in few section, wrong channel is used,
+
: Check if you can communicate with the modem by using the serial-terminal! Make sure the ppp-client is disabled!
  
<pre>
+
: 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.
/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: ""
 
</pre>
 
  
Change channels,
+
; Speed of the link is not what expected
<pre>
+
: It's possible that the modem has connected to GPRS network, not 3G. Use the "scan" command for list of available networks:
/interface ppp-client> set 0 command-channel=3 data-channel=3 info-channel=3
 
</pre>
 
Unless ''/interface  ppp-client'' info 0 returns,
 
  
<pre>
+
[admin@rb411u] /interface ppp-client> scan 0
/interface ppp-client> info 0
+
Flags: C - current, A - available, F - forbidden
            pin-status: "READY"
+
  OPERATOR                    CODE      ACCESS-TECHNOLOGY                  SIGNAL-STRENGH
           manufacturer: "Sierra Wireless, Inc."
+
C LV LMT GSM                  24701      GSM compact                        -65            
                 model: "C885"
+
A LV LMT GSM                 24701      3G                               
              revision: "J1_0_1_6AP C:/WS/FW/J1_0_1_6AP/MSM7200A/SRC/AMSS 2008/07/09 07:52:58"
+
F BITE LV                    24705      3G                               
        serial-number: "xxxxxxxxxxx"
+
F LV TELE2                    24702      GSM compact                       
      activity-status: "ready"
+
F LV TELE2                    24702      3G                               
  functionality-status: "minimum"
+
F BITE LV                    24705      GSM compact                       
            gprs-mode: "A - HSDPA"
+
-- [Q quit|D dump|C-z pause]
      current-operator: "AT&T@"
 
          signal-level: "-89 dBm"
 
</pre>
 
  
6. If you need to add multiple inits then it is possible by deviding them using ; character. Example:
+
; Multiple inits (multiline inits) are required
 +
: It is possible by dividing them using ; character. Example:
  
 
<pre>modem-init="AT+CGDCONT=5,\"IP\",\"internet.lmt.l\";AT+CGDCONT=6,\"IP\",\"internet.lmt.lv\";AT"</pre>
 
<pre>modem-init="AT+CGDCONT=5,\"IP\",\"internet.lmt.l\";AT+CGDCONT=6,\"IP\",\"internet.lmt.lv\";AT"</pre>
 +
 +
; Modem is not recognized after reboot (port becomes invalit)
 +
:  It is recomended to disable built-inf flash/cd drive. Here are some command for few modem brands:
 +
* ZTE modems: [http://www.3g-modem-wiki.com/page/ZTE+AT-commands <code>Read more>></code>]
 +
Disable:
 +
AT+ZCDRUN=8
 +
Enable:
 +
AT+ZCDRUN=9
 +
 +
* HUAWEI modems: [http://www.3g-modem-wiki.com/page/Huawei+AT-commands  <code>Read more>></code>]
 +
  AT^U2DIAG=256
 +
 +
; Huawei E3131 modem do not work with PPP interface
 +
: The Huawei modem might be in the HiLink mode and in order to work with the PPP the switch is needed. Go to this page where you have instructions how to do that: [http://blog.phoenixhaven.net/2012/09/11/huawei-e3131-disabling-hilink-and-turning-into-a-dialup-modem/]
 +
 +
; Sms sending is not working
 +
 +
#check port
 +
#check PIN
 +
#enable debug logging GSM, DEBUG
 +
#check log
 +
#create supout
 +
 +
; Sms receiving is not working
 +
#check port
 +
#check PIN
 +
#got delivery accounting sms ?
 +
#allowed-number is correct with country code prefix +XXX ?
 +
#secret matches ?
 +
#check sms store directly /sys serial usbX by issuing command at+cmgl=1 (lists all messages in message store)
 +
#enable debug logging GSM, DEBUG
 +
#check log
 +
#create supout
 +
 +
; PPP client is not working
 +
#check port
 +
#check PIN
 +
#dial-on-demand is set to no?
 +
#apn correct?
 +
#needs special modem-init (to handle PIN use at+cpin=XXXX) ?
 +
#enable debug logging with topics ASYNC, DEBUG
 +
#check log
 +
#create supout
 +
 +
; PPP info is not working
 +
#check port
 +
#uses same channel info-channel == data-channel (can't work while ppp-client is enabled) ?
 +
#enable debug logging with topics ASYNC, DEBUG
 +
#check log
 +
#create supout
 +
 +
; PPP info command reports functionality=minimum
 +
# use /system serial-terminal usbX channel=X and execute the at+cfun=1
 +
# ppp info command should report functionality=full
 +
# If after each reboot the functionality is in minimum state add the at+cfun=1 into the modem-init field
 +
 +
; After executing some AT commands the modem does not respond correctly or reports error values
 +
# resetting the modem functionality might solve the problem
 +
# use /system serial-terminal usbX channel=X
 +
# execute the at+cfun=0 command and wait few seconds and execute at+cfun=1
 +
 +
; Port is invalid or not working
 +
#unplug the modem
 +
#disable the ppp-client interface
 +
#reboot the router
 +
#plug in the modem and after 5s proceed to nex step
 +
#create supout
 +
 +
; Modem stops responding
 +
#upgrade the modem firmware and check if it solves the problem
 +
#create supout
 +
 +
=== Typical things to check===
 +
 +
To check port
 +
* port busy ? /port print (check used-by)
 +
* channel busy ? (two application can't use same channel)
 +
* is chosen channel working? check if you get any output /sys ser usbX channel=X with command ATI
 +
* port shown ? /port print
 +
* device shown ? /sys reso usb pr
 +
* create supout
 +
 +
To check PIN
 +
* /int ppp-client info CONNAME or run /sys serial usbX and issue at+cpin?
 +
* enter pin at+cpin=XXXX
 +
 +
To create supout
 +
* run /sys sup-output
 +
* contact support and provide supout file
  
 
== Additional Resources ==
 
== Additional Resources ==
Line 218: Line 368:
  
 
[[Category: Hardware]]
 
[[Category: Hardware]]
 +
[[Category: 3G]]

Latest revision as of 11:06, 4 March 2015

Document Revision 2009-10-28: RouterOS changes since V4.2

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

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

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

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

USB Teltonika rb411u.jpg

Router Software

RouterOS V4.2. Works in previous versions 2.9 and 3, but slightly different configuration.

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] >

Setting AT command as "user-command" value can be useful for sending it from RouterOS scripts. Delay is required between RouterOS commands to send AT commands sequentially:

[admin@rb411u] > /int ppp-client info ppp-out1 user-command=AT once do={:delay 1}

Workaround for Globetrotter devices offering no modem interface

Webnwalkstick.jpg

There is no guarantee that the commands above work on all the modems that need the HSO driver. The tested device was a T-Mobile branded Globetrotter iCON 225 "web'n'walk Stick". That device was able to connect without problems after the method described. Some Globetrotter HSDPA cards, for example the iCON 225 (branded as Orange, T-Mobile web'n'walk stick, etc. have the serial modem interface disabled by default, and only offer an NDIS network interface for the data connection. If a dial command is issued, but no CONNECT response happens from the modem, it might be helpful to check this. To check on the setting, issue:

[admin@MikroTik] > /system serial-terminal port=usb1 channel=0

[Ctrl-A is the prefix key]


ATZ
OK
ATI0
Manufacturer: Option N.V.
Model: GlobeTrotter HSDPA Modem
Revision: 2.5.24Hd (Date: Apr 17 2009, Time: 08:59:36)

OK
AT_OIFC?
_OIFC: 2,1,1,0

OK
AT_OIFC=?

_OIFC: [2-3], [0,1], [1], [0-5]
         mdm,  diag,  app1,  pcsc/gps
MDM      (0: N/A)  (1: N/A) (2: ndis) (3: modem and ndis) 
DIAG     (0: none) (1: enable)
APP1     (0: none) (1: enable)
PCSC/GPS (0: none) (1: pcsc enable) (2: GPS enable) (3: app2 enable) (4: GPS & PCSC) (5: GPS & app2)
OK

In this example, the MDM (modem) interface is set to 2, so no serial modem interface is enabled in the device.

To change the setting, issue:

AT_OIFC=3,1,1,0

You should get: OK

To write the change permanently to the NVRAM of the device, issue:

AT&W

Unplug and re-plug the device, and issue:

[admin@MikroTik] > /port print 
Flags: I - inactive 
 #   NAME                        CHANNELS USED-BY                     BAUD-RATE
 0   usb1                               4                             9600

Number of channels should have increased. On the tested device, the last channel is the modem-interface (number 3 in RouterOS).

According to [1] the Linux HSO driver page at least five Option devices exist which do not have the modem interface enabled by default.

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!

Modem Preferred Operation Settings

OPTION modems can be set for preferred operation in UMTS(3G) or GPRS networks. To change the operation mode, use AT_OPSYS command via terminal, or, include it into the modem init string:

AT_OPSYS=0,2 Only GPRS
AT_OPSYS=1,2 Only UMTS(3g)
AT_OPSYS=2,2 Prefer GPRS over UMTS(3G)
AT_OPSYS=3,2 Prefer UMTS(3G) over GPRS

Query the current _OPSYS setting using the AT_OPSYS? command:

[admin@rb411u] > sys serial-terminal usb4 channel=0

[Ctrl-A is the prefix key]


AT_OPSYS?
_OPSYS: 3,2

OK

The _OPSYS operation mode setting stays intact after router reboot or power off/on. If you lock the modem operation setting to 3G only, the scan command won't show GPRS networks, and vice versa.

Troubleshooting

Icon-note.png

Note: RouterOS does not support memory slot like SD for USB modems. Use USB hub with USB modem and USB flash instead!".


You do not get "authenticated" and "connected"
There is something wrong with your settings. Most likely, the ppp-client interface settings should be changed to match your provider's requirements.
If the data-channel setting is wrong, there will be no connection. The number of available channels is shown under the /port list, port numbers start with 0. Disable the interface and try another port number!
Check if you can communicate with the modem by using the serial-terminal! Make sure the ppp-client is disabled!
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.
Speed of the link is not what expected
It's possible that the modem has connected to GPRS network, not 3G. Use the "scan" command for list of available networks:
[admin@rb411u] /interface ppp-client> scan 0
Flags: C - current, A - available, F - forbidden 
  OPERATOR                    CODE       ACCESS-TECHNOLOGY                   SIGNAL-STRENGH
C LV LMT GSM                  24701      GSM compact                         -65           
A LV LMT GSM                  24701      3G                                 
F BITE LV                     24705      3G                                 
F LV TELE2                    24702      GSM compact                        
F LV TELE2                    24702      3G                                 
F BITE LV                     24705      GSM compact                        
-- [Q quit|D dump|C-z pause]
Multiple inits (multiline inits) are required
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"
Modem is not recognized after reboot (port becomes invalit)
It is recomended to disable built-inf flash/cd drive. Here are some command for few modem brands:

Disable:

AT+ZCDRUN=8

Enable:

AT+ZCDRUN=9
  AT^U2DIAG=256
Huawei E3131 modem do not work with PPP interface
The Huawei modem might be in the HiLink mode and in order to work with the PPP the switch is needed. Go to this page where you have instructions how to do that: [2]
Sms sending is not working
  1. check port
  2. check PIN
  3. enable debug logging GSM, DEBUG
  4. check log
  5. create supout
Sms receiving is not working
  1. check port
  2. check PIN
  3. got delivery accounting sms ?
  4. allowed-number is correct with country code prefix +XXX ?
  5. secret matches ?
  6. check sms store directly /sys serial usbX by issuing command at+cmgl=1 (lists all messages in message store)
  7. enable debug logging GSM, DEBUG
  8. check log
  9. create supout
PPP client is not working
  1. check port
  2. check PIN
  3. dial-on-demand is set to no?
  4. apn correct?
  5. needs special modem-init (to handle PIN use at+cpin=XXXX) ?
  6. enable debug logging with topics ASYNC, DEBUG
  7. check log
  8. create supout
PPP info is not working
  1. check port
  2. uses same channel info-channel == data-channel (can't work while ppp-client is enabled) ?
  3. enable debug logging with topics ASYNC, DEBUG
  4. check log
  5. create supout
PPP info command reports functionality=minimum
  1. use /system serial-terminal usbX channel=X and execute the at+cfun=1
  2. ppp info command should report functionality=full
  3. If after each reboot the functionality is in minimum state add the at+cfun=1 into the modem-init field
After executing some AT commands the modem does not respond correctly or reports error values
  1. resetting the modem functionality might solve the problem
  2. use /system serial-terminal usbX channel=X
  3. execute the at+cfun=0 command and wait few seconds and execute at+cfun=1
Port is invalid or not working
  1. unplug the modem
  2. disable the ppp-client interface
  3. reboot the router
  4. plug in the modem and after 5s proceed to nex step
  5. create supout
Modem stops responding
  1. upgrade the modem firmware and check if it solves the problem
  2. create supout

Typical things to check

To check port

  • port busy ? /port print (check used-by)
  • channel busy ? (two application can't use same channel)
  • is chosen channel working? check if you get any output /sys ser usbX channel=X with command ATI
  • port shown ? /port print
  • device shown ? /sys reso usb pr
  • create supout

To check PIN

  • /int ppp-client info CONNAME or run /sys serial usbX and issue at+cpin?
  • enter pin at+cpin=XXXX

To create supout

  • run /sys sup-output
  • contact support and provide supout file

Additional Resources

Huawei_EVDO WiKi Page with similar setup for a PCMCIA modem

Teltonika HomePage of the USB modem manufacturer