wiki:Tutorials/g0WmLTE/Tutorial3

Basic LTE Tutorial

Objective

This tutorial presents a simple example of manually connecting LTE UE device to LTE basestation. It will use two nodes in the main ORBIT grid equipped with Netgear AC341u LTE dongles to connect to the same LTE basestation and then measure the throughput between them by runing iperf client and server.

Prerequisites

This tutorial series assumes you have an ORBIT account, have scheduled a session on the ORBIT testbed, are familiar with SSH'ing into the testbed itself, and are familiar with the basics of running ORBIT experiments. If you have not done these things yet, you may wish to do so before taking a look at this slightly more advanced experiment. If you are unfamiliar with or are entirely new to ORBIT, you may wish to start here.

Set up

For this tutorial, we will use node1-7 and node7-1

Create grid reservation

Creating a Reservation

Before you can access the testbed, you need to make a reservation for a particular domain and get it approved by the reservation service.

First time users are highly encouraged to reserve time on a sandbox instead of the main grid, and start with the provided "Hello World" experiment.

Login into reserved domain: '''ssh your_user_name@grid.orbit-lab.org'''

Login into reserved domain

During your approved time slot, you will be able to ssh into the console of the respective domain. A console is a dedicated machine that allows access to all resources in that domain.

For example, to access the sandbox1:

yourhost>ssh username@console.sb1.orbit-lab.org

Using username "username".
Authenticating with public key "xxxxxxxxx"
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-36-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Mon Jan 28 20:25:50 EST 2013

  System load:  0.0               Processes:           93
  Usage of /:   2.7% of 69.43GB   Users logged in:     0
  Memory usage: 6%                IP address for eth0: 10.50.18.10
  Swap usage:   0%                IP address for eth1: 10.18.0.10

  Graph this data and manage this system at https://landscape.canonical.com/

9 packages can be updated.
0 updates are security updates.

|-----------------------------------------------------------------|
|                 *** For authorized use only ***                 |
| This system is for the use of authorized users only.  All users |
| are expected to comply with the "Acceptable Use Policy" availa- |
| ble at http://www.orbit-lab.org/AUP.html                        |
| Individuals using this computer system, are subject to having   |
| all of their activities on this system monitored and recorded   |
| by system personnel.                                            |
|                                                                 |
| Anyone using this system expressly consents to such monitoring  |
| and is advised that if such monitoring reveals possible         |
| evidence of criminal activity, system personnel may provide the |
| evidence of such monitoring to law enforcement officials.       |
|                                                                 |
| Email question, comments or problems to help@orbit-lab.org      |
|-----------------------------------------------------------------|

username@console.sb1:~$ 

Load an image on the nodes: '''omf load -i baseline.ndz -t node1-7 node7-1'''

Load an Image

  1. Before we begin using the nodes, it's a good idea to check their status first. This is done with the omf stat command.

    omf stat

    This omf command is used to display the power status of the node/domain.

    Usage: omf stat

    username@consoles.outdoor:omf stat
    Returns the status of the nodes in a testbed
    Usage:
          omf-5.4 stat [-h] [-s] [-t TOPOLOGY] [-c AGGREGATE]
     
          With: 
          -h, --help                print this help message
          -s, --summary             print a summary of the node status for the testbed
          -c, --config AGGREGATE    use testbed AGGREGATE
          -t, --topology TOPOLOGY   a valid topology file or description (defaults to 'system:topo:all')
     
          Some Examples: 
                        omf-5.4 stat
                        omf-5.4 stat -s
                        omf-5.4 stat -t omf.nicta.node1,omf.nicta.node2 -c sb1
                        omf-5.4 stat -t system:topo:all -c grid
    

    Individual nodes are identified in the output of stat command by their fully qualified domain name (FQDN). This establishes their "coordinates" and the "domain" to which they belong. Nodes in different domains typically can NOT see each other. Node can be in 1 of 3 states:

    POWEROFF Node is Available for use but turned off
    POWERON Node is Available and is on
    NOT REGISTERED Node is not Available for use

    Example: omf stat on the outdoor domain

    user@console.outdoor:~# omf stat -t all
    
     INFO NodeHandler: OMF Experiment Controller 5.4 (git 6d34264)
     INFO NodeHandler: Slice ID: default_slice (default)
     INFO NodeHandler: Experiment ID: default_slice-2012-10-14t14.42.15-04.00
     INFO NodeHandler: Message authentication is disabled
     INFO Experiment: load system:exp:stdlib
     INFO property.resetDelay: value = 210 (Fixnum)
     INFO property.resetTries: value = 1 (Fixnum)
     INFO Experiment: load system:exp:eventlib
     INFO Experiment: load system:exp:stat
     INFO Topology: Loading topology ''.
     INFO property.nodes: value = "system:topo:all" (String)
     INFO property.summary: value = false (FalseClass)
     INFO Topology: Loading topology 'system:topo:all'.
     Talking to the CMC service, please wait
    -----------------------------------------------
     Domain: outdoor.orbit-lab.org
     Node: node3-6.outdoor.orbit-lab.org   	 State: NOT REGISTERED
     Node: node3-3.outdoor.orbit-lab.org   	 State: POWEROFF
     Node: node2-10.outdoor.orbit-lab.org    State: POWEROFF
     Node: node1-10.outdoor.orbit-lab.org    State: POWEROFF
     Node: node1-8.outdoor.orbit-lab.org   	 State: POWERON
     Node: node1-6.outdoor.orbit-lab.org   	 State: POWERON
     Node: node3-2.outdoor.orbit-lab.org   	 State: POWEROFF
     Node: node3-1.outdoor.orbit-lab.org   	 State: POWEROFF
     Node: node1-3.outdoor.orbit-lab.org   	 State: POWERON
     Node: node3-5.outdoor.orbit-lab.org   	 State: POWEROFF
     Node: node2-5.outdoor.orbit-lab.org   	 State: NOT REGISTERED
     Node: node1-2.outdoor.orbit-lab.org   	 State: POWERON
    -----------------------------------------------
     INFO Experiment: Switching ON resources which are OFF
     INFO EXPERIMENT_DONE: Event triggered. Starting the associated tasks.
     INFO NodeHandler: 
     INFO NodeHandler: Shutting down experiment, please wait...
     INFO NodeHandler: 
     INFO run: Experiment default_slice-2012-10-14t14.42.15-04.00 finished after 0:6
    

  2. It is recommended that the node be in the POWEROFF state prior to any experiment process. If the node is in the POWERON state you can use the omf tell command to get the node into the off state.

    omf tell

    OMF command to control the power state/reset the nodes.

    Usage: omf tell

    user@console:omf tell
    Switch ON/OFF and reboot the nodes in a testbed
    Usage:
          omf tell [-h] -t TOPOLOGY -a ACTION [-c AGGREGATE]
     
          With: 
          -h, --help           print this help message
     
          -a, --action ACTION  specify an action
          ACTION:
          on              turn node(s) ON
          offs            turn node(s) OFF (soft)
          offh            turn node(s) OFF (hard)
          reboot          reboots node(s) (soft)
          reset           resets node(s) (hard)
     
          -h, --help                print this help message
          -t, --topology TOPOLOGY   a valid topology file or description (MANDATORY)
          -c, --config AGGREGATE    use testbed AGGREGATE
     
          Some Examples: 
                        omf tell -a reset -t node1-1.grid.orbit-lab.org
                        omf tell -a on -t system:topo:all -c grid
                        omf tell -a reboot -t node1-1
                        omf tell -a offh -t [1..2,1..5]
                        omf tell -a offh -t system:topo:all
                        omf tell -a reset -t system:topo:imaged
    

    The commands are: on, offh (equivalent to pulling out the power cord), offs (software shutdown), reboot (software reboot) and reset (hardware reset).

    Example: turn off node1-1 on the outdoor domain

    user@console.outdoor:~# omf tell -a offh -t node1-1
    
     INFO NodeHandler: OMF Experiment Controller 5.4 (git 3fb37b9)
     INFO NodeHandler: Reading configuration file /etc/omf-expctl-5.4/services.yaml
     INFO NodeHandler: Add domain http - http://internal1.orbit-lab.org:5054/
     INFO NodeHandler: Add domain http - http://repository1.orbit-lab.org:5054/
     INFO NodeHandler: Slice ID: default_slice (default)
     INFO NodeHandler: Experiment ID: default_slice-2014-09-30t00.24.28.504-04.00
     INFO NodeHandler: Message authentication is disabled
     INFO Experiment: load system:exp:stdlib
     INFO property.resetDelay: resetDelay = 230 (Fixnum)
     INFO property.resetTries: resetTries = 1 (Fixnum)
     INFO Experiment: load system:exp:eventlib
     INFO Experiment: load system:exp:winlib
     INFO Experiment: load system:exp:tell
     INFO property.nodes: nodes = "node1-1" (String)
     INFO property.command: command = "offh" (String)
    
    Talking to the CMC service, please wait
    -----------------------------------------------
     Node: node1-1.outdoor.orbit-lab.org   	 Reply: OK
    -----------------------------------------------
    
     INFO EXPERIMENT_DONE: Event triggered. Starting the associated tasks.
     INFO NodeHandler: 
     INFO NodeHandler: Shutting down experiment, please wait...
     INFO NodeHandler: 
     INFO run: Experiment default_slice-2014-09-30t00.24.28.504-04.00 finished after 0:10
    

  3. Once node set is on an POWEROFF state, load an image with omf load command

    omf load

    Load command is used to put an image onto the hard disk of the node.

    Usage: omf load

    Install a given disk image on the nodes in a testbed
    Usage:
          omf-5.4 load [-h] [-i IMAGE_PATH] [-o TIMEOUT] [-t TOPOLOGY] [-c AGGREGATE]
     
          With: 
          -h, --help                print this help message
          -c, --config AGGREGATE    use testbed AGGREGATE
          -t, --topology TOPOLOGY   a valid topology file or description (defaults to 'system:topo:all')
                                    (if a file 'TOPOLOGY' doesn't exist, interpret it as a comma-separated list of nodes)
          -i, --image IMAGE         disk image to load
                                    (default is 'baseline.ndz', the latest stable baseline image)
          -o, --timeout TIMEOUT     a duration (in sec.) after which imageNodes should stop waiting for
                                    nodes that have not finished their image installation
                                    (default is 800 sec, i.e. 13min 20sec)
              --outpath PATH        Path where the resulting Topologies should be saved
                                    (default is '/tmp')
              --outprefix PREFIX    Prefix to use for naming the resulting Topologies
                                    (default is your experiment ID)
     
          Some Examples: 
                        omf-5.4 load
                        omf-5.4 load -t system:topo:all -i baseline-2.4.ndz
                        omf-5.4 load -t omf.nicta.node1 -i wireless-2.6.ndz
                        omf-5.4 load -t omf.nicta.node1,omf.nicta.node2 -i baseline.ndz -o 400
                        omf-5.4 load -t system:topo:circle -i my_Own_Image.ndz
                        omf-5.4 load -t my_Own_Topology -i baseline-2.2.ndz -t 600 -c grid
                        omf-5.4 load -t my_Own_Topology --outpath ./ --outprefix my_Own_Prefix
    

    Two important arguments are TOPOLOGY describing the set of nodes one wishes to image , and !IMAGE specifying the name of the image one wants to load the nodes with. If the imaging process does not does not finish within the default timeout period, that period can be increase by using the -o flag (e.g. -o 1600). Typical command to load both nodes of sandbox 1 with the baseline image would look like:

    Example: omf load-i baseline.ndz -t node1-1

    username@console.sb3:~$ omf load -i baseline.ndz -t node1-1
    
    DEBUG FQDN:console.sb3.orbit-lab.org:
     INFO NodeHandler: OMF Experiment Controller 5.4 (git 861d645)
     INFO NodeHandler: Reading configuration file /etc/omf-expctl-5.4/services.yaml
     INFO NodeHandler: Add domain http - http://internal1.orbit-lab.org:5054/
     INFO NodeHandler: Add domain http - http://repository1.orbit-lab.org:5054/
     INFO NodeHandler: Add domain http - http://external1.orbit-lab.org:5054/
     INFO NodeHandler: Slice ID: pxe_slice
     INFO NodeHandler: Experiment ID: pxe_slice-2018-08-08t13.41.37.814-04.00
     INFO NodeHandler: Message authentication is disabled
     INFO Experiment: load system:exp:stdlib
     INFO property.resetDelay: resetDelay = 230 (Fixnum)
     INFO property.resetTries: resetTries = 1 (Fixnum)
     INFO Experiment: load system:exp:eventlib
     INFO Experiment: load system:exp:winlib
     INFO Experiment: load system:exp:imageNode
     INFO property.nodes: nodes = "node1-1" (String)
     INFO property.image: image = "baseline.ndz" (String)
     INFO property.domain: domain = "sb3.orbit-lab.org" (String)
     INFO property.outpath: outpath = "/tmp" (String)
     INFO property.outprefix: outprefix = "pxe_slice-2018-08-08t13.41.37.814-04.00" (String)
     INFO property.timeout: timeout = 800 (Fixnum)
     INFO property.resize: resize = nil (NilClass)
     INFO Topology: Loaded topology 'system:topo:registered'.
     INFO property.resetDelay: resetDelay = 100 (Fixnum)
     INFO Experiment: Resetting resources
     INFO stdlib: Waiting for nodes (Up/Down/Total): 0/1/1 - (still down: node1-1.sb3.orbit-lab.org) [0 sec.]
     INFO stdlib: Waiting for nodes (Up/Down/Total): 0/1/1 - (still down: node1-1.sb3.orbit-lab.org) [10 sec.]
     INFO stdlib: Waiting for nodes (Up/Down/Total): 0/1/1 - (still down: node1-1.sb3.orbit-lab.org) [20 sec.]
     INFO stdlib: Waiting for nodes (Up/Down/Total): 0/1/1 - (still down: node1-1.sb3.orbit-lab.org) [30 sec.]
     INFO stdlib: Waiting for nodes (Up/Down/Total): 0/1/1 - (still down: node1-1.sb3.orbit-lab.org) [40 sec.]
     INFO stdlib: Waiting for nodes (Up/Down/Total): 0/1/1 - (still down: node1-1.sb3.orbit-lab.org) [50 sec.]
     INFO exp: Progress(0/0/1): 0/0/0 min(node1-1.sb3.orbit-lab.org)/avg/max (59) - Timeout: 790 sec.
     INFO ALL_UP: Event triggered. Starting the associated tasks.
     INFO BRING_UP: Event triggered. Starting the associated tasks.
     INFO Experiment: Bringing up resources
     INFO exp: Progress(0/0/1): 50/50/50 min(node1-1.sb3.orbit-lab.org)/avg/max (59) - Timeout: 780 sec.
     INFO exp: Progress(0/0/1): 80/80/80 min(node1-1.sb3.orbit-lab.org)/avg/max (59) - Timeout: 770 sec.
     INFO exp: Progress(1/0/1): 100/100/100 min()/avg/max (59) - Timeout: 760 sec.
     INFO exp:  -----------------------------
     INFO exp:  Imaging Process Done
     INFO exp:  1 node successfully imaged - Topology saved in '/tmp/pxe_slice-2018-08-08t13.41.37.814-04.00-topo-success.rb'
     INFO exp:  -----------------------------
     INFO EXPERIMENT_DONE: Event triggered. Starting the associated tasks.
     INFO NodeHandler:
     INFO NodeHandler: Shutting down experiment, please wait...
     INFO NodeHandler:
     INFO NodeHandler: Shutdown flag is set - Turning Off the resources
     INFO run: Experiment pxe_slice-2018-08-08t13.41.37.814-04.00 finished after 1:44
    
    

    If the node is in the NOT REGISTERED state, you may need to wait for it to recover the POWEROFF state (it some times requires a few moments for the services to sync up). If the node takes more than 60 seconds to come out of the NODE NOT AVAILABLE state please report it to an administrator.

Turn on the nodes: '''omf tell -a on -t system:topo:imaged'''

Turn the Nodes ON

To turn the nodes on use omf tell command:

omf tell

OMF command to control the power state/reset the nodes.

Usage: omf tell

user@console:omf tell
Switch ON/OFF and reboot the nodes in a testbed
Usage:
      omf tell [-h] -t TOPOLOGY -a ACTION [-c AGGREGATE]
 
      With: 
      -h, --help           print this help message
 
      -a, --action ACTION  specify an action
      ACTION:
      on              turn node(s) ON
      offs            turn node(s) OFF (soft)
      offh            turn node(s) OFF (hard)
      reboot          reboots node(s) (soft)
      reset           resets node(s) (hard)
 
      -h, --help                print this help message
      -t, --topology TOPOLOGY   a valid topology file or description (MANDATORY)
      -c, --config AGGREGATE    use testbed AGGREGATE
 
      Some Examples: 
                    omf tell -a reset -t node1-1.grid.orbit-lab.org
                    omf tell -a on -t system:topo:all -c grid
                    omf tell -a reboot -t node1-1
                    omf tell -a offh -t [1..2,1..5]
                    omf tell -a offh -t system:topo:all
                    omf tell -a reset -t system:topo:imaged

The commands are: on, offh (equivalent to pulling out the power cord), offs (software shutdown), reboot (software reboot) and reset (hardware reset).

Example: turn off node1-1 on the outdoor domain

user@console.outdoor:~# omf tell -a offh -t node1-1

 INFO NodeHandler: OMF Experiment Controller 5.4 (git 3fb37b9)
 INFO NodeHandler: Reading configuration file /etc/omf-expctl-5.4/services.yaml
 INFO NodeHandler: Add domain http - http://internal1.orbit-lab.org:5054/
 INFO NodeHandler: Add domain http - http://repository1.orbit-lab.org:5054/
 INFO NodeHandler: Slice ID: default_slice (default)
 INFO NodeHandler: Experiment ID: default_slice-2014-09-30t00.24.28.504-04.00
 INFO NodeHandler: Message authentication is disabled
 INFO Experiment: load system:exp:stdlib
 INFO property.resetDelay: resetDelay = 230 (Fixnum)
 INFO property.resetTries: resetTries = 1 (Fixnum)
 INFO Experiment: load system:exp:eventlib
 INFO Experiment: load system:exp:winlib
 INFO Experiment: load system:exp:tell
 INFO property.nodes: nodes = "node1-1" (String)
 INFO property.command: command = "offh" (String)

Talking to the CMC service, please wait
-----------------------------------------------
 Node: node1-1.outdoor.orbit-lab.org   	 Reply: OK
-----------------------------------------------

 INFO EXPERIMENT_DONE: Event triggered. Starting the associated tasks.
 INFO NodeHandler: 
 INFO NodeHandler: Shutting down experiment, please wait...
 INFO NodeHandler: 
 INFO run: Experiment default_slice-2014-09-30t00.24.28.504-04.00 finished after 0:10

Turn on the Aisrpsan basestation

From the grid console: Make sure that the Airspan basestation is on and all the other TDD LTE basestations are off by using bastation control aggregate manager REST calls,

curl mme-am.orbit-lab.org:5054/bscontrol/bs/1/stop
curl mme-am.orbit-lab.org:5054/bscontrol/bs/2/start

Connect to the node

Wait for nodes to boot up (30-40 seconds) and then ssh into them (don;t forget that, in case of baseline image, you are accessing nodes as 'root' user without password e.g.:

ssh root@node1-7

Loading the driver

By default in the baseline ORBIT image does not enable any wireless devices. Therefore, the first thing when manually configuring the device is to load drivers; the following 2 lines will load the Sierra wireless Netgear LTE dongle drivers:

modprobe GobiSerial
modprobe GobiNet

Connecting to the device

Control of the device is done over the serial port that is created by the driver (in this case /dev/ttyUSB1) through a sequence of AT commands and you can use your favorite serial port communication program to talk to it; in this tutorial we will use Minicom. To start to program execute:

minicom -D /dev/ttyUSB1

Managing the LTE connection

Once in minicom, one can issue series of commands to the LTE modem typically consisting of:

a.) Configure modem for pass-through mode:

AT!ippassthrough?

It should return 1 . If it does not, run the following commands:

  1. AT!ippassthrough=1
  2. AT!entercnd="A710"
  3. AT!dxcfg=profile,Autoconnect,Never
  4. AT!reset

which will reset the modem.

b.)

AT!entercnd="A710"

You should see OK

c.) Connect to the basestation:

AT!dxcfg=wwan,connect,11

You should see OK shortly followed by $QCRMCALL: 1, V4

d.) Check the status of the connection:

at!gstatus?

Will return a status like:

at!gstatus?                                                                                                         
!GSTATUS: 
Current Time:  10049            Temperature: 42
Bootup Time:   0                Mode:        ONLINE         
System mode:   LTE              PS state:    Attached     
LTE band:      B25              LTE bw:      10 MHz  
LTE Rx chan:   8365             LTE Tx chan: 26365
EMM state:     Registered       Normal Service 
RRC state:     RRC Connected  
IMS reg state: No Srv  

RSSI (dBm):    -83              Tx Power:    0
RSRP (dBm):    -117             TAC:         0001 (1)
RSRQ (dB):     -10              Cell ID:     01A2D001 (27447297)
SINR (dB):      1.6

The LTE link is established. Exit Minicom by PRESSING Ctrl+A followed by x, then enter to select OK option.

Testing the connection

Once the modem is connected, we need to fix the default routing to use the new LTE link, as well as assign an address. First, we run a dhcp client on the new interface (in this case eth2). dhcpcd eth2

Then, add a broader route. ip r add 192.168.3.0/24 dev eth2

The node should get an address in the 192.168.3.0/24 subnet (any existing dhcpd instance on eth2 has to be killed).

Once routing tables are adjusted, ICMP can be used to test connectivity with the default gateway: ping 192.168.3.1 resulting in:

root@node1-7:~# ping 192.168.3.1
PING 192.168.3.1 (192.168.3.1) 56(84) bytes of data.
64 bytes from 192.168.3.1: icmp_seq=1 ttl=64 time=44.9 ms
64 bytes from 192.168.3.1: icmp_seq=2 ttl=64 time=42.8 ms

The ping can be canceled with Ctrl+C. More elaborate link performance test can be done by using iperf between multiple nodes that are connected to the basestation.

Reconnecting the client

Use minicom (or any other serial port program) to issue a set of AT commands to reset the connection. Commands are:

AT!reset

(NOTE: after the AT!reset command the minicom will display the popup window that the connection was lost- one has to wait for the pop-up to go away before proceeding)

AT!entercnd="A710"
AT!dxcfg=wwan,connect,11

The output should look like:

root@node1-7:~# minicom -D /dev/ttyUSB1

Welcome to minicom 2.7

OPTIONS: I18n 
Compiled on Jan  1 2014, 17:13:19.
Port /dev/ttyUSB1, 06:02:02

Press CTRL-A Z for help on special keys                 
                                                        
AT                                                       
OK                                                      
AT!reset                                                
OK
AT!entercnd="A710"
OK
AT!dxcfg=wwan,connect,11
OK

$QCRMCALL: 1, V4
at!gstatus?
!GSTATUS: gets the IP address, de
Current Time:  58               Temperature: 28      
Bootup Time:   6                Mode:        ONLINE         
System mode:   LTE              PS state:    Attached                           
LTE band:      B25              LTE bw:      10 MHz                             
LTE Rx chan:   8365             LTE Tx chan: 26365                              
EMM state:     Registered       Normal Service                                  
RRC state:     RRC Connected                                                    
IMS reg state: No Srv                                                           
                                                                                
RSSI (dBm):    -69              Tx Power:    -33                                
RSRP (dBm):    -90              TAC:         0001 (1)                           
RSRQ (dB):     -5               Cell ID:     01A2D001 (27447297)                
SINR (dB):     21.2                                                             
                                                                                
                                                                                
OK                                                                             

Once connection is reset, dhcp lease needs to be renewed and new default route added again; if there is already dhcpd session it needs to be terminated:

root@node1-7:~# dhcpcd eth2
err, eth2: dhcpcd already running on pid 2071 (/var/run/dhcpcd-eth2.pid)
root@node1-7:~# kill 2071
root@node1-7:~# dhcpcd eth2
root@node1-7:~# dhcpcd.sh: interface eth2 has been configured with new IP=192.168.3.2

root@node1-7:~# route add default eth2
root@node1-7:~# 
Last modified 7 years ago Last modified on Feb 13, 2018, 7:40:58 PM
Note: See TracWiki for help on using the wiki.