Table of Contents
Eyes and ears inside CorteXlab
In this tutorial we will use the gr-bokehgui module to have a time, frequency and spectrogram visualization of the signal transmitted in the platform in real time. We will not try to demodulate the signal, this is just a visualization tool.
Here, we will transmit an OFDM signal using the docker image you used for the previous tutorial. However you can replace it by any project of your own, we just need a signal to visualize.
Update your scenario
A running docker image with the gr-bokehgui module is available at
amauryparis/cxlb_bokehgui. You don't have to pull any image on your local computer to make changes to the project as in the previous tutorial.
As previously stated, we will use the OFDM transmission used in the first tutorial to have a signal to visualize.
Therefore you can find your OFDM scenario file, add a new node (here the 17) and set it to use the
amauryparis/cxlb_bokehgui image with an ssh access, as follow.
# Example scenario description file # # All lines starting with "#" and empty lines are ignored # Scenario textual description # simple string (a one liner) description: OFDM - Docker and Cortexlab # Experiment maximum duration # Time after which the experiment is forced to stop # integer (seconds) duration: 300 # Node list # # format: # # nodes: # (machine): # command: (entry point script relative to the task root) nodes: node14: container: - image: [YOUR DOCKER USERNAME]/[OFDM IMAGE NAME]:latest command: /usr/sbin/sshd -p 2222 -D node16: container: - image: [YOUR DOCKER USERNAME]/[OFDM NEW IMAGE NAME]:latest command: /usr/sbin/sshd -p 2222 -D node17: container: - image: amauryparis/cxlb_bokehgui command: /usr/sbin/sshd -p 2222 -D
You should directly modify the scenario file located on Airlock. You can access Airlock by using the following command :
you@yourpc:~$ ssh -X -v [-i path/to/the/key] firstname.lastname@example.org
You can now create and submit you task using
If you are unclear on how to do it and on the purpose of the scenario file, we recommend going back to the first tutorial.
Connect to the Bokehgui node
Once the task is running, we connect to the node with the bokehgui image directly from you local computer, not from the airlock server as for the OFDM node. This is because we need to forward the bokehgui data-stream directly from the node to your local computer. This command, to be run in another terminal, will connect you to the node and set up the jump through Airlock :
you@yourpc:~$ ssh -X -v [-i path/to/the/key -J email@example.com root@mnode17 -p 2222 -L localhost:5006:localhost:5006
On the node, you will find two files, the GRC flowgraph and the python executable of the project.
Remarq : The sample rate is set at 35kHz by default but can be modified by updating the python file using
apt. The same procedure can be used to change the default frequency and gain.
Now that the bokehgui flowgraph is running, you can access the visualization tool available at the following address on your local computer internet browser :
All time, frequency and waterfall visualization tool are now up and running. However, they are just displaying noise at this time.
Start the OFDM transmission
To start the OFDM transmission, you can access the OFDM node from airlock as follow :
username@srvairlock:~$ ssh -p 2222 root@mnode16
Then you can run the following command to start the OFDM transmitter flowgraph :
root@mnode16:~# ./examples/my_task/benchmark_tx.py --antenna="TX/RX" --tx-amplitude=0.2 -v -W 2M -f 2.49G
Visualize your signal
What's next ?
Congratulations, you can now visualize any signal transmitted within the CorteXlab platform ! Feel free to replace the OFDM transmission with your project…
Also, if the setup of the present bokehgui flowgraph doesn't suit your need, you can pull the docker image and upgrade it. You can also integrate bokehgui blocks to your existing project.
The gr-bokehgui library is available here.