Changes between Version 2 and Version 3 of Tutorials/Wireless/Outdoor Spectrum Usage
- Timestamp:
- Jun 4, 2020, 5:37:22 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tutorials/Wireless/Outdoor Spectrum Usage
v2 v3 102 102 103 103 Keep track of these two terminals. The sdr application will output text as it detected the radios on both transmitter and receiver. When both radios are ready, output similar to the following is shown 104 {{{ 104 {{{#!shell-session 105 105 : 106 106 Number mboards = 1 … … 165 165 166 166 On the transmit side the output should have rows of ''INFO'' statements similar to the following. 167 {{{ 167 {{{#!shell-session 168 168 : 169 169 [INFO] [tx_data_link_0] [sent] seq_num: 62 pkt_len: 29 … … 182 182 183 183 On the receive side a similar output is expected 184 {{{ 184 {{{#!shell-session 185 185 : 186 186 [INFO] [rx_data_link_0] [rcvd] pkt: OK seq_num: 55 pkt_len: 18 corr_strength: 18131.3 … … 204 204 {{{#!shell-session 205 205 user@console:~$ curl "am1.cosmos-lab.org:5054/rf_control/set_tx_path?node=sdr2-s3-lg1.bed.cosmos-lab.org&rf_port=0&power_amp=off" 206 <response status="OK"> 207 <message>OK</message> 208 </response> 206 209 }}} 207 210 208 211 11. Execute the run script again and verify that no packets are received. The transmitters output will show the radio trying to send packets but since the power amplifier is turned on nothing is actually sent over the air. On the receiving end, the radio will still listen for packets however the summary should show 0 packets received. 209 {{{ 212 {{{#!shell-session 210 213 : 211 214 [INFO] [rx_data_link_0] Receive complete - summary: … … 219 222 ==== Run script details ==== 220 223 View the run_data_script.sh file. A python script is used to remotely configure the sdr application on both the receiving and transmitting side from the console. 221 {{{#!shell -session224 {{{#!shell 222 225 user@console:~$ cat run_data_script.sh 226 ## DESCRIPTION 227 ## Performs one way data transfer over the air using x310 USRPS. 228 ## sdrapp daemon must be running on the nodes specified under CONFIGURABLES. 229 230 ## Python is used to script the sequence of commands issued to the sdrapp daemon. 231 ## Usage: 232 ## python rc.py <MACHINE_NAME> <PORT> <sdrapp sub-command> 233 ## 234 ## <MACHINE_NAME> is hostname of machine running sdrapp daemon 235 ## <PORT> command listening port 236 ## Format of python sub-commands are described below. 237 ## Sub-commands have a companion handler in the sdrapp daemon. 238 239 ## Note: This script can be run multiple times while sdrapp is running. 240 ## However this is subject to the following known gotchas: 241 ## 1) if the <rate> parameter is changed in the set up section 242 ## then the sdrapp must be restarted. 243 ## 2) when rerunning this script the running handlers in sdrapp 244 ## must finish and exit first. 245 246 223 247 }}} 224 248 225 249 The ''CONFIGURABLES'' section must have the target node variables pointing at the appropriate devices: 226 {{{ 250 {{{#!shell 227 251 ## CONFIGURABLES 228 252 export TXNODE=sdr2-s3-lg1.bed.cosmos-lab.org … … 231 255 232 256 The radio parameters are set up with the following lines. 233 {{{ 257 {{{#!shell 234 258 ## SET UP RADIO PORTION HERE 235 259 ## Script is set up for x310 which has 2 daughter cards hence 2 channels: {0,1} … … 254 278 255 279 After the set up is done, the sdr applications begin streaming data. The receiving end is started first with the specified runtime of 20 seconds. At the same time the transmitting end starts sending packets for 20 seconds at intervals of 250 milliseconds. 256 {{{ 280 {{{#!shell 257 281 ## BEGIN data transfer 258 282 ## Invoke receive handler … … 265 289 python rc.py $TXNODE 5180 "txsig_data 20000 250" 266 290 267 }}} 268 269 270 In the [next part of this tutorial] we'll add onto the receiving sdr application and recording measured data into InfluxDb. 271 291 echo "DONE!" 292 }}} 293 294 After the run script initiates the receive and transmitter handlers on the sdr applications, the script will exit out back to the console but the sdr application handlers should be running for the specified run times. This script can be rerun only after the handlers exit. 295 296 297 In the [next part of this tutorial] we'll edit the the receiving sdr application to store measured data to a remote network Influx database. 298