| 1 | == COTS UE on ORBIT Node |
| 2 | |
| 3 | [[Include(Documentation/Short/Prereq)]] |
| 4 | |
| 5 | === Imaging === |
| 6 | The image used for this experiment is 'baseline.ndz'. In this tutorial we will use nodes equipped with Netgear AC341u LTE dongles. The basestation is Amarisoft running on Bsc03out. |
| 7 | |
| 8 | During a normal experiment using OMF, the following actions are scripted and automated. This is a look at the steps involved in something as simple as starting an LTE connection behind the scenes. |
| 9 | |
| 10 | You will run the following commands on node7-1, node1-7, and node19-3 in the Grid. |
| 11 | |
| 12 | After connecting to the grid console: |
| 13 | 1. {{{ omf load -i baseline.ndz -t node7-1.grid.orbit-lab.org }}} |
| 14 | 1. {{{ omf tell -a on -t node7-1.grid.orbit-lab.org }}} |
| 15 | 1. It will take roughly 60 seconds to come up. |
| 16 | 1. {{{ ssh root@node7-1.grid.orbit-lab.org }}} |
| 17 | |
| 18 | === Commands on the node === |
| 19 | |
| 20 | ==== Loading the driver ==== |
| 21 | |
| 22 | By Default Orbit nodes do not configure any wireless devices so the first thing, when manually configuring the device is to load the drivers; the following 2 lines will load the Sierra wireless Netgear LTE dongle:[[BR]] |
| 23 | {{{ |
| 24 | modprobe GobiSerial |
| 25 | modprobe GobiNet |
| 26 | }}} |
| 27 | |
| 28 | ==== Connecting to the device ==== |
| 29 | 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: |
| 30 | |
| 31 | {{{ minicom -D /dev/ttyUSB1 }}} |
| 32 | |
| 33 | ==== Managing the LTE connection ==== |
| 34 | |
| 35 | Once in minicom, one can issue series of commands to the LTE modem typically consisting of: |
| 36 | |
| 37 | a.) Configure modem for pass-through mode: |
| 38 | |
| 39 | {{{ AT!ippassthrough? }}} |
| 40 | |
| 41 | It should return '''1''' . If it does not, run the following commands: |
| 42 | 1. {{{ AT!ippassthrough=1 }}} |
| 43 | 1. {{{ AT!entercnd="A710" }}} |
| 44 | 1. {{{ AT!dxcfg=profile,Autoconnect,Never }}} |
| 45 | 1. {{{ AT!reset }}} |
| 46 | which will reset the modem. |
| 47 | |
| 48 | b.) |
| 49 | |
| 50 | {{{ AT!entercnd="A710" }}} |
| 51 | |
| 52 | You should see {{{ OK }}} |
| 53 | |
| 54 | c.) Connect to the basestation: |
| 55 | |
| 56 | {{{ AT!dxcfg=wwan,connect,11 }}} |
| 57 | |
| 58 | You should see {{{ OK }}} shortly followed by {{{ $QCRMCALL: 1, V4 }}} |
| 59 | |
| 60 | d.) Check the status of the connection: |
| 61 | |
| 62 | {{{ at!gstatus? }}} |
| 63 | |
| 64 | Will return a status like: |
| 65 | {{{ |
| 66 | at!gstatus? |
| 67 | !GSTATUS: |
| 68 | Current Time: 10049 Temperature: 42 |
| 69 | Bootup Time: 0 Mode: ONLINE |
| 70 | System mode: LTE PS state: Attached |
| 71 | LTE band: B25 LTE bw: 10 MHz |
| 72 | LTE Rx chan: 8365 LTE Tx chan: 26365 |
| 73 | EMM state: Registered Normal Service |
| 74 | RRC state: RRC Connected |
| 75 | IMS reg state: No Srv |
| 76 | |
| 77 | RSSI (dBm): -83 Tx Power: 0 |
| 78 | RSRP (dBm): -117 TAC: 0001 (1) |
| 79 | RSRQ (dB): -10 Cell ID: 01A2D001 (27447297) |
| 80 | SINR (dB): 1.6 |
| 81 | }}} |
| 82 | |
| 83 | The LTE link is established. Exit Minicom by **PRESSING** {{{ Ctrl+A followed by x}}}, then {{{enter}}} to select '''OK''' option. |
| 84 | |
| 85 | ==== Testing the connection ==== |
| 86 | |
| 87 | Once the modem is connected, IP address has to be assigned to the newly created Ethernet device (in this case '''eth2'''): |
| 88 | |
| 89 | {{{ dhcpcd eth2 }}} |
| 90 | |
| 91 | 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 node gets IP address, routing tables need to be set so that some of traffic through will go out over the newly established link e.g. to send all the traffic through LTE link: |
| 92 | |
| 93 | {{{ |
| 94 | route add default eth2 |
| 95 | }}} |
| 96 | |
| 97 | Once routing tables are adjusted, ICMP can be used to test connectivity with the default gateway: |
| 98 | {{{ ping 192.168.3.1 }}} |
| 99 | resulting in: |
| 100 | {{{ |
| 101 | root@node1-7:~# ping 192.168.3.1 |
| 102 | PING 192.168.3.1 (192.168.3.1) 56(84) bytes of data. |
| 103 | 64 bytes from 192.168.3.1: icmp_seq=1 ttl=64 time=44.9 ms |
| 104 | 64 bytes from 192.168.3.1: icmp_seq=2 ttl=64 time=42.8 ms |
| 105 | }}} |
| 106 | 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. |
| 107 | |
| 108 | ==== Reconnecting the client ==== |
| 109 | |
| 110 | Use minicom (or any other serial port program) to issue a set of AT commands to reset the connection. Commands are: |
| 111 | |
| 112 | {{{ |
| 113 | AT!reset |
| 114 | }}} |
| 115 | |
| 116 | (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) |
| 117 | |
| 118 | {{{ |
| 119 | AT!entercnd="A710" |
| 120 | AT!dxcfg=wwan,connect,11 |
| 121 | }}} |
| 122 | |
| 123 | The output should look like: |
| 124 | {{{ |
| 125 | root@node1-7:~# minicom -D /dev/ttyUSB1 |
| 126 | |
| 127 | Welcome to minicom 2.7 |
| 128 | |
| 129 | OPTIONS: I18n |
| 130 | Compiled on Jan 1 2014, 17:13:19. |
| 131 | Port /dev/ttyUSB1, 06:02:02 |
| 132 | |
| 133 | Press CTRL-A Z for help on special keys |
| 134 | |
| 135 | AT |
| 136 | OK |
| 137 | AT!reset |
| 138 | OK |
| 139 | AT!entercnd="A710" |
| 140 | OK |
| 141 | AT!dxcfg=wwan,connect,11 |
| 142 | OK |
| 143 | |
| 144 | $QCRMCALL: 1, V4 |
| 145 | at!gstatus? |
| 146 | !GSTATUS: gets the IP address, de |
| 147 | Current Time: 58 Temperature: 28 |
| 148 | Bootup Time: 6 Mode: ONLINE |
| 149 | System mode: LTE PS state: Attached |
| 150 | LTE band: B25 LTE bw: 10 MHz |
| 151 | LTE Rx chan: 8365 LTE Tx chan: 26365 |
| 152 | EMM state: Registered Normal Service |
| 153 | RRC state: RRC Connected |
| 154 | IMS reg state: No Srv |
| 155 | |
| 156 | RSSI (dBm): -69 Tx Power: -33 |
| 157 | RSRP (dBm): -90 TAC: 0001 (1) |
| 158 | RSRQ (dB): -5 Cell ID: 01A2D001 (27447297) |
| 159 | SINR (dB): 21.2 |
| 160 | |
| 161 | |
| 162 | OK |
| 163 | }}} |
| 164 | |
| 165 | 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: |
| 166 | |
| 167 | {{{ |
| 168 | root@node1-7:~# dhcpcd eth2 |
| 169 | err, eth2: dhcpcd already running on pid 2071 (/var/run/dhcpcd-eth2.pid) |
| 170 | root@node1-7:~# kill 2071 |
| 171 | root@node1-7:~# dhcpcd eth2 |
| 172 | root@node1-7:~# dhcpcd.sh: interface eth2 has been configured with new IP=192.168.3.2 |
| 173 | |
| 174 | root@node1-7:~# route add default eth2 |
| 175 | root@node1-7:~# |
| 176 | }}} |