Changes between Version 13 and Version 14 of Tutorials/Wireless/Measurement Tool
- Timestamp:
- Sep 24, 2020, 11:15:34 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tutorials/Wireless/Measurement Tool
v13 v14 14 14 2. [UserGuide/CreateRes Create a resource reservation on sandbox 1] 15 15 3. [UserGuide/RemoteAccess/Console Login to your reserved domain.] 16 4. Load merif.ndz on your resource. [UserGuide/OmfQuickStart - this is done via OMF commands.]16 4. Load baseline-mobi.ndz on your resource. [UserGuide/OmfQuickStart - this is done via OMF commands.] 17 17 18 18 * After loading the image, if utilizing a network based SDR radio (ie. ethernet with IP address) then follow the instructions [https://wiki.cosmos-lab.org/wiki/tutorials/n310_usage here to configure the network interface and detect the radio.] … … 56 56 To use ''rx_multi_receive'' standalone on an experiment server we can using the following options 57 57 {{{#!shell-session 58 root@node:~/RX_MULTI_RECEIVE# ./rx_multi_receive --args=" type=x300" --nsamps 1024000 --freq 2440e6 --rate 100e6 --gain 15 --dilv58 root@node:~/RX_MULTI_RECEIVE# ./rx_multi_receive --args="resource=rio0,type=x300" --nsamps 1024000 --freq 2440e6 --rate 100e6 --gain 15 --dilv 59 59 }}} 60 60 61 61 || --args="addr0=10.10.23.5" || specifies the SDR's IP address. || 62 || --args=" type=x300" || if using Krypton radio. ||62 || --args="resource=rio0,type=x300" || if using Krypton radio. || 63 63 || --freq 2440e6 || sets the center freq || 64 64 || --rate 20e6 || sets sampling rate || … … 124 124 num_buff_ptrs = 1000 125 125 mdbp_idx = 1000 126 Writing FFT blocks into rx_multi_samples.sq3 @ 10.113.0.10:3003 126 127 127 Done! 128 128 … … 132 132 || --oml-id `hostname` || this identifies the source of the data being store || 133 133 || --oml-domain rx_samples || file name for the OML database || 134 || --oml-collect 10.113.0.10:3003 || network storage located on the console || 135 136 Rerun the application with these and we'll see a few additional lines of output at the end indicating a connection to the OML database server. 137 138 {{{#!shell-session 139 140 Writing FFT blocks into rx_multi_samples.sq3 @ 10.113.0.10:3003 134 || --oml-collect oml:3003 || network storage located on the console || 135 136 The full command to execute would be 137 {{{#!shell-session 138 root@node:~/RX_MULTI_RECEIVE# ./rx_multi_receive --args="resource=rio0,type=x300" --nsamps 1024000 --freq 2440e6 --rate 20e6 --gain 3 --dilv --oml-id `hostname` --oml-collect "oml:3003" --oml-domain rx_samples 139 }}} 140 141 Rerun the application with these options and we'll see a few additional lines of output at the end indicating a connection to the OML database server. 142 143 {{{#!shell-session 144 145 Writing FFT blocks into rx_samples.sq3 @ oml:3003 141 146 May 20 23:12:24 INFO OML Client 2.11.1rc-dirty [OMSPv5] Copyright 2007-2014, NICTA 142 147 INFO tcp:10.113.0.10:3003: Connected … … 146 151 147 152 === ''rx_multi_receive'' break down === 148 The source file for this application is in ~/RX_MULTI_RECEIVE/main.cpp. Without going into the details off c++ and the en itire contents of the source file, we'll make note of the following blocks of code:153 The source file for this application is in ~/RX_MULTI_RECEIVE/main.cpp. Without going into the details off c++ and the entire contents of the source file, we'll make note of the following blocks of code: 149 154 150 155 1. A handle to the radio is constructed and is used thoughout the source to make reference to the radio. … … 217 222 218 223 === Instrumenting ''rx_multi_receive'' application with OML === 219 4. Once the read buffer is completely populated, create andfft object to convert the time samples into frequency bins. FFT is take for every 1024 time samples and saved into another buffer.224 4. Once the read buffer is completely populated, create the fft object to convert the time samples into frequency bins. FFT is take for every 1024 time samples and saved into another buffer. 220 225 221 226 Inside this block, we create an object that performs 1024pt FFTs. … … 325 330 Display all the tables in the database. 326 331 {{{ 327 console> ./db_parse --file /var/lib/oml2/rx_ multi_samples.sq3 --showtables332 console> ./db_parse --file /var/lib/oml2/rx_samples.sq3 --showtables 328 333 329 334 name = _senders … … 331 336 name = _experiment_metadata 332 337 333 name = _mp__rx_ multi_samples338 name = _mp__rx_samples 334 339 335 340 Use following command to retrieve contents of table. 336 ./db_parse --file /var/lib/oml2/rx_ multi_samples.sq3 --exec "SELECT * FROM <table>"341 ./db_parse --file /var/lib/oml2/rx_samples.sq3 --exec "SELECT * FROM <table>" 337 342 338 343 To retrieve contents of the blob: 339 ./db_parse --file /var/lib/oml2/rx_ multi_samples.sq3 --blob2bin ch0_data.bin --ch 0 --table _mp__rx_multi_samples --key Bins344 ./db_parse --file /var/lib/oml2/rx_samples.sq3 --blob2bin ch0_data.bin --ch 0 --table _mp__rx_samples --key Bins 340 345 341 346 }}} … … 344 349 We can recover the contents of the FFT data for each channel and save them into a binary file for viewing in octave. 345 350 {{{#!shell-session 346 console:~$ ./db_parse --file /var/lib/oml2/rx_ multi_samples.sq3 --blob2bin ch0_data.bin --ch 0 --table _mp__rx_multi_samples --key351 console:~$ ./db_parse --file /var/lib/oml2/rx_samples.sq3 --blob2bin ch0_data.bin --ch 0 --table _mp__rx_samples --key 347 352 Bins 348 353 349 354 Executing query statement 350 select LENGTH(Bins),Bins from _mp__rx_ multi_samples where channel=0355 select LENGTH(Bins),Bins from _mp__rx_samples where channel=0 351 356 }}} 352 357 … … 354 359 {{{#!octave 355 360 octave> mag0 = fReadBinaryFile('ch0_data.bin','single'); 356 octave>mag0 = reshape(mag0, 1024, length(mag0)/1024);357 octave>image(mag0*1000)361 mag0 = reshape(mag0, 1024, length(mag0)/1024); 362 image(mag0*1000) 358 363 }}} 359 364