Changes between Version 14 and Version 15 of Tutorials/Wireless/Basic Usage
- Timestamp:
- Jan 7, 2020, 5:06:37 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Tutorials/Wireless/Basic Usage
v14 v15 192 192 }}} 193 193 194 === Run the application ===195 Download the application source code from the attachment section below. 194 === Configure and run the application === 195 Download the application source code from the attachment section below. 196 196 {{{ 197 197 root@sdr-console> wget https://wiki.cosmos-lab.org/raw-attachment/wiki/tutorials/basic_usage/spectrum_view.tar.gz 198 198 199 199 root@sdr-console> tar -zxvf spectrum_view.tar.gz 200 201 }}} 202 203 Please refer to the README file in SPECTRUM_VIEW directory for instructions on compiling and running the application. Before compiling the application, install and compile a few dependencies.200 root@sdr-console> cd SPECTRUM_VIEW 201 }}} 202 203 Please refer to the README file in SPECTRUM_VIEW directory for instructions on compiling and running the application. Before compiling install a few required libraries. 204 204 {{{ 205 205 root@sdr-console> apt update 206 206 root@sdr-console> apt-get -y install libboost-all-dev liblog4cxx-dev cmake libfftw3-dev libxml2-dev libpopt-dev libsqlite3-dev pkg-config libxml2-utils gnulib 207 208 root@sdr-console> git clone https://github.com/zaphoyd/websocketpp.git 209 root@sdr-console> pushd websocketpp 210 root@sdr-console> cmake . -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON 211 root@sdr-console> make -j 4 212 root@sdr-console> make install 213 root@sdr-console> popd 214 }}} 215 216 Now if all the dependencies installed successfully, compile application. 207 }}} 208 209 210 Now compile and make the websocket library. 211 {{{ 212 root@sdr-console> make websocket 213 }}} 214 215 Lastly compile the application - this will generate the executable ''app_read_sdr_samples'' that reads samples from the SDR. 217 216 {{{ 218 217 root@sdr-console> make 219 218 }}} 220 219 221 From within the ''SPECTRUM_VIEW'' directory make and run the application to read samples from the Krypton's radio. There are two channels inside the radio which are being read out but only the first channel is displayed. 220 221 Run the application - this will start a server that listens for commands to configure the radio and stream received spectrum samples. 222 222 {{{ 223 223 root@sdr-console> ./app_read_sdr_samples … … 227 227 }}} 228 228 229 In short the application runs a server listening for commands. Just to briefly demonstrate some functionality, open the spectrum_view.html file in a Chrome browser. 229 230 === Visualize spectrum samples === 231 Download the spectrum visualizer web client to your desktop. It is all in another zip file - ''spectrum_view.zip''. Unzip this folder and open ''spectrum_view.html'' in a Chrome browser. 230 232 231 233 When the viewer is first opened, the page display should be similar to the following 232 234 || [[Image(basic_usage_spectrum_view_1.png, width=500px)]] || 233 235 234 Ensure the localhost field is set to ''localhost:5002'' and the device type field is set to ''type=x300''. 235 236 Click the ''connect'' button once and a "WebSocket Connection" statement should be output by the application. 237 Now click on ''make'' to create a device handle. Finally click on ''submit'' to adjust the radio parameters and the ''Go'' button to display a short spectrum bandwidth. 238 239 Keep the default values for RATE, FREQ, GAIN and click on the HALTED button. This should display the spectrum if all went well. 236 237 ##Just to briefly demonstrate some functionality, open the spectrum_view.html file in a Chrome browser. 238 239 240 241 Ensure the localhost field is set to ''localhost:5002''. (Recall from the set up section to create a tunnel from localhost:5002 to sdr2-lg1.sb1.cosmos-lab.org:9002 since the ''app_read_sdr_samples'' application has a websock server listening on that host:port.) 242 Ensure the device type field is set to ''type=x300''. 243 244 245 Click the ''connect'' button once and a "Websocket Connection" statement should be output by the application. 246 Now click on ''make'' to create a device handle. 247 248 The RF radio parameters are already populated with default values for 2.4 GHz WIFI band. To view other active spectrum bands change the RATE, FREQ, GAIN fields to 249 250 || RF Parameter || value || description || 251 || RATE || 50e6 || Sampling rate || 252 || FREQ || 1925e6 || Center frequency || 253 || GAIN || 30 || Receive gain || 254 Then click on ''Submit'' to update the SDR. 255 256 Click on the ''Halted'' button to begin streaming samples from the radio to the browser. This should display the spectrum if all went well. 240 257 || [[Image(basic_usage_spectrum_view_2.png, width=500px)]] || 241 258