User Tools

Site Tools


lora_dynamic_phy_layer_example

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lora_dynamic_phy_layer_example [2021/06/23 18:58] aparislora_dynamic_phy_layer_example [2021/07/08 11:35] (current) pesteve
Line 1: Line 1:
-# GNU Radio benchmark example with docker+# GNU Radio LoRa PHY layer for MAC experimentation 
  
 This tutorial executes a LoRa transmission between a node and a gateway using docker in CorteXlab, transmitting dummy packets between them.  This tutorial executes a LoRa transmission between a node and a gateway using docker in CorteXlab, transmitting dummy packets between them. 
  
-It shows how to use the interface of a plug and play complete LoRa dynamic physical layer, that can be found inside the following [docker image](https://hub.docker.com/repository/docker/estevep/lora_dyn_phy-cxlb) or on this [GitHub repository](https://github.com/AmauryPARIS/LoRa_PHY_Cxlb/). It allows to connect any upper layer that will control the physical layer (message and parameters), and receive all the information it needs (SNR, message and noise energy levels, crc presence, coding rate, number of (corrected) errors...).+It shows how to use the interface of a plug and play complete LoRa dynamic physical layer, that can be found inside the following [docker image](https://hub.docker.com/repository/docker/amauryparis/cxlb_lora) or on this [GitHub repository](https://github.com/AmauryPARIS/LoRa_PHY_Cxlb/). It allows to connect any upper layer that will control the physical layer (message and parameters), and receive all the information it needs (SNR, message and noise energy levels, crc presence, coding rate, number of (corrected) errors...).
  
 This implementation stands on the original LoRa PHY version made by [[https://www.epfl.ch/labs/tcl/resources-and-sw/lora-phy/|EPFL]]. This implementation stands on the original LoRa PHY version made by [[https://www.epfl.ch/labs/tcl/resources-and-sw/lora-phy/|EPFL]].
Line 13: Line 13:
 ### Docker ### Docker
  
-In this tutorial, we will use the docker image available on [Dockerhub](https://hub.docker.com/repository/docker/estevep/lora_dyn_phy-cxlb), which includes the CorteXlab toolchain, alongside a [GitHub repository](https://github.com/AmauryPARIS/LoRa_PHY_Cxlb/) providing the LoRa physical layer properly configured and an upper layer example.+In this tutorial, we will use the docker image available on [Dockerhub](https://hub.docker.com/r/amauryparis/cxlb_lora), which includes the CorteXlab toolchain, alongside a [GitHub repository](https://github.com/AmauryPARIS/LoRa_PHY_Cxlb/) providing the LoRa physical layer properly configured and an upper layer example.
  
 Thanks to a docker image, it is possible to easily run on your local machine an environment suitable for CorteXlab, with gnuradio and needed software. Once your project is ready, you can use your upgraded docker image in the testbed. This will allow you to quickly transfer all of your project, files and environment, as in your local computer but to be used within the testbed on SDR nodes. Thanks to a docker image, it is possible to easily run on your local machine an environment suitable for CorteXlab, with gnuradio and needed software. Once your project is ready, you can use your upgraded docker image in the testbed. This will allow you to quickly transfer all of your project, files and environment, as in your local computer but to be used within the testbed on SDR nodes.
Line 51: Line 51:
   node14:   node14:
     container:     container:
-    - image: estevep/lora_dyn_phy-cxlb:latest+    - image: amauryparis/cxlb_lora:master
       command: /usr/sbin/sshd -p 2222 -D       command: /usr/sbin/sshd -p 2222 -D
  
   node16:   node16:
     container:     container:
-    - image: estevep/lora_dyn_phy-cxlb:latest+    - image: amauryparis/cxlb_lora:master
       command: /usr/sbin/sshd -p 2222 -D       command: /usr/sbin/sshd -p 2222 -D
 </code> </code>
Line 165: Line 165:
 :warning: Both `udp_BS.py` and `udp_Node.py` have to be run with python3, whereas `lora_dyn_node` has to be run with python2. :warning: Both `udp_BS.py` and `udp_Node.py` have to be run with python3, whereas `lora_dyn_node` has to be run with python2.
  
-Enter the following commands on the specified terminal to begin the experiment:+Open two terminals on each of the two nodes through SSH. The cortexlab node 14 will be used as the LoRa node and the cortexlab node 16 as the base station. Enter the following commands on the specified terminal to begin the experiment:
  
 <code> <code>
Line 189: Line 189:
 #### Send and receive messages #### Send and receive messages
  
-On the NODE.up terminal and the BS.up one, first choose your UDP TX and RX port. On CorteXlab using the default ports (6788 and 6790) for both the base station and the node will work since they are connected to different computers.+On the NODE.up terminal and the BS.up one, first choose your UDP TX and RX port. On CorteXlab use the default ports (6788 and 6790) for both the base station and the node will work since they are connected to different computers.
  
 Then enter one of the following keywords to change the corresponding parameter if needed on the NODE.up terminal. Then enter one of the following keywords to change the corresponding parameter if needed on the NODE.up terminal.
Line 350: Line 350:
 ## Customized experiment ## Customized experiment
  
-This experiment is quite basic, even though it demonstrates how to connect an upper layer to the dynamic LoRa physical layer and to change the physical layer parameter. The node only sends a message and waits for eternity for an acknoledgment of the base station. The purpose of the physical layer is to be used by more complex upper layers. +This experiment is quite basic, even though it demonstrates how to connect an upper layer to the dynamic LoRa physical layer and to change the physical layer parameter. The node only sends a message and waits for an acknoledgment of the base station. The purpose of the physical layer is to be used by more complex upper layers. 
  
 In this part, we will see how to modify the upper layer and redeploy it on CorteXlab. If you want to develop your own upper layer, you can refer to this tutorial to deploy it. In this part, we will see how to modify the upper layer and redeploy it on CorteXlab. If you want to develop your own upper layer, you can refer to this tutorial to deploy it.
Line 362: Line 362:
  
 <code> <code>
-you@yourpc:~$ docker pull estevep/lora_dyn_phy-cxlb +you@yourpc:~$ docker pull amauryparis/cxlb_lora:master 
-you@yourpc:~$ docker run -dti --net=host --expose 2222 --privileged [--name CONTAINER_NAME] lora_dyn_phy-cxlb+you@yourpc:~$ docker run -dti --net=host --expose 2222 --privileged [--name CONTAINER_NAME] amauryparis/cxlb_lora:master
 </code> </code>
  
Line 382: Line 382:
 #### Customize the UDP Base Station #### Customize the UDP Base Station
  
-Here, we will just add a simple functionnality to the base station. If the SNR is higher than a threshold, then the GTX of the BS will be reduced, and if it is lower than a second threshold, then the GTx will be augmented. +Here, we will just add a simple functionnality to the base station. If the SNR is higher than a threshold, then the transmission gain of the BS will be reduced, and if it is lower than a second threshold, then the gain will be augmented. 
  
 This simulates a simple logic behavior: if the receiving SNR is low, then the acknoledgment should be emitted with a high gain in order to be correctly received by the node. On the contrary, if the receiving SNR is very high, then there is no need to emit with a high gain. This simulates a simple logic behavior: if the receiving SNR is low, then the acknoledgment should be emitted with a high gain in order to be correctly received by the node. On the contrary, if the receiving SNR is very high, then there is no need to emit with a high gain.
Line 431: Line 431:
 ### Deploy the experiment on CorteXlab ### Deploy the experiment on CorteXlab
  
-In order to send this environment on CorteXlab, follow the same procedure as in subsections [[lora_dynamic_phy_layer_example#create_the_scenario|Create the scenario]] to [[lora_dynamic_phy_layer_example#setup|Setup]]. Just **change the docker image name in `scenario.yaml`** from `estevep/lora_dyn_phy-cxlb:latest` to `[DOCKER USERNAME]/[IMAGE NAME]`.+In order to send this environment on CorteXlab, follow the same procedure as in subsections [[lora_dynamic_phy_layer_example#create_the_scenario|Create the scenario]] to [[lora_dynamic_phy_layer_example#setup|Setup]]. Just **change the docker image name in `scenario.yaml`** from `amauryparis/cxlb_lora:master` to `[DOCKER USERNAME]/[IMAGE NAME]`.
  
 ### Results ### Results
Line 534: Line 534:
  
 Look at the answers in the other terminals: Look at the answers in the other terminals:
 +
 * NODE.phy * NODE.phy
  
lora_dynamic_phy_layer_example.1624467492.txt.gz · Last modified: 2021/06/23 18:58 by aparis

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki