== Basic LTE Tutorial == [[TOC(noheading, Tutorials/g0WmLTE*, depth=2)]] === 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 [wiki:Hardware/fDevices/dWide/341u Netgear AC341u LTE dongles] to connect to the same LTE basestation and then measure the throughput between them by runing iperf client and server. [[Include(Documentation/Short/Prereq)]] === Set up === For this tutorial, we will use node1-7 and node7-1 [[CollapsibleStart(Create grid reservation)]][[Include(Documentation/Short/CreateRes)]][[CollapsibleEnd]] [[CollapsibleStart(Login into reserved domain: '''ssh your_user_name@grid.orbit-lab.org''')]][[Include(Documentation/Short/Login)]][[CollapsibleEnd]] [[CollapsibleStart(Load an image on the nodes: '''omf load -i baseline.ndz -t node1-7, node7-1''')]] [[Include(Documentation/Short/LoadImage)]][[CollapsibleEnd]] [[CollapsibleStart(Turn on the nodes: '''omf tell -a on -t system:topo:imaged''')]] [[Include(Documentation/Short/TellOn)]][[CollapsibleEnd]] ==== 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:[[BR]] {{{ 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 }}} 1. {{{ AT!entercnd="A710" }}} 1. {{{ AT!dxcfg=profile,Autoconnect,Never }}} 1. {{{ 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, to remove the existing default route, run: {{{ip r del default}}} Then, we run a dhcp client on the new interface (in this case '''eth2'''). {{{dhcpcd 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:~# }}}