<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://doc.lab.cityofthings.eu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dvdakker</id>
	<title>CityLab Testbed - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://doc.lab.cityofthings.eu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dvdakker"/>
	<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/wiki/Special:Contributions/Dvdakker"/>
	<updated>2026-05-03T16:22:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Usage_Policy&amp;diff=382</id>
		<title>Usage Policy</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Usage_Policy&amp;diff=382"/>
		<updated>2025-07-28T09:51:31Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Firewall Policy */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Experimenters must comply with the [https://www.fed4fire.eu/terms/ Fed4Fire Umbrella Terms and Conditions] when running experiments on the CityLab Testbed. &lt;br /&gt;
We&#039;re currently also working on the &#039;&#039;Local Terms and Conditions&#039;&#039; for the CityLab testbed. Once these have been finalized, experimenters will be required to comply with these terms and conditions as well. In the meantime, we ask all experimenters to effectively &#039;&#039;behave nicely&#039;&#039; and use &#039;&#039;caution&#039;&#039; and &#039;&#039;common sense&#039;&#039; when running experiments. &lt;br /&gt;
&lt;br /&gt;
The main thing to keep in mind is that in contrast to, for example [http://doc.ilabt.iminds.be/ilabt-documentation/wilabfacility.html w.iLab-2], the CityLab testbed is &#039;&#039;not&#039;&#039; deployed in a fully-isolated &#039;&#039;playground&#039;&#039;-environment. Instead, the testbed is deployed in an &#039;&#039;outdoor&#039;&#039; city-environment surrounded by wireless devices operating in the same frequency bands using the same wireless technologies. This basically means that when you run experiments on the CityLab testbed you are running them in an &#039;&#039;uncontrolled&#039;&#039; and possibly &#039;&#039;hostile&#039;&#039; environment. People for instance love connecting to unsecured WiFi access points and there are plenty of amateur-radio enthusiasts around that love tinkering with [https://www.gnuradio.org/ GNU Radio] and a [https://www.rtl-sdr.com/about-rtl-sdr/ hacked DVB-T dongle]. You should therefore take the necessary precautions (e.g.: secure your access points) to prevent people from gaining unauthorized access to the CityLab testbed infrastructure. &lt;br /&gt;
&lt;br /&gt;
To help you along the remainder of this page outlines some of the things to take into account when doing your experiments. If things are not 100% clear or you have a question about this, please don&#039;t hesitate to contact us at {{SafeMailTo|admin|lab.cityofthings.eu}}.&lt;br /&gt;
&lt;br /&gt;
== Regulatory Requirements ==&lt;br /&gt;
&lt;br /&gt;
Since the CityLab testbed is deployed &#039;&#039;outdoors&#039;&#039;, you are required to adhere to rules of the [http://www.bipt.be BIPT] (Belgian Institute for Postal services and Telecommunication) regarding wireless communications. &lt;br /&gt;
To help you along we&#039;ve listed some of the regulations below and provided links to others. These are however only intended to guide you along. For a definitive reference of what &#039;&#039;is&#039;&#039; and &#039;&#039;is not&#039;&#039; allowed you should consult the [http://www.bipt.be/nl/operatoren/radio/frequentiebeheer/frequentieplan/tabel Frequency Plan] of the BIPT. As usual, contacting the testbed administrators at {{SafeMailTo|admin|lab.cityofthings.eu}} in case of uncertainty is always a good idea.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;WiFi @2.4GHz &amp;amp; 5GHz&#039;&#039;&#039;: Consult [https://www.wirelessinfo.be/wifi-frequentie-tabel/ this website] for a nice summary (in Dutch) of the WiFi-channels &amp;amp; TX Powers you are allowed to use. If you no not speak Dutch, you may try the [https://translate.google.com/translate?sl=nl&amp;amp;tl=en&amp;amp;u=https%3A%2F%2Fwww.wirelessinfo.be%2Fwifi-frequentie-tabel Google Translated] version instead, or contact us at {{SafeMailTo|admin|lab.cityofthings.eu}} if you have any questions.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;IEEE 802.15.4 @2.4GHz&#039;&#039;&#039;: The same limits as for WiFi @2.4GHz apply. Since IEEE 802.15.4 operates in the same frequencies as WiFi and has a much lower TX-Power (0dBm instead of 20dBm), this should not be a problem.&lt;br /&gt;
&lt;br /&gt;
For 868MHz and 433MHz technologies (this includes IEEE 802.15.4, LoRa and Dash7) the following limits apply:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Frequency Band&lt;br /&gt;
! Allowed Frequencies&lt;br /&gt;
! Max TX-Power&lt;br /&gt;
! Max.&amp;lt;br&amp;gt;Duty Cycle&lt;br /&gt;
! Additional Requirements&lt;br /&gt;
|-&lt;br /&gt;
| 433 MHz&lt;br /&gt;
| 433.05 MHz - 434.04 MHz&lt;br /&gt;
| 10mW (10dBm)&lt;br /&gt;
| 10%&lt;br /&gt;
|-&lt;br /&gt;
| rowspan=&amp;quot;5&amp;quot; | 868MHz&lt;br /&gt;
| 863 MHz - 865 MHz&lt;br /&gt;
| 25mW (14dBm)&lt;br /&gt;
| 0.1%&lt;br /&gt;
| Must use CCA (Clear Channel Assessments)&lt;br /&gt;
|-&lt;br /&gt;
| 865 MHz - 868.6 MHz	&lt;br /&gt;
| 25mW (14dBm)&lt;br /&gt;
| 1%&lt;br /&gt;
| Duty Cycle requirement is waived if CCA is used&lt;br /&gt;
|-&lt;br /&gt;
| 868.7 MHz - 869.2 MHz&lt;br /&gt;
| 25mW (14dBm)&lt;br /&gt;
| 0.1%&lt;br /&gt;
| Must use CCA&lt;br /&gt;
|-&lt;br /&gt;
| 869.4 MHz - 869.64 MHz&lt;br /&gt;
| 25mW (14dBm)&lt;br /&gt;
| 0.1%&lt;br /&gt;
| Must use CCA&lt;br /&gt;
|-&lt;br /&gt;
| 869.7 MHz - 870 MHz&lt;br /&gt;
| 25mW (14dBm)&lt;br /&gt;
| 0.1%&lt;br /&gt;
| Must use CCA&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== WiFi Testing ==&lt;br /&gt;
&lt;br /&gt;
The following rules apply when doing WiFi tests on the CityLab testbed:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;No (Active) WiFi tests in the city campus during the day&#039;&#039;&#039;. Most of the CityLab testbed nodes are deployed at the City Campus of the University of Antwerp. Since this campus also houses around 1000 employees and 10000 students who all rely on a stable WiFi-connection to do their work, &#039;&#039;active&#039;&#039; WiFi tests are &#039;&#039;&#039;not&#039;&#039;&#039; allowed during the [https://www.uantwerpen.be/en/library/services/locations-and-opening-hours/stadscampus/ opening hours] of the City Campus&#039; Library. &#039;&#039;Passive tests&#039;&#039; (such as background RSSI measurements), that do not require packets to be transmitted &#039;&#039;are&#039;&#039; allowed during the day. For active tests, you can use the nodes at the [[Nodes#Middelheim_Campus|Middelheim Campus]] to prepare your tests during normal office hours and then schedule your tests to run after-hours on the nodes in the City Campus. Exemptions to this rule may be granted if needed and your experiments won&#039;t have too-large an impact on WiFi performance (e.g.: PING-ing is probably fine, iperf&#039;s probably aren&#039;t.). In either case this is something to be discussed with the CityLab System Administrators &#039;&#039;&#039;before&#039;&#039;&#039; you run your experiments.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Secure your WiFi connections&#039;&#039;&#039;. As described above, the CityLab nodes are deployed in an area where everyone with a smartphone is able to connect to unsecured WiFi Access Points. To prevent unauthorized access to the CityLab infrastructure you are &#039;&#039;&#039;required&#039;&#039;&#039; to secure &#039;&#039;&#039;all&#039;&#039;&#039; your wireless connections with WPA2 and a &#039;&#039;secure&#039;&#039; password. If, for whatever reason, you cannot use encryption for your experiments, contact the CityLab System Administrators({{SafeMailTo|admin|lab.cityofthings.eu}}), so we can try to work out an alternative solution.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Don&#039;t provide Internet Access to external devices&#039;&#039;&#039;. If required for your experiments, you &#039;&#039;are&#039;&#039; allowed to connect external devices to the CityLab testbed infrastructure on two conditions:&lt;br /&gt;
#You must have &#039;&#039;full control&#039;&#039; over the devices you connect to theCityLab infrastructure (e.g: your own smartphone/laptop)&lt;br /&gt;
#You may &#039;&#039;&#039;not&#039;&#039;&#039; under any circumstances allow these devices to access the internet &#039;&#039;through&#039;&#039; the testbed infrastructure.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;No network penetration testing&#039;&#039;&#039;. As discussed in the [https://www.fed4fire.eu/terms/ General Fed4Fire Terms] you are not allowed to use the infrastructure for any illegal activity. Just so we&#039;re clear on this: that includes &#039;testing&#039; how secure other WiFi networks in the area are.&lt;br /&gt;
&lt;br /&gt;
== Firewall Policy ==&lt;br /&gt;
&lt;br /&gt;
To prevent any problems resulting from improper use of the CityLab infrastructure on the rest of the University Network, we apply strict filtering on both incoming and outgoing network connections. At this point only the following connections are allowed:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Incoming&#039;&#039;&#039;: &lt;br /&gt;
** Ping&lt;br /&gt;
** SSH access only via the jFed SSH proxy. Direct SSH connections from the internet are not allowed.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Outgoing&#039;&#039;&#039;: Ping, SSH, HTTP, HTTPS, NTP, DNS, FTP&lt;br /&gt;
&lt;br /&gt;
This is by no means a definitive list and more protocols may be added in the future. We also don&#039;t mind punching additional holes in the firewall to accommodate your experiments (just so long as you don&#039;t ask us to allow for example Bittorrent traffic). If you do require additional ports to be opened, please send an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}} and we&#039;ll see what we can do.&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Getting_Started&amp;diff=381</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Getting_Started&amp;diff=381"/>
		<updated>2025-07-28T09:49:48Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Configuration of Access Point */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
=== JFed Account ===&lt;br /&gt;
To access the CityLab testbed you need:&lt;br /&gt;
* A [https://portal.fed4fire.eu JFed account]. If you do not have one already, you will have to request one. How this is done is explained [https://doc.fed4fire.eu/getanaccount.html here].&lt;br /&gt;
* You must be a member of a JFed-project that is authorised to run experiments on the Citylab testbed. &lt;br /&gt;
&lt;br /&gt;
If you join a JFed-project that has already been authorised, you will automatically also be granted access to the Citylab testbed. If you create a new JFed-project for your experiments, you can request for it to be authorised by sending an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}}, explaining why your projects need access to the testbed. Once your project has been authorised, any new members you add to your project will automatically also be granted access.&lt;br /&gt;
&lt;br /&gt;
Please note that if you create a new JFed-project during signup both the application for a jFed account as well as the authorisation of your JFed-project must be approved. The Citylab administrators are &#039;&#039;&#039;not&#039;&#039;&#039; automatically notified of the fact that you created a new project. You have to ask for it to be authorised yourself by sending an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}}. As long as you did not receive confirmation of both approvals, you are not ready to start using the testbed.&lt;br /&gt;
&lt;br /&gt;
=== JFed Software ===&lt;br /&gt;
You also need to have the JFed software installed on your computer. You can do this before or after you create your JFed account. Go to [https://jfed.ilabt.imec.be/downloads/ https://jfed.ilabt.imec.be/downloads/] and download the appropriate installer for your operating system. On that website, you can also find some documentation on how to use this software (e.g. regarding certificates).&lt;br /&gt;
&lt;br /&gt;
== Using the testbed for the first time ==&lt;br /&gt;
=== Create and activate your experiment using jFed ===&lt;br /&gt;
Follow these steps to activate your nodes using jFed:&lt;br /&gt;
* Fire up jFed. If all goes well, you should be prompted to provide your User certificate and Password. Browse to the location where you stored the .pem-file (see jFed documentation regarding certificates), provide your password and click Login.&lt;br /&gt;
[[File:jfed_login.png|Log in|480px]]&lt;br /&gt;
* Click on New&lt;br /&gt;
* Drag in 3 wireless nodes.&lt;br /&gt;
[[File:jfed_experiment.png|Drag in 3 wireless nodes|480px]]&lt;br /&gt;
* Configure which nodes you want to use:&lt;br /&gt;
** Click the node, and select &#039;&#039;imec CityLab Antwerp&#039;&#039;. By default, WiLab2 is selected.&lt;br /&gt;
** Click on &#039;&#039;specific node&#039;&#039;and select a node there. &#039;&#039;&#039;Make sure you check on the map to select nodes that are in reach of each other!&#039;&#039;&#039; The CityLab nodes can be far away from each other, so if you don&#039;t pay attention, you will end up with an experiment that does not support wireless communication between the selected nodes! See [[#Using the node map|using the node map]] for more information.&lt;br /&gt;
[[File:jfed_select_nodes.png|Select the appropriate nodes|480px]]&lt;br /&gt;
* Right click, Configure Node to change the properties (name/testbed/disk image/specific node).&lt;br /&gt;
* Name the three fixed nodes: ap and sta1 and sta2.&lt;br /&gt;
* Click Run to start your slice (Green arrow on the top left) and fill in a unique name for your slice.&lt;br /&gt;
[[File: jfed_run.png|Start the experiment|480px]]&lt;br /&gt;
* When all nodes turn green, your experiment is succesfully activated.&lt;br /&gt;
[[File:jfed_started.png|The experiment is running|480px]]&lt;br /&gt;
&lt;br /&gt;
=== Configuration of Access Point ===&lt;br /&gt;
SSH to your AP node (double click it in jFed). &#039;&#039;&#039;Important&#039;&#039;&#039;: For security purposes, the Citylab nodes are &#039;&#039;&#039;only&#039;&#039;&#039; accessible via the SSH proxy. Make sure it is enabled before you try to login to them !!&lt;br /&gt;
&lt;br /&gt;
Become root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a config file for the hostapd program:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;nano /root/hostapd.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following content to the config file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;interface=wlp1s0&lt;br /&gt;
driver=nl80211&lt;br /&gt;
country_code=BE&lt;br /&gt;
ssid=demoX&lt;br /&gt;
hw_mode=Z&lt;br /&gt;
channel=Y&lt;br /&gt;
&lt;br /&gt;
auth_algs=1&lt;br /&gt;
wpa=2&lt;br /&gt;
wpa_passphrase=&lt;br /&gt;
wpa_key_mgmt=WPA-PSK&lt;br /&gt;
wpa_pairwise=TKIP&lt;br /&gt;
rsn_pairwise=CCMP&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace X with a random number. Replace Y with your channel(1-11 for g, 36/40/44 for a), Z with the WiFi mode (a or g) and PWD with a &#039;&#039;secure&#039;&#039; password. Start hostapd. The above config will setup an AP on wlan0 using 802.11a or g, channel Y, with SSID demoX:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;hostapd /root/hostapd.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open a second ssh terminal and give an IP address to the wlp1s0 interface so we can test the connection to the clients (in the next steps). Be sure to replace X with your number:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo su; ifconfig wlp1s0 192.168.X.1/24&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuration of stations ===&lt;br /&gt;
For each of the two stations, open a ssh terminal and become root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a config file for the wpa_supplicant program:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wpa_passphrase demoX PWD &amp;gt;/root/wpa_supplicant.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above command replace demoX and PWD with the SSID and WPA2 password you configured in the hostapd.conf file on the access point.&lt;br /&gt;
&lt;br /&gt;
Put the wireless interface into managed mode and start the wpa_supplicant tool to connect to the AP.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;iwconfig wlp1s0 mode managed&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wpa_supplicant -iwlp1s0 -c/root/wpa_supplicant.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open a second ssh terminal and specify an IP address for the wlp1s0 interface:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo su; ifconfig wlan0 192.168.X.Z/24&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
make sure Z is not 1 and is different on both stations. Now, check if you can ping from one station to the other.&lt;br /&gt;
&lt;br /&gt;
== Using the node map ==&lt;br /&gt;
Note: A full-screen version of the node map can be found [https://doc.lab.cityofthings.eu/nodemap/ here]&lt;br /&gt;
The node map is a city map of Antwerp where all CityLab nodes in the City Center are marked (Zoom out for the nodes at Campus CMI). Every node is shown on the map by by a clickable pin. When you click on a pin, a small text balloon opens that contains a link that brings you to a web page with some more information on that node.&lt;br /&gt;
&lt;br /&gt;
You can use the node map to search for nodes that are in each others vicinity in order to set up an experiment with nodes that can actually communicate with the technology you will use. Due to the scale of the CityLab testbed, not all nodes can directly communicate with each other.&lt;br /&gt;
&lt;br /&gt;
Please not that, while on the map, nodes might appear to be in close proximity, they do not necessarily have wireless connectivity (e.g. because there are obstacles blocking the line-of-sight between them). This is also highly dependent on technology. To help you select which nodes might be suitable for your experiment, we created an overlay on the map that shows which nodes have a direct connection with each other. To view this overlay, first select a type of wireless link from the drop-down menu. Then, you can optionally set filters based on RSSI values or on reliability. When you click the &#039;&#039;update&#039;&#039; button, the overlay will appear.&lt;br /&gt;
&lt;br /&gt;
The overlay consists of colour-coded lines that give a visual clue of how good or bad a certain wireless link is. The lines themselves are also clickable, showing you the details of the link conditions. Do note that these figures come from a specially designed experiment to measure the link conditions. As these link conditions are also affected by external factors, they might change. You may also notice that some nodes appear not to have any links to any other nodes. This simply means that the link conditions have not been measured since this node was added. We do occasionally re-measure the link conditions but since we have to reserve &#039;&#039;all&#039;&#039; the nodes in the testbed for an entire weekend to do so, we don&#039;t want to do this too often. In essence: You can use this node map as a guide, but do not consider it to be absolute reality...&lt;br /&gt;
&amp;lt;iframe key=&amp;quot;docs&amp;quot; path=&amp;quot;nodemap/?embed=1&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;800&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Embedded Radios ==&lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve managed to start your first experiment, check out the [[Embedded Radios Quick Start Guide]] for more information on how to start using those.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
=== Working around connectivity issues ===&lt;br /&gt;
&lt;br /&gt;
If you get a &#039;&#039;connection error&#039;&#039; while configuring the nodes or starting a test, your host network is probably blocking outgoing TCP connections to port 12369 (the Geni AM port). You can work around this by enabling the &#039;&#039;jFed Proxy&#039;&#039;. To do so, click on Preferences, select the &#039;&#039;Proxy&#039;&#039; tab and click Run Proxy Test. Select the &#039;&#039;Always&#039;&#039; option for both Proxy for jFed and Proxy for SSH connections.&lt;br /&gt;
&lt;br /&gt;
[[File:Jfed_proxy_settings.png|480px]]&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=380</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=380"/>
		<updated>2023-04-05T13:30:16Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Experiment Setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
[[File:jfed_embedded_setup_01.png|Experiment Setup|480px]]&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. &#039;&#039;&#039;Make sure that the nodes you select are within range of each other!&#039;&#039;&#039;. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; and the other one &amp;lt;nodeRX&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
[[File:jfed_embedded_setup_02.png|Experiment Setup|600px]]&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;nodeRX&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;nodeRX&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; terminals, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== Running Contiki-NG on the OpenUSB Radios ==&lt;br /&gt;
&lt;br /&gt;
For this guide we re-use the same JFed experiment setup as for the &#039;LoRa device&#039; (discussed above). In this section we&#039;ll flash two OpenUSB devices and ping from one to the other. The guide in this section is based on the [https://docs.contiki-ng.org/en/develop/doc/tutorials/Hello%2C-World%21.html Hello World], [https://docs.contiki-ng.org/en/develop/doc/tutorials/Shell.html Shell] and [https://docs.contiki-ng.org/en/develop/doc/tutorials/IPv6-ping.html IPv6 Ping] tutorials on the Contiki-NG documentation website, but focusses specifically on the OpenMote platform.&lt;br /&gt;
&lt;br /&gt;
For more information on how to use Contiki-NG consult the Contiki-NG documentation at:&lt;br /&gt;
* https://docs.contiki-ng.org/en/develop/doc/tutorials/&lt;br /&gt;
* https://github.com/contiki-ng/contiki-ng/wiki&lt;br /&gt;
&lt;br /&gt;
=== Cloning, Compiling &amp;amp; Flashing the nodes ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into both the &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;nodeRX&amp;lt;/code&amp;gt; experiment nodes in two separate terminals. Then perform the steps below &#039;&#039;&#039;on both experiment nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
2) Clone the contiki-ng git repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/contiki-ng/contiki-ng/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Change to the root of the source tree&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd contiki-ng&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) Pull in all submodules (please note: this will take a while)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git submodule update --init --recursive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) move to the &#039;app&#039; directory of the &amp;lt;code&amp;gt;hello-world&amp;lt;/code&amp;gt; example application&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd examples/hello-world&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) Edit the file &amp;lt;code&amp;gt;hello-world.c&amp;lt;/code&amp;gt; and change the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 10);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Into the following one:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 120);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The reason we do this is because we&#039;ll be opening a &#039;shell&#039; to the device later on and having the &amp;quot;&#039;&#039;Hello World&#039;&#039;&amp;quot; prompt interrupting the shell session every 10 seconds is annoying.&lt;br /&gt;
&lt;br /&gt;
6) Edit the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; and add the line &amp;lt;code&amp;gt;MODULES += os/services/shell&amp;lt;/code&amp;gt; just below the &amp;lt;code&amp;gt;all: $(CONTIKI_PROJECT)&amp;lt;/code&amp;gt; line. The end result should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CONTIKI_PROJECT = hello-world&lt;br /&gt;
all: $(CONTIKI_PROJECT)&lt;br /&gt;
&lt;br /&gt;
MODULES += os/services/shell&lt;br /&gt;
&lt;br /&gt;
CONTIKI = ../..&lt;br /&gt;
include $(CONTIKI)/Makefile.include&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Run &amp;lt;code&amp;gt;make distclean&amp;lt;/code&amp;gt; to ensure the build environment is clean&lt;br /&gt;
&lt;br /&gt;
8) Compile the hello-world application for the Openmote platform using the following command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make TARGET=openmote BOARD=openmote-cc2538&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
9) Flash the hello-world application on the device using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo make TARGET=openmote BOARD=openmote-cc2538 PORT=/dev/ttyOPENUSB hello-world.upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
10) Connect with &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to the serial port of the openmote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -c -b 115200 --imap lfcrlf /dev/ttyOPENUSB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baudrate&lt;br /&gt;
* &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; turns on local echo (so you can see what you type)&lt;br /&gt;
* &amp;lt;code&amp;gt;--imap lfcrlf&amp;lt;/code&amp;gt; automaticall converts the &amp;quot;\n&amp;quot; printed by the Openmote into &amp;quot;\r\n&amp;quot; so the terminal behaves as you expect it to&lt;br /&gt;
&lt;br /&gt;
11) Type &amp;lt;code&amp;gt;help&amp;lt;/code&amp;gt; and press enter to see a list of all commands available&lt;br /&gt;
&lt;br /&gt;
=== Pinging from one node to another ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the steps above you should now have two &#039;terminal&#039; windows open. One where you are logged in to the serial console of the OpenUSB devices of &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; and one where you are logged in to the console of the OpenUSB device connected to &amp;lt;code&amp;gt;nodeRX&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
12) In the &amp;lt;code&amp;gt;nodeRX&amp;lt;/code&amp;gt; terminal, enter &amp;lt;code&amp;gt;ip-addr&amp;lt;/code&amp;gt; and press enter to retrieve the link-local address of the Openmote. The result should be similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt; ip-addr&lt;br /&gt;
Node IPv6 addresses:&lt;br /&gt;
-- fe80::212:4b00:YYY:XXXX&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
13) In the &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; terminal, enter the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;ping &amp;lt;ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; is the &#039;&#039;ip-address&#039;&#039; of the &amp;lt;code&amp;gt;nodeRX&amp;lt;/code&amp;gt;. The result should be similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#0012.4b00.0YYY.ZZZZ&amp;gt; ping fe80::212:4b00:YYY:XXXX&lt;br /&gt;
Pinging fe80::212:4b00:613:1506&lt;br /&gt;
Received ping reply from fe80::212:4b00:YYY:XXXX, len 4, ttl 64, delay 78 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; terminals, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) From the &amp;lt;code&amp;gt;examples/hello-world&amp;lt;/code&amp;gt; directory in the contiki-ng source tree, run the following command to wipe the flash on the OpenUSB device:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
../../tools/cc2538-bsl/cc2538-bsl.py -e -p /dev/ttyOPENUSB --bootloader-invert-lines&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the OpenUSB devices will remain accessible over the wireless interface.&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=File:Jfed_embedded_setup_02.png&amp;diff=379</id>
		<title>File:Jfed embedded setup 02.png</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=File:Jfed_embedded_setup_02.png&amp;diff=379"/>
		<updated>2023-04-05T13:28:20Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=File:Jfed_embedded_setup_01.png&amp;diff=378</id>
		<title>File:Jfed embedded setup 01.png</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=File:Jfed_embedded_setup_01.png&amp;diff=378"/>
		<updated>2023-04-05T13:27:59Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=377</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=377"/>
		<updated>2023-04-05T13:23:50Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. &#039;&#039;&#039;Make sure that the nodes you select are within range of each other!&#039;&#039;&#039;. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; and the other one &amp;lt;nodeRX&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;nodeRX&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;nodeRX&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; terminals, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== Running Contiki-NG on the OpenUSB Radios ==&lt;br /&gt;
&lt;br /&gt;
For this guide we re-use the same JFed experiment setup as for the &#039;LoRa device&#039; (discussed above). In this section we&#039;ll flash two OpenUSB devices and ping from one to the other. The guide in this section is based on the [https://docs.contiki-ng.org/en/develop/doc/tutorials/Hello%2C-World%21.html Hello World], [https://docs.contiki-ng.org/en/develop/doc/tutorials/Shell.html Shell] and [https://docs.contiki-ng.org/en/develop/doc/tutorials/IPv6-ping.html IPv6 Ping] tutorials on the Contiki-NG documentation website, but focusses specifically on the OpenMote platform.&lt;br /&gt;
&lt;br /&gt;
For more information on how to use Contiki-NG consult the Contiki-NG documentation at:&lt;br /&gt;
* https://docs.contiki-ng.org/en/develop/doc/tutorials/&lt;br /&gt;
* https://github.com/contiki-ng/contiki-ng/wiki&lt;br /&gt;
&lt;br /&gt;
=== Cloning, Compiling &amp;amp; Flashing the nodes ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into both the &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;nodeRX&amp;lt;/code&amp;gt; experiment nodes in two separate terminals. Then perform the steps below &#039;&#039;&#039;on both experiment nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
2) Clone the contiki-ng git repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/contiki-ng/contiki-ng/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Change to the root of the source tree&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd contiki-ng&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) Pull in all submodules (please note: this will take a while)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git submodule update --init --recursive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) move to the &#039;app&#039; directory of the &amp;lt;code&amp;gt;hello-world&amp;lt;/code&amp;gt; example application&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd examples/hello-world&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) Edit the file &amp;lt;code&amp;gt;hello-world.c&amp;lt;/code&amp;gt; and change the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 10);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Into the following one:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 120);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The reason we do this is because we&#039;ll be opening a &#039;shell&#039; to the device later on and having the &amp;quot;&#039;&#039;Hello World&#039;&#039;&amp;quot; prompt interrupting the shell session every 10 seconds is annoying.&lt;br /&gt;
&lt;br /&gt;
6) Edit the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; and add the line &amp;lt;code&amp;gt;MODULES += os/services/shell&amp;lt;/code&amp;gt; just below the &amp;lt;code&amp;gt;all: $(CONTIKI_PROJECT)&amp;lt;/code&amp;gt; line. The end result should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CONTIKI_PROJECT = hello-world&lt;br /&gt;
all: $(CONTIKI_PROJECT)&lt;br /&gt;
&lt;br /&gt;
MODULES += os/services/shell&lt;br /&gt;
&lt;br /&gt;
CONTIKI = ../..&lt;br /&gt;
include $(CONTIKI)/Makefile.include&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Run &amp;lt;code&amp;gt;make distclean&amp;lt;/code&amp;gt; to ensure the build environment is clean&lt;br /&gt;
&lt;br /&gt;
8) Compile the hello-world application for the Openmote platform using the following command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make TARGET=openmote BOARD=openmote-cc2538&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
9) Flash the hello-world application on the device using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo make TARGET=openmote BOARD=openmote-cc2538 PORT=/dev/ttyOPENUSB hello-world.upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
10) Connect with &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to the serial port of the openmote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -c -b 115200 --imap lfcrlf /dev/ttyOPENUSB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baudrate&lt;br /&gt;
* &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; turns on local echo (so you can see what you type)&lt;br /&gt;
* &amp;lt;code&amp;gt;--imap lfcrlf&amp;lt;/code&amp;gt; automaticall converts the &amp;quot;\n&amp;quot; printed by the Openmote into &amp;quot;\r\n&amp;quot; so the terminal behaves as you expect it to&lt;br /&gt;
&lt;br /&gt;
11) Type &amp;lt;code&amp;gt;help&amp;lt;/code&amp;gt; and press enter to see a list of all commands available&lt;br /&gt;
&lt;br /&gt;
=== Pinging from one node to another ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the steps above you should now have two &#039;terminal&#039; windows open. One where you are logged in to the serial console of the OpenUSB devices of &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; and one where you are logged in to the console of the OpenUSB device connected to &amp;lt;code&amp;gt;nodeRX&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
12) In the &amp;lt;code&amp;gt;nodeRX&amp;lt;/code&amp;gt; terminal, enter &amp;lt;code&amp;gt;ip-addr&amp;lt;/code&amp;gt; and press enter to retrieve the link-local address of the Openmote. The result should be similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt; ip-addr&lt;br /&gt;
Node IPv6 addresses:&lt;br /&gt;
-- fe80::212:4b00:YYY:XXXX&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
13) In the &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; terminal, enter the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;ping &amp;lt;ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; is the &#039;&#039;ip-address&#039;&#039; of the &amp;lt;code&amp;gt;nodeRX&amp;lt;/code&amp;gt;. The result should be similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#0012.4b00.0YYY.ZZZZ&amp;gt; ping fe80::212:4b00:YYY:XXXX&lt;br /&gt;
Pinging fe80::212:4b00:613:1506&lt;br /&gt;
Received ping reply from fe80::212:4b00:YYY:XXXX, len 4, ttl 64, delay 78 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;nodeTX&amp;lt;/code&amp;gt; terminals, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) From the &amp;lt;code&amp;gt;examples/hello-world&amp;lt;/code&amp;gt; directory in the contiki-ng source tree, run the following command to wipe the flash on the OpenUSB device:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
../../tools/cc2538-bsl/cc2538-bsl.py -e -p /dev/ttyOPENUSB --bootloader-invert-lines&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the OpenUSB devices will remain accessible over the wireless interface.&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=376</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=376"/>
		<updated>2023-04-05T12:54:39Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Some Useful Pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to CityLab, the City of Things smart cities FIRE testbed.&lt;br /&gt;
&lt;br /&gt;
This testbed is intended for wireless networking experimentation in the unlicensed spectrum. It is located in the city center of Antwerp, Belgium, and belongs to the University of Antwerp/imec. The testbed can be found in the streets in and around the city campus of the University of Antwerp, in an area of about 0.5km by 0.5km. See [[#Testbed nodes|below]] for a map of the testbed.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Hardware currently is hosted at 32 locations with another 22 planned,. Each location has its own [[Node Specifications|gateway]] attached to houses in the street or installed on a pole on a roof. See [[Nodes | Node Locations]].&lt;br /&gt;
&lt;br /&gt;
[[File:Citylab deployment.png|400px|thumb|right|Citylab deployment in the city center.]] &lt;br /&gt;
&lt;br /&gt;
The following technologies are deployed in the Citylab testbed:&lt;br /&gt;
* WiFi 802.11ac on 2.4 GHz and 5GHz&lt;br /&gt;
* WiFi 802.11n on 2.4 GHz and 5GHz&lt;br /&gt;
* Bluetooth 4.0 &lt;br /&gt;
* IEEE 802.15.4 on 2.4 GHz and IEEE 802.15.4g on 868MHz&lt;br /&gt;
* [http://www.dash7-alliance.org/ DASH7] on 433MHz and 868MHz&lt;br /&gt;
* [https://www.lora-alliance.org/ LoRaWAN] on 868MHz (client only)&lt;br /&gt;
&lt;br /&gt;
For more information about the exact hardware use, please conssult the [[Node Specifications]] page.&lt;br /&gt;
&lt;br /&gt;
CityLab is part of the [https://doc.ilabt.imec.be/ilabt/# larger imec iLab.t testbed offer]. &lt;br /&gt;
&lt;br /&gt;
Listed below are a number of pages that should help you to get stated on the CityLab testbed. Since this Wiki is still very much a work in progress the documentation is far from complete. If you get stuck or you have a question and you can&#039;t find the answer on this wiki, please don&#039;t hesitate to contact us. You can reach us at {{SafeMailTo|admin|lab.cityofthings.eu}}. We&#039;ll be happy to help you along and update the documentation where necessary.&lt;br /&gt;
&lt;br /&gt;
Since July 2019 some of the Citylab nodes have been equipped with an &amp;lt;i&amp;gt;ath9k&amp;lt;/i&amp;gt; WiFi card to facilitate experiments that require more low-level &amp;quot;tinkering&amp;quot; with the WiFi-stack. See &amp;lt;b&amp;gt;[[Node Specifications|this page]]&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;[[List of Hardware per Node|this page]]&amp;lt;/b&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Update:&amp;lt;/b&amp;gt; Since January 2020 it is no longer needed to be a member of the &#039;&#039;CityOfThings&#039;&#039; project on the legacy [https://authority.ilabt.iminds.be iMinds Authority]. Instead, authorisation to use Citylab can be requested for individual JFed-projects by sending an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}}. Once a project has been authorised all its members will automatically be granted access. See the [[Getting Started]] guide for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Useful Pages ==&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Usage Policy]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Node Specifications]]&lt;br /&gt;
* [[Nodes | Node Locations]]&lt;br /&gt;
* [[Embedded Radios Quick Start Guide]]&lt;br /&gt;
* [[Disk Images | Available Disk Images ]]&lt;br /&gt;
* [[List of Hardware per Node ]]&lt;br /&gt;
* [[GRE Tunnels ]]&lt;br /&gt;
* [[Past Experiments and Usage]]&lt;br /&gt;
&lt;br /&gt;
== Testbed nodes ==&lt;br /&gt;
&lt;br /&gt;
A full-screen version of this map can be found [https://doc.lab.cityofthings.eu/nodemap/ here]. An explanation on how to use this map can be found [[Getting Started#Using the node map | here]].&lt;br /&gt;
&amp;lt;iframe key=&amp;quot;docs&amp;quot; path=&amp;quot;nodemap/?embed=1&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;800&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Fire at City Campus University of Antwerp ==&lt;br /&gt;
&lt;br /&gt;
On the 6th of July 2022 there was a [https://www.gva.be/cnt/dmf20220706_94596904 huge fire at the City Campus of the University of Antwerp]. Since most of the Citylab nodes are deployed on that campus, this fire has also caused a large number of nodes of the Citylab testbed to go down. This section contains the latest status on the citylab testbed and will be updated when new information becomes available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/13 14:27): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since the last update nodes 23, 25, 33 and 36 have also come back online.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/08 14:52): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since yesterday, some citylab nodes have started coming back online as a result of power being restored to (some of) the buildings.&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 12, 14-18,21,24,27-28 have come back online&lt;br /&gt;
* Nodes 7-11,13,19,22,23,25,26,32-36 are still offline&lt;br /&gt;
* Nodes 2-6, 71-74 were unaffected by the fire and are still operational&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/07 10:32): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 7-19, 21-28, 33-36 are offline as a result of the fire. &lt;br /&gt;
* Nodes 2-6, 71-74 are unaffected by the fire&lt;br /&gt;
&lt;br /&gt;
At this point it is not clear when each of the downed nodes will be brought back online. We suspect that many of the downed nodes went offline as a result of the Fire Department cutting electricity to some of the buildings and we hope to be able to bring those nodes back online in the not too distant future. &lt;br /&gt;
&lt;br /&gt;
Some of the downed nodes however are deployed against the buildings that suffered the most damage and their future is not at all certain. It is quite possible that these nodes will either remain offline for an extensive period of time or will have to be removed from the testbed permanently.&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Getting_Started&amp;diff=375</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Getting_Started&amp;diff=375"/>
		<updated>2023-04-05T12:53:59Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
=== JFed Account ===&lt;br /&gt;
To access the CityLab testbed you need:&lt;br /&gt;
* A [https://portal.fed4fire.eu JFed account]. If you do not have one already, you will have to request one. How this is done is explained [https://doc.fed4fire.eu/getanaccount.html here].&lt;br /&gt;
* You must be a member of a JFed-project that is authorised to run experiments on the Citylab testbed. &lt;br /&gt;
&lt;br /&gt;
If you join a JFed-project that has already been authorised, you will automatically also be granted access to the Citylab testbed. If you create a new JFed-project for your experiments, you can request for it to be authorised by sending an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}}, explaining why your projects need access to the testbed. Once your project has been authorised, any new members you add to your project will automatically also be granted access.&lt;br /&gt;
&lt;br /&gt;
Please note that if you create a new JFed-project during signup both the application for a jFed account as well as the authorisation of your JFed-project must be approved. The Citylab administrators are &#039;&#039;&#039;not&#039;&#039;&#039; automatically notified of the fact that you created a new project. You have to ask for it to be authorised yourself by sending an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}}. As long as you did not receive confirmation of both approvals, you are not ready to start using the testbed.&lt;br /&gt;
&lt;br /&gt;
=== JFed Software ===&lt;br /&gt;
You also need to have the JFed software installed on your computer. You can do this before or after you create your JFed account. Go to [https://jfed.ilabt.imec.be/downloads/ https://jfed.ilabt.imec.be/downloads/] and download the appropriate installer for your operating system. On that website, you can also find some documentation on how to use this software (e.g. regarding certificates).&lt;br /&gt;
&lt;br /&gt;
== Using the testbed for the first time ==&lt;br /&gt;
=== Create and activate your experiment using jFed ===&lt;br /&gt;
Follow these steps to activate your nodes using jFed:&lt;br /&gt;
* Fire up jFed. If all goes well, you should be prompted to provide your User certificate and Password. Browse to the location where you stored the .pem-file (see jFed documentation regarding certificates), provide your password and click Login.&lt;br /&gt;
[[File:jfed_login.png|Log in|480px]]&lt;br /&gt;
* Click on New&lt;br /&gt;
* Drag in 3 wireless nodes.&lt;br /&gt;
[[File:jfed_experiment.png|Drag in 3 wireless nodes|480px]]&lt;br /&gt;
* Configure which nodes you want to use:&lt;br /&gt;
** Click the node, and select &#039;&#039;imec CityLab Antwerp&#039;&#039;. By default, WiLab2 is selected.&lt;br /&gt;
** Click on &#039;&#039;specific node&#039;&#039;and select a node there. &#039;&#039;&#039;Make sure you check on the map to select nodes that are in reach of each other!&#039;&#039;&#039; The CityLab nodes can be far away from each other, so if you don&#039;t pay attention, you will end up with an experiment that does not support wireless communication between the selected nodes! See [[#Using the node map|using the node map]] for more information.&lt;br /&gt;
[[File:jfed_select_nodes.png|Select the appropriate nodes|480px]]&lt;br /&gt;
* Right click, Configure Node to change the properties (name/testbed/disk image/specific node).&lt;br /&gt;
* Name the three fixed nodes: ap and sta1 and sta2.&lt;br /&gt;
* Click Run to start your slice (Green arrow on the top left) and fill in a unique name for your slice.&lt;br /&gt;
[[File: jfed_run.png|Start the experiment|480px]]&lt;br /&gt;
* When all nodes turn green, your experiment is succesfully activated.&lt;br /&gt;
[[File:jfed_started.png|The experiment is running|480px]]&lt;br /&gt;
&lt;br /&gt;
=== Configuration of Access Point ===&lt;br /&gt;
SSH to your AP node (double click it in jFed). Become root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a config file for the hostapd program:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;nano /root/hostapd.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following content to the config file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;interface=wlp1s0&lt;br /&gt;
driver=nl80211&lt;br /&gt;
country_code=BE&lt;br /&gt;
ssid=demoX&lt;br /&gt;
hw_mode=Z&lt;br /&gt;
channel=Y&lt;br /&gt;
&lt;br /&gt;
auth_algs=1&lt;br /&gt;
wpa=2&lt;br /&gt;
wpa_passphrase=&lt;br /&gt;
wpa_key_mgmt=WPA-PSK&lt;br /&gt;
wpa_pairwise=TKIP&lt;br /&gt;
rsn_pairwise=CCMP&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace X with a random number. Replace Y with your channel(1-11 for g, 36/40/44 for a), Z with the WiFi mode (a or g) and PWD with a &#039;&#039;secure&#039;&#039; password. Start hostapd. The above config will setup an AP on wlan0 using 802.11a or g, channel Y, with SSID demoX:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;hostapd /root/hostapd.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open a second ssh terminal and give an IP address to the wlp1s0 interface so we can test the connection to the clients (in the next steps). Be sure to replace X with your number:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo su; ifconfig wlp1s0 192.168.X.1/24&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuration of stations ===&lt;br /&gt;
For each of the two stations, open a ssh terminal and become root:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo su&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a config file for the wpa_supplicant program:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wpa_passphrase demoX PWD &amp;gt;/root/wpa_supplicant.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above command replace demoX and PWD with the SSID and WPA2 password you configured in the hostapd.conf file on the access point.&lt;br /&gt;
&lt;br /&gt;
Put the wireless interface into managed mode and start the wpa_supplicant tool to connect to the AP.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;iwconfig wlp1s0 mode managed&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wpa_supplicant -iwlp1s0 -c/root/wpa_supplicant.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open a second ssh terminal and specify an IP address for the wlp1s0 interface:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo su; ifconfig wlan0 192.168.X.Z/24&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
make sure Z is not 1 and is different on both stations. Now, check if you can ping from one station to the other.&lt;br /&gt;
&lt;br /&gt;
== Using the node map ==&lt;br /&gt;
Note: A full-screen version of the node map can be found [https://doc.lab.cityofthings.eu/nodemap/ here]&lt;br /&gt;
The node map is a city map of Antwerp where all CityLab nodes in the City Center are marked (Zoom out for the nodes at Campus CMI). Every node is shown on the map by by a clickable pin. When you click on a pin, a small text balloon opens that contains a link that brings you to a web page with some more information on that node.&lt;br /&gt;
&lt;br /&gt;
You can use the node map to search for nodes that are in each others vicinity in order to set up an experiment with nodes that can actually communicate with the technology you will use. Due to the scale of the CityLab testbed, not all nodes can directly communicate with each other.&lt;br /&gt;
&lt;br /&gt;
Please not that, while on the map, nodes might appear to be in close proximity, they do not necessarily have wireless connectivity (e.g. because there are obstacles blocking the line-of-sight between them). This is also highly dependent on technology. To help you select which nodes might be suitable for your experiment, we created an overlay on the map that shows which nodes have a direct connection with each other. To view this overlay, first select a type of wireless link from the drop-down menu. Then, you can optionally set filters based on RSSI values or on reliability. When you click the &#039;&#039;update&#039;&#039; button, the overlay will appear.&lt;br /&gt;
&lt;br /&gt;
The overlay consists of colour-coded lines that give a visual clue of how good or bad a certain wireless link is. The lines themselves are also clickable, showing you the details of the link conditions. Do note that these figures come from a specially designed experiment to measure the link conditions. As these link conditions are also affected by external factors, they might change. You may also notice that some nodes appear not to have any links to any other nodes. This simply means that the link conditions have not been measured since this node was added. We do occasionally re-measure the link conditions but since we have to reserve &#039;&#039;all&#039;&#039; the nodes in the testbed for an entire weekend to do so, we don&#039;t want to do this too often. In essence: You can use this node map as a guide, but do not consider it to be absolute reality...&lt;br /&gt;
&amp;lt;iframe key=&amp;quot;docs&amp;quot; path=&amp;quot;nodemap/?embed=1&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;800&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Embedded Radios ==&lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve managed to start your first experiment, check out the [[Embedded Radios Quick Start Guide]] for more information on how to start using those.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
=== Working around connectivity issues ===&lt;br /&gt;
&lt;br /&gt;
If you get a &#039;&#039;connection error&#039;&#039; while configuring the nodes or starting a test, your host network is probably blocking outgoing TCP connections to port 12369 (the Geni AM port). You can work around this by enabling the &#039;&#039;jFed Proxy&#039;&#039;. To do so, click on Preferences, select the &#039;&#039;Proxy&#039;&#039; tab and click Run Proxy Test. Select the &#039;&#039;Always&#039;&#039; option for both Proxy for jFed and Proxy for SSH connections.&lt;br /&gt;
&lt;br /&gt;
[[File:Jfed_proxy_settings.png|480px]]&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=374</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=374"/>
		<updated>2023-04-05T12:51:32Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Experiment Cleanup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. &#039;&#039;&#039;Make sure that the nodes you select are within range of each other!&#039;&#039;&#039;. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; terminals, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== Running Contiki-NG on the OpenUSB Radios ==&lt;br /&gt;
&lt;br /&gt;
For this guide we re-use the same JFed experiment setup as for the &#039;LoRa device&#039; (discussed above). In this section we&#039;ll flash two OpenUSB devices and ping from one to the other. The guide in this section is based on the [https://docs.contiki-ng.org/en/develop/doc/tutorials/Hello%2C-World%21.html Hello World], [https://docs.contiki-ng.org/en/develop/doc/tutorials/Shell.html Shell] and [https://docs.contiki-ng.org/en/develop/doc/tutorials/IPv6-ping.html IPv6 Ping] tutorials on the Contiki-NG documentation website, but focusses specifically on the OpenMote platform.&lt;br /&gt;
&lt;br /&gt;
For more information on how to use Contiki-NG consult the Contiki-NG documentation at:&lt;br /&gt;
* https://docs.contiki-ng.org/en/develop/doc/tutorials/&lt;br /&gt;
* https://github.com/contiki-ng/contiki-ng/wiki&lt;br /&gt;
&lt;br /&gt;
=== Cloning, Compiling &amp;amp; Flashing the nodes ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; experiment nodes in two separate terminals. Then perform the steps below &#039;&#039;&#039;on both experiment nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
2) Clone the contiki-ng git repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/contiki-ng/contiki-ng/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Change to the root of the source tree&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd contiki-ng&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) Pull in all submodules (please note: this will take a while)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git submodule update --init --recursive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) move to the &#039;app&#039; directory of the &amp;lt;code&amp;gt;hello-world&amp;lt;/code&amp;gt; example application&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd examples/hello-world&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) Edit the file &amp;lt;code&amp;gt;hello-world.c&amp;lt;/code&amp;gt; and change the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 10);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Into the following one:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 120);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The reason we do this is because we&#039;ll be opening a &#039;shell&#039; to the device later on and having the &amp;quot;&#039;&#039;Hello World&#039;&#039;&amp;quot; prompt interrupting the shell session every 10 seconds is annoying.&lt;br /&gt;
&lt;br /&gt;
6) Edit the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; and add the line &amp;lt;code&amp;gt;MODULES += os/services/shell&amp;lt;/code&amp;gt; just below the &amp;lt;code&amp;gt;all: $(CONTIKI_PROJECT)&amp;lt;/code&amp;gt; line. The end result should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CONTIKI_PROJECT = hello-world&lt;br /&gt;
all: $(CONTIKI_PROJECT)&lt;br /&gt;
&lt;br /&gt;
MODULES += os/services/shell&lt;br /&gt;
&lt;br /&gt;
CONTIKI = ../..&lt;br /&gt;
include $(CONTIKI)/Makefile.include&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Run &amp;lt;code&amp;gt;make distclean&amp;lt;/code&amp;gt; to ensure the build environment is clean&lt;br /&gt;
&lt;br /&gt;
8) Compile the hello-world application for the Openmote platform using the following command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make TARGET=openmote BOARD=openmote-cc2538&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
9) Flash the hello-world application on the device using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo make TARGET=openmote BOARD=openmote-cc2538 PORT=/dev/ttyOPENUSB hello-world.upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
10) Connect with &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to the serial port of the openmote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -c -b 115200 --imap lfcrlf /dev/ttyOPENUSB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baudrate&lt;br /&gt;
* &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; turns on local echo (so you can see what you type)&lt;br /&gt;
* &amp;lt;code&amp;gt;--imap lfcrlf&amp;lt;/code&amp;gt; automaticall converts the &amp;quot;\n&amp;quot; printed by the Openmote into &amp;quot;\r\n&amp;quot; so the terminal behaves as you expect it to&lt;br /&gt;
&lt;br /&gt;
11) Type &amp;lt;code&amp;gt;help&amp;lt;/code&amp;gt; and press enter to see a list of all commands available&lt;br /&gt;
&lt;br /&gt;
=== Pinging from one node to another ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the steps above you should now have two &#039;terminal&#039; windows open. One where you are logged in to the serial console of the OpenUSB devices of &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and one where you are logged in to the console of the OpenUSB device connected to &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
12) In the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; terminal, enter &amp;lt;code&amp;gt;ip-addr&amp;lt;/code&amp;gt; and press enter to retrieve the link-local address of the Openmote. The result should be similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt; ip-addr&lt;br /&gt;
Node IPv6 addresses:&lt;br /&gt;
-- fe80::212:4b00:YYY:XXXX&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
13) In the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; terminal, enter the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;ping &amp;lt;ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; is the &#039;&#039;ip-address&#039;&#039; of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt;. The result should be similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#0012.4b00.0YYY.ZZZZ&amp;gt; ping fe80::212:4b00:YYY:XXXX&lt;br /&gt;
Pinging fe80::212:4b00:613:1506&lt;br /&gt;
Received ping reply from fe80::212:4b00:YYY:XXXX, len 4, ttl 64, delay 78 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; terminals, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) From the &amp;lt;code&amp;gt;examples/hello-world&amp;lt;/code&amp;gt; directory in the contiki-ng source tree, run the following command to wipe the flash on the OpenUSB device:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
../../tools/cc2538-bsl/cc2538-bsl.py -e -p /dev/ttyOPENUSB --bootloader-invert-lines&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the OpenUSB devices will remain accessible over the wireless interface.&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=373</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=373"/>
		<updated>2023-04-05T12:44:05Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Experiment Cleanup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. &#039;&#039;&#039;Make sure that the nodes you select are within range of each other!&#039;&#039;&#039;. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; terminals, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== Running Contiki-NG on the OpenUSB Radios ==&lt;br /&gt;
&lt;br /&gt;
For this guide we re-use the same JFed experiment setup as for the &#039;LoRa device&#039; (discussed above). In this section we&#039;ll flash two OpenUSB devices and ping from one to the other. The guide in this section is based on the [https://docs.contiki-ng.org/en/develop/doc/tutorials/Hello%2C-World%21.html Hello World], [https://docs.contiki-ng.org/en/develop/doc/tutorials/Shell.html Shell] and [https://docs.contiki-ng.org/en/develop/doc/tutorials/IPv6-ping.html IPv6 Ping] tutorials on the Contiki-NG documentation website, but focusses specifically on the OpenMote platform.&lt;br /&gt;
&lt;br /&gt;
For more information on how to use Contiki-NG consult the Contiki-NG documentation at:&lt;br /&gt;
* https://docs.contiki-ng.org/en/develop/doc/tutorials/&lt;br /&gt;
* https://github.com/contiki-ng/contiki-ng/wiki&lt;br /&gt;
&lt;br /&gt;
=== Cloning, Compiling &amp;amp; Flashing the nodes ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; experiment nodes in two separate terminals. Then perform the steps below &#039;&#039;&#039;on both experiment nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
2) Clone the contiki-ng git repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/contiki-ng/contiki-ng/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Change to the root of the source tree&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd contiki-ng&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) Pull in all submodules (please note: this will take a while)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git submodule update --init --recursive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) move to the &#039;app&#039; directory of the &amp;lt;code&amp;gt;hello-world&amp;lt;/code&amp;gt; example application&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd examples/hello-world&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) Edit the file &amp;lt;code&amp;gt;hello-world.c&amp;lt;/code&amp;gt; and change the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 10);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Into the following one:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 120);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The reason we do this is because we&#039;ll be opening a &#039;shell&#039; to the device later on and having the &amp;quot;&#039;&#039;Hello World&#039;&#039;&amp;quot; prompt interrupting the shell session every 10 seconds is annoying.&lt;br /&gt;
&lt;br /&gt;
6) Edit the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; and add the line &amp;lt;code&amp;gt;MODULES += os/services/shell&amp;lt;/code&amp;gt; just below the &amp;lt;code&amp;gt;all: $(CONTIKI_PROJECT)&amp;lt;/code&amp;gt; line. The end result should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CONTIKI_PROJECT = hello-world&lt;br /&gt;
all: $(CONTIKI_PROJECT)&lt;br /&gt;
&lt;br /&gt;
MODULES += os/services/shell&lt;br /&gt;
&lt;br /&gt;
CONTIKI = ../..&lt;br /&gt;
include $(CONTIKI)/Makefile.include&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Run &amp;lt;code&amp;gt;make distclean&amp;lt;/code&amp;gt; to ensure the build environment is clean&lt;br /&gt;
&lt;br /&gt;
8) Compile the hello-world application for the Openmote platform using the following command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make TARGET=openmote BOARD=openmote-cc2538&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
9) Flash the hello-world application on the device using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo make TARGET=openmote BOARD=openmote-cc2538 PORT=/dev/ttyOPENUSB hello-world.upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
10) Connect with &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to the serial port of the openmote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -c -b 115200 --imap lfcrlf /dev/ttyOPENUSB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baudrate&lt;br /&gt;
* &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; turns on local echo (so you can see what you type)&lt;br /&gt;
* &amp;lt;code&amp;gt;--imap lfcrlf&amp;lt;/code&amp;gt; automaticall converts the &amp;quot;\n&amp;quot; printed by the Openmote into &amp;quot;\r\n&amp;quot; so the terminal behaves as you expect it to&lt;br /&gt;
&lt;br /&gt;
11) Type &amp;lt;code&amp;gt;help&amp;lt;/code&amp;gt; and press enter to see a list of all commands available&lt;br /&gt;
&lt;br /&gt;
=== Pinging from one node to another ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the steps above you should now have two &#039;terminal&#039; windows open. One where you are logged in to the serial console of the OpenUSB devices of &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and one where you are logged in to the console of the OpenUSB device connected to &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
12) In the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; terminal, enter &amp;lt;code&amp;gt;ip-addr&amp;lt;/code&amp;gt; and press enter to retrieve the link-local address of the Openmote. The result should be similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt; ip-addr&lt;br /&gt;
Node IPv6 addresses:&lt;br /&gt;
-- fe80::212:4b00:YYY:XXXX&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
13) In the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; terminal, enter the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;ping &amp;lt;ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; is the &#039;&#039;ip-address&#039;&#039; of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt;. The result should be similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#0012.4b00.0YYY.ZZZZ&amp;gt; ping fe80::212:4b00:YYY:XXXX&lt;br /&gt;
Pinging fe80::212:4b00:613:1506&lt;br /&gt;
Received ping reply from fe80::212:4b00:YYY:XXXX, len 4, ttl 64, delay 78 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the node_tx and node_tx, perform the following actions to clean up the experiment:&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=372</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=372"/>
		<updated>2023-04-05T12:43:50Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Experiment Cleanup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. &#039;&#039;&#039;Make sure that the nodes you select are within range of each other!&#039;&#039;&#039;. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; terminals, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== Running Contiki-NG on the OpenUSB Radios ==&lt;br /&gt;
&lt;br /&gt;
For this guide we re-use the same JFed experiment setup as for the &#039;LoRa device&#039; (discussed above). In this section we&#039;ll flash two OpenUSB devices and ping from one to the other. The guide in this section is based on the [https://docs.contiki-ng.org/en/develop/doc/tutorials/Hello%2C-World%21.html Hello World], [https://docs.contiki-ng.org/en/develop/doc/tutorials/Shell.html Shell] and [https://docs.contiki-ng.org/en/develop/doc/tutorials/IPv6-ping.html IPv6 Ping] tutorials on the Contiki-NG documentation website, but focusses specifically on the OpenMote platform.&lt;br /&gt;
&lt;br /&gt;
For more information on how to use Contiki-NG consult the Contiki-NG documentation at:&lt;br /&gt;
* https://docs.contiki-ng.org/en/develop/doc/tutorials/&lt;br /&gt;
* https://github.com/contiki-ng/contiki-ng/wiki&lt;br /&gt;
&lt;br /&gt;
=== Cloning, Compiling &amp;amp; Flashing the nodes ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; experiment nodes in two separate terminals. Then perform the steps below &#039;&#039;&#039;on both experiment nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
2) Clone the contiki-ng git repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/contiki-ng/contiki-ng/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Change to the root of the source tree&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd contiki-ng&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) Pull in all submodules (please note: this will take a while)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git submodule update --init --recursive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) move to the &#039;app&#039; directory of the &amp;lt;code&amp;gt;hello-world&amp;lt;/code&amp;gt; example application&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd examples/hello-world&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) Edit the file &amp;lt;code&amp;gt;hello-world.c&amp;lt;/code&amp;gt; and change the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 10);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Into the following one:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 120);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The reason we do this is because we&#039;ll be opening a &#039;shell&#039; to the device later on and having the &amp;quot;&#039;&#039;Hello World&#039;&#039;&amp;quot; prompt interrupting the shell session every 10 seconds is annoying.&lt;br /&gt;
&lt;br /&gt;
6) Edit the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; and add the line &amp;lt;code&amp;gt;MODULES += os/services/shell&amp;lt;/code&amp;gt; just below the &amp;lt;code&amp;gt;all: $(CONTIKI_PROJECT)&amp;lt;/code&amp;gt; line. The end result should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CONTIKI_PROJECT = hello-world&lt;br /&gt;
all: $(CONTIKI_PROJECT)&lt;br /&gt;
&lt;br /&gt;
MODULES += os/services/shell&lt;br /&gt;
&lt;br /&gt;
CONTIKI = ../..&lt;br /&gt;
include $(CONTIKI)/Makefile.include&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Run &amp;lt;code&amp;gt;make distclean&amp;lt;/code&amp;gt; to ensure the build environment is clean&lt;br /&gt;
&lt;br /&gt;
8) Compile the hello-world application for the Openmote platform using the following command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make TARGET=openmote BOARD=openmote-cc2538&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
9) Flash the hello-world application on the device using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo make TARGET=openmote BOARD=openmote-cc2538 PORT=/dev/ttyOPENUSB hello-world.upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
10) Connect with &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to the serial port of the openmote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -c -b 115200 --imap lfcrlf /dev/ttyOPENUSB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baudrate&lt;br /&gt;
* &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; turns on local echo (so you can see what you type)&lt;br /&gt;
* &amp;lt;code&amp;gt;--imap lfcrlf&amp;lt;/code&amp;gt; automaticall converts the &amp;quot;\n&amp;quot; printed by the Openmote into &amp;quot;\r\n&amp;quot; so the terminal behaves as you expect it to&lt;br /&gt;
&lt;br /&gt;
11) Type &amp;lt;code&amp;gt;help&amp;lt;/code&amp;gt; and press enter to see a list of all commands available&lt;br /&gt;
&lt;br /&gt;
=== Pinging from one node to another ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the steps above you should now have two &#039;terminal&#039; windows open. One where you are logged in to the serial console of the OpenUSB devices of &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and one where you are logged in to the console of the OpenUSB device connected to &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
12) In the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; terminal, enter &amp;lt;code&amp;gt;ip-addr&amp;lt;/code&amp;gt; and press enter to retrieve the link-local address of the Openmote. The result should be similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt; ip-addr&lt;br /&gt;
Node IPv6 addresses:&lt;br /&gt;
-- fe80::212:4b00:YYY:XXXX&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
13) In the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; terminal, enter the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;ping &amp;lt;ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; is the &#039;&#039;ip-address&#039;&#039; of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt;. The result should be similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#0012.4b00.0YYY.ZZZZ&amp;gt; ping fe80::212:4b00:YYY:XXXX&lt;br /&gt;
Pinging fe80::212:4b00:613:1506&lt;br /&gt;
Received ping reply from fe80::212:4b00:YYY:XXXX, len 4, ttl 64, delay 78 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=371</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=371"/>
		<updated>2023-04-05T12:43:29Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Running Contiki-NG on the OpenUSB Radios */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. &#039;&#039;&#039;Make sure that the nodes you select are within range of each other!&#039;&#039;&#039;. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt;, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== Running Contiki-NG on the OpenUSB Radios ==&lt;br /&gt;
&lt;br /&gt;
For this guide we re-use the same JFed experiment setup as for the &#039;LoRa device&#039; (discussed above). In this section we&#039;ll flash two OpenUSB devices and ping from one to the other. The guide in this section is based on the [https://docs.contiki-ng.org/en/develop/doc/tutorials/Hello%2C-World%21.html Hello World], [https://docs.contiki-ng.org/en/develop/doc/tutorials/Shell.html Shell] and [https://docs.contiki-ng.org/en/develop/doc/tutorials/IPv6-ping.html IPv6 Ping] tutorials on the Contiki-NG documentation website, but focusses specifically on the OpenMote platform.&lt;br /&gt;
&lt;br /&gt;
For more information on how to use Contiki-NG consult the Contiki-NG documentation at:&lt;br /&gt;
* https://docs.contiki-ng.org/en/develop/doc/tutorials/&lt;br /&gt;
* https://github.com/contiki-ng/contiki-ng/wiki&lt;br /&gt;
&lt;br /&gt;
=== Cloning, Compiling &amp;amp; Flashing the nodes ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; experiment nodes in two separate terminals. Then perform the steps below &#039;&#039;&#039;on both experiment nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
2) Clone the contiki-ng git repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/contiki-ng/contiki-ng/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Change to the root of the source tree&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd contiki-ng&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) Pull in all submodules (please note: this will take a while)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git submodule update --init --recursive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) move to the &#039;app&#039; directory of the &amp;lt;code&amp;gt;hello-world&amp;lt;/code&amp;gt; example application&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd examples/hello-world&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) Edit the file &amp;lt;code&amp;gt;hello-world.c&amp;lt;/code&amp;gt; and change the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 10);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Into the following one:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 120);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The reason we do this is because we&#039;ll be opening a &#039;shell&#039; to the device later on and having the &amp;quot;&#039;&#039;Hello World&#039;&#039;&amp;quot; prompt interrupting the shell session every 10 seconds is annoying.&lt;br /&gt;
&lt;br /&gt;
6) Edit the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; and add the line &amp;lt;code&amp;gt;MODULES += os/services/shell&amp;lt;/code&amp;gt; just below the &amp;lt;code&amp;gt;all: $(CONTIKI_PROJECT)&amp;lt;/code&amp;gt; line. The end result should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CONTIKI_PROJECT = hello-world&lt;br /&gt;
all: $(CONTIKI_PROJECT)&lt;br /&gt;
&lt;br /&gt;
MODULES += os/services/shell&lt;br /&gt;
&lt;br /&gt;
CONTIKI = ../..&lt;br /&gt;
include $(CONTIKI)/Makefile.include&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Run &amp;lt;code&amp;gt;make distclean&amp;lt;/code&amp;gt; to ensure the build environment is clean&lt;br /&gt;
&lt;br /&gt;
8) Compile the hello-world application for the Openmote platform using the following command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make TARGET=openmote BOARD=openmote-cc2538&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
9) Flash the hello-world application on the device using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo make TARGET=openmote BOARD=openmote-cc2538 PORT=/dev/ttyOPENUSB hello-world.upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
10) Connect with &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to the serial port of the openmote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -c -b 115200 --imap lfcrlf /dev/ttyOPENUSB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baudrate&lt;br /&gt;
* &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; turns on local echo (so you can see what you type)&lt;br /&gt;
* &amp;lt;code&amp;gt;--imap lfcrlf&amp;lt;/code&amp;gt; automaticall converts the &amp;quot;\n&amp;quot; printed by the Openmote into &amp;quot;\r\n&amp;quot; so the terminal behaves as you expect it to&lt;br /&gt;
&lt;br /&gt;
11) Type &amp;lt;code&amp;gt;help&amp;lt;/code&amp;gt; and press enter to see a list of all commands available&lt;br /&gt;
&lt;br /&gt;
=== Pinging from one node to another ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the steps above you should now have two &#039;terminal&#039; windows open. One where you are logged in to the serial console of the OpenUSB devices of &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and one where you are logged in to the console of the OpenUSB device connected to &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
12) In the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; terminal, enter &amp;lt;code&amp;gt;ip-addr&amp;lt;/code&amp;gt; and press enter to retrieve the link-local address of the Openmote. The result should be similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt; ip-addr&lt;br /&gt;
Node IPv6 addresses:&lt;br /&gt;
-- fe80::212:4b00:YYY:XXXX&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
13) In the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; terminal, enter the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;ping &amp;lt;ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; is the &#039;&#039;ip-address&#039;&#039; of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt;. The result should be similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#0012.4b00.0YYY.ZZZZ&amp;gt; ping fe80::212:4b00:YYY:XXXX&lt;br /&gt;
Pinging fe80::212:4b00:613:1506&lt;br /&gt;
Received ping reply from fe80::212:4b00:YYY:XXXX, len 4, ttl 64, delay 78 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=370</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=370"/>
		<updated>2023-04-05T12:43:03Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Pinging from one node to another */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. &#039;&#039;&#039;Make sure that the nodes you select are within range of each other!&#039;&#039;&#039;. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt;, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== Running Contiki-NG on the OpenUSB Radios ==&lt;br /&gt;
&lt;br /&gt;
For this guide we re-use the same JFed experiment setup as for the &#039;LoRa device&#039; (discussed above). In this section we&#039;ll flash two OpenUSB devices and ping from one to the other. The guide in this section is based on the [https://docs.contiki-ng.org/en/develop/doc/tutorials/Hello%2C-World%21.html Hello World], [https://docs.contiki-ng.org/en/develop/doc/tutorials/Shell.html Shell] and [https://docs.contiki-ng.org/en/develop/doc/tutorials/IPv6-ping.html IPv6 Ping] tutorials on the Contiki-NG documentation website, but focusses specifically on the OpenMote platform.&lt;br /&gt;
&lt;br /&gt;
For more information on how to use Contiki-NG consult the Contiki-NG documentation at:&lt;br /&gt;
* https://docs.contiki-ng.org/en/develop/doc/tutorials/&lt;br /&gt;
* https://github.com/contiki-ng/contiki-ng/wiki&lt;br /&gt;
&lt;br /&gt;
=== Cloning, Compiling &amp;amp; Flashing the nodes ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; experiment nodes in two separate terminals. Then perform the steps below &#039;&#039;&#039;on both experiment nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
2) Clone the contiki-ng git repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/contiki-ng/contiki-ng/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Change to the root of the source tree&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd contiki-ng&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) Pull in all submodules (please note: this will take a while)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git submodule update --init --recursive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) move to the &#039;app&#039; directory of the &amp;lt;code&amp;gt;hello-world&amp;lt;/code&amp;gt; example application&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd examples/hello-world&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) Edit the file &amp;lt;code&amp;gt;hello-world.c&amp;lt;/code&amp;gt; and change the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 10);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Into the following one:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 120);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The reason we do this is because we&#039;ll be opening a &#039;shell&#039; to the device later on and having the &amp;quot;&#039;&#039;Hello World&#039;&#039;&amp;quot; prompt interrupting the shell session every 10 seconds is annoying.&lt;br /&gt;
&lt;br /&gt;
6) Edit the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; and add the line &amp;lt;code&amp;gt;MODULES += os/services/shell&amp;lt;/code&amp;gt; just below the &amp;lt;code&amp;gt;all: $(CONTIKI_PROJECT)&amp;lt;/code&amp;gt; line. The end result should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CONTIKI_PROJECT = hello-world&lt;br /&gt;
all: $(CONTIKI_PROJECT)&lt;br /&gt;
&lt;br /&gt;
MODULES += os/services/shell&lt;br /&gt;
&lt;br /&gt;
CONTIKI = ../..&lt;br /&gt;
include $(CONTIKI)/Makefile.include&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Run &amp;lt;code&amp;gt;make distclean&amp;lt;/code&amp;gt; to ensure the build environment is clean&lt;br /&gt;
&lt;br /&gt;
8) Compile the hello-world application for the Openmote platform using the following command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make TARGET=openmote BOARD=openmote-cc2538&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
9) Flash the hello-world application on the device using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo make TARGET=openmote BOARD=openmote-cc2538 PORT=/dev/ttyOPENUSB hello-world.upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
10) Connect with &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to the serial port of the openmote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -c -b 115200 --imap lfcrlf /dev/ttyOPENUSB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baudrate&lt;br /&gt;
* &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; turns on local echo (so you can see what you type)&lt;br /&gt;
* &amp;lt;code&amp;gt;--imap lfcrlf&amp;lt;/code&amp;gt; automaticall converts the &amp;quot;\n&amp;quot; printed by the Openmote into &amp;quot;\r\n&amp;quot; so the terminal behaves as you expect it to&lt;br /&gt;
&lt;br /&gt;
11) Type &amp;lt;code&amp;gt;help&amp;lt;/code&amp;gt; and press enter to see a list of all commands available&lt;br /&gt;
&lt;br /&gt;
=== Pinging from one node to another ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the steps above you should now have two &#039;terminal&#039; windows open. One where you are logged in to the serial console of the OpenUSB devices of &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and one where you are logged in to the console of the OpenUSB device connected to &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
12) In the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; terminal, enter &amp;lt;code&amp;gt;ip-addr&amp;lt;/code&amp;gt; and press enter to retrieve the link-local address of the Openmote. The result should be similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt; ip-addr&lt;br /&gt;
Node IPv6 addresses:&lt;br /&gt;
-- fe80::212:4b00:YYY:XXXX&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
13) In the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; terminal, enter the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;ping &amp;lt;ip&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; is the &#039;&#039;ip-address&#039;&#039; of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt;. The result should be similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#0012.4b00.0YYY.ZZZZ&amp;gt; ping fe80::212:4b00:YYY:XXXX&lt;br /&gt;
Pinging fe80::212:4b00:613:1506&lt;br /&gt;
Received ping reply from fe80::212:4b00:YYY:XXXX, len 4, ttl 64, delay 78 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=369</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=369"/>
		<updated>2023-04-05T12:33:10Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Running Contiki-NG on the OpenUSB Radios */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. &#039;&#039;&#039;Make sure that the nodes you select are within range of each other!&#039;&#039;&#039;. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt;, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== Running Contiki-NG on the OpenUSB Radios ==&lt;br /&gt;
&lt;br /&gt;
For this guide we re-use the same JFed experiment setup as for the &#039;LoRa device&#039; (discussed above). In this section we&#039;ll flash two OpenUSB devices and ping from one to the other. The guide in this section is based on the [https://docs.contiki-ng.org/en/develop/doc/tutorials/Hello%2C-World%21.html Hello World], [https://docs.contiki-ng.org/en/develop/doc/tutorials/Shell.html Shell] and [https://docs.contiki-ng.org/en/develop/doc/tutorials/IPv6-ping.html IPv6 Ping] tutorials on the Contiki-NG documentation website, but focusses specifically on the OpenMote platform.&lt;br /&gt;
&lt;br /&gt;
For more information on how to use Contiki-NG consult the Contiki-NG documentation at:&lt;br /&gt;
* https://docs.contiki-ng.org/en/develop/doc/tutorials/&lt;br /&gt;
* https://github.com/contiki-ng/contiki-ng/wiki&lt;br /&gt;
&lt;br /&gt;
=== Cloning, Compiling &amp;amp; Flashing the nodes ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; experiment nodes in two separate terminals. Then perform the steps below &#039;&#039;&#039;on both experiment nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
2) Clone the contiki-ng git repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/contiki-ng/contiki-ng/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Change to the root of the source tree&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd contiki-ng&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) Pull in all submodules (please note: this will take a while)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git submodule update --init --recursive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) move to the &#039;app&#039; directory of the &amp;lt;code&amp;gt;hello-world&amp;lt;/code&amp;gt; example application&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd examples/hello-world&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) Edit the file &amp;lt;code&amp;gt;hello-world.c&amp;lt;/code&amp;gt; and change the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 10);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Into the following one:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 120);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The reason we do this is because we&#039;ll be opening a &#039;shell&#039; to the device later on and having the &amp;quot;&#039;&#039;Hello World&#039;&#039;&amp;quot; prompt interrupting the shell session every 10 seconds is annoying.&lt;br /&gt;
&lt;br /&gt;
6) Edit the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; and add the line &amp;lt;code&amp;gt;MODULES += os/services/shell&amp;lt;/code&amp;gt; just below the &amp;lt;code&amp;gt;all: $(CONTIKI_PROJECT)&amp;lt;/code&amp;gt; line. The end result should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CONTIKI_PROJECT = hello-world&lt;br /&gt;
all: $(CONTIKI_PROJECT)&lt;br /&gt;
&lt;br /&gt;
MODULES += os/services/shell&lt;br /&gt;
&lt;br /&gt;
CONTIKI = ../..&lt;br /&gt;
include $(CONTIKI)/Makefile.include&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Run &amp;lt;code&amp;gt;make distclean&amp;lt;/code&amp;gt; to ensure the build environment is clean&lt;br /&gt;
&lt;br /&gt;
8) Compile the hello-world application for the Openmote platform using the following command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make TARGET=openmote BOARD=openmote-cc2538&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
9) Flash the hello-world application on the device using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo make TARGET=openmote BOARD=openmote-cc2538 PORT=/dev/ttyOPENUSB hello-world.upload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
10) Connect with &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to the serial port of the openmote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -c -b 115200 --imap lfcrlf /dev/ttyOPENUSB&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baudrate&lt;br /&gt;
* &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; turns on local echo (so you can see what you type)&lt;br /&gt;
* &amp;lt;code&amp;gt;--imap lfcrlf&amp;lt;/code&amp;gt; automaticall converts the &amp;quot;\n&amp;quot; printed by the Openmote into &amp;quot;\r\n&amp;quot; so the terminal behaves as you expect it to&lt;br /&gt;
&lt;br /&gt;
11) Type &amp;lt;code&amp;gt;help&amp;lt;/code&amp;gt; and press enter to see a list of all commands available&lt;br /&gt;
&lt;br /&gt;
=== Pinging from one node to another ===&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve followed the steps above you should now have two &#039;terminal&#039; windows open. One where you are logged in to the serial console of the OpenUSB devices of &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and one where you are logged in to the console of the OpenUSB device connected to &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
12) In the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; terminal, enter &amp;lt;code&amp;gt;ip-addr&amp;lt;/code&amp;gt; and press enter to retrieve the link-local address of the Openmote. The result should be similar to this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt; ip-addr&lt;br /&gt;
Node IPv6 addresses:&lt;br /&gt;
-- fe80::212:4b00:YYY:XXXX&lt;br /&gt;
#0012.4b00.0YYY.XXXX&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=368</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=368"/>
		<updated>2023-04-05T11:35:44Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Running Contiki on the OpenUSB Radios */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. &#039;&#039;&#039;Make sure that the nodes you select are within range of each other!&#039;&#039;&#039;. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt;, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== Running Contiki-NG on the OpenUSB Radios ==&lt;br /&gt;
&lt;br /&gt;
For this guide we re-use the same JFed experiment setup as for the &#039;LoRa device&#039; (discussed above). In this section we&#039;ll flash two OpenUSB devices and ping from one to the other. The guide in this section is based on the [https://docs.contiki-ng.org/en/develop/doc/tutorials/Hello%2C-World%21.html Hello World], [https://docs.contiki-ng.org/en/develop/doc/tutorials/Shell.html Shell] and [https://docs.contiki-ng.org/en/develop/doc/tutorials/IPv6-ping.html IPv6 Ping] tutorials on the Contiki-NG documentation website, but focusses specifically on the OpenMote platform.&lt;br /&gt;
&lt;br /&gt;
For more information on how to use Contiki-NG consult the Contiki-NG documentation at:&lt;br /&gt;
* https://docs.contiki-ng.org/en/develop/doc/tutorials/&lt;br /&gt;
* https://github.com/contiki-ng/contiki-ng/wiki&lt;br /&gt;
&lt;br /&gt;
=== Cloning, Compiling &amp;amp; Flashing the nodes ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1) SSH into both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; experiment nodes in two separate terminals. Then perform the steps below &#039;&#039;&#039;on both experiment nodes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
2) Clone the contiki-ng git repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/contiki-ng/contiki-ng/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3) Change to the root of the source tree&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd contiki-ng&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) Pull in all submodules (please note: this will take a while)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git submodule update --init --recursive&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4) move to the &#039;app&#039; directory of the &amp;lt;code&amp;gt;hello-world&amp;lt;/code&amp;gt; example application&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd examples/hello-world&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5) Edit the file &amp;lt;code&amp;gt;hello-world.c&amp;lt;/code&amp;gt; and change the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 10);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Into the following one:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  etimer_set(&amp;amp;timer, CLOCK_SECOND * 120);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The reason we do this is because we&#039;ll be using the serial port to issue commands to the m&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=367</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=367"/>
		<updated>2023-04-05T11:22:03Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Running Contiki on the OpenUSB Module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. &#039;&#039;&#039;Make sure that the nodes you select are within range of each other!&#039;&#039;&#039;. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt;, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== Running Contiki on the OpenUSB Radios ==&lt;br /&gt;
&lt;br /&gt;
For this guide we re-use the same JFed experiment setup as for the &#039;LoRa device&#039; (discussed above). In this section we&#039;ll flash two OpenUSB devices and ping from one to the other. For more information on how to use contiki consult the Contiki documentation at:&lt;br /&gt;
* https://docs.contiki-ng.org/en/develop/doc/tutorials/&lt;br /&gt;
* https://github.com/contiki-ng/contiki-ng/wiki&lt;br /&gt;
&lt;br /&gt;
===  ===&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=366</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=366"/>
		<updated>2023-04-05T11:08:04Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Experiment Setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. &#039;&#039;&#039;Make sure that the nodes you select are within range of each other!&#039;&#039;&#039;. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt;, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== Running Contiki on the OpenUSB Module ==&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=365</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=365"/>
		<updated>2023-04-05T11:06:54Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. **Make sure that the nodes you select are within range of each other!**. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt;, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== Running Contiki on the OpenUSB Module ==&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=364</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=364"/>
		<updated>2023-04-05T08:40:25Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* OpenMote / OpenUSB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. **Make sure that the nodes you select are within range of each other!**. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt;, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== Getting started with the OpenUSB Module ==&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=363</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=363"/>
		<updated>2023-04-05T08:39:41Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Experiment Cleanup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. **Make sure that the nodes you select are within range of each other!**. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt;, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== OpenMote / OpenUSB ==&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=362</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=362"/>
		<updated>2023-04-05T08:39:34Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Preparing the transmitter node */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. **Make sure that the nodes you select are within range of each other!**. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt;, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== OpenMote / OpenUSB ==&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=361</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=361"/>
		<updated>2023-04-05T08:38:39Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Getting started with the EFM32GG+RFM95W (LoRa) module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. **Make sure that the nodes you select are within range of each other!**. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
1) SSH into the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_rx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make -j4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If all went well you should now have a file named &amp;lt;code&amp;gt;beacon_rx.bin&amp;lt;/code&amp;gt; in the local directory. If you get a complaint that no compiler could be found then, most likely you are not using the correct disk image. &lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_rx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above command:&lt;br /&gt;
* &amp;lt;code&amp;gt;115200&amp;lt;/code&amp;gt; is the baud rate to use&lt;br /&gt;
* &amp;lt;code&amp;gt;/dev/ttyLORA &amp;lt;/code&amp;gt; is the path to the serial port of the Lora device. (This is a symlink to the actual &#039;ttyUSB&#039; device that auto-generated via udev-rules present in all &#039;CoT&#039; disk images)&lt;br /&gt;
&lt;br /&gt;
At this point you won&#039;t see anything yet, but once the transmitter node has also been prepared you&#039;ll see text appearing here&lt;br /&gt;
&lt;br /&gt;
=== Preparing the transmitter node ===&lt;br /&gt;
&lt;br /&gt;
The steps needed to prepare the transmitter node are almost identical to the steps needed to prepare the receiver node.&lt;br /&gt;
&lt;br /&gt;
1) Open a new terminal, SSH into the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
2) Change to the root dir of the repository&lt;br /&gt;
3) Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET = beacon_tx&lt;br /&gt;
CFLAGS += -DUSE_BAND_868=1&lt;br /&gt;
CFLAGS += -DUSE_MODEM_LORA=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The only difference between the &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; used here and the one used for the receiver is that we are now building the &amp;lt;code&amp;gt;beacon_tx&amp;lt;/code&amp;gt; rather than the &amp;lt;code&amp;gt;beacon_rx&amp;lt;/code&amp;gt; app.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;TARGET&amp;lt;/code&amp;gt; line tells the compiler which application to build. The other lines tell the application to use the LoRa radio in the 868MHz band&lt;br /&gt;
4) Compile the binary using the &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; command&lt;br /&gt;
5) Flash the binary onto the EFM32GG device using the &amp;lt;code&amp;gt;flash_lora&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
flash_lora ./beacon_tx.bin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6) Use &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; to listen to the serial port of the &#039;Lora&#039; device&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo picocom -b 115200 /dev/ttyLORA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should now see lines similar to the ones below appearing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Sent Packet using LORA. size=16, counter=3 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=4 TimeOnAir(us)=52&lt;br /&gt;
Sent Packet using LORA. size=16, counter=5 TimeOnAir(us)=52&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7) Switch back to the terminal of the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; testbed node. You should see lines similar to the ones below appearing&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0x520B4614248AB601,10,-33,25&lt;br /&gt;
0x520B4614248AB601,11,-35,25&lt;br /&gt;
0x520B4614248AB601,12,-34,26&lt;br /&gt;
0x520B4614248AB601,13,-33,24&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the reported lines, the first field is the UUID of the node sending the beacons, the second field is the sequence number of the packet and the 3rd &amp;amp; 4th fields are the RSSI &amp;amp; LQI of the received beacon packet.&lt;br /&gt;
&lt;br /&gt;
=== Experiment Cleanup ===&lt;br /&gt;
&lt;br /&gt;
In both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt;, perform the following actions to clean up the experiment:&lt;br /&gt;
&lt;br /&gt;
1) Press the &#039;Control&#039; key and then press the &#039;A&#039; and &#039;X&#039; one after the other while holding the &#039;Control&#039; key pressed down. This control-sequence stops the running &amp;lt;code&amp;gt;picocom&amp;lt;/code&amp;gt; program&lt;br /&gt;
2) Run the &amp;lt;code&amp;gt;erase_lora&amp;lt;/code&amp;gt; program to wipe the LoRa devices. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
erase_lora&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is important you do this since otherwise the transmitter node will keep sending beacons.&lt;br /&gt;
&lt;br /&gt;
== OpenMote / OpenUSB ==&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=360</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=360"/>
		<updated>2023-04-05T07:51:18Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Getting started with the EFM32GG+RFM95W (LoRa) module */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. **Make sure that the nodes you select are within range of each other!**. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module, we&#039;ve ported the [https://github.com/Lora-net/LoRaMac-node LoraWAN network stack] to the &amp;quot;EFM32GG+RFM95W&amp;quot;. This port can be found in the following Github repository:&lt;br /&gt;
* https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&lt;br /&gt;
In this guide, we&#039;ll use that repository to set up a basic broadcast tx/rx between two nodes but the stack has many other capabilities as well.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the receiver node ===&lt;br /&gt;
&lt;br /&gt;
* SSH into the &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; and clone the &amp;lt;code&amp;gt;LoRaMac-node&amp;lt;/code&amp;gt; repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/imec-idlab/LoRaMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Change to the root dir of the repository&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd LoraMac-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Edit the file &amp;lt;code&amp;gt;Makefile.local&amp;lt;/code&amp;gt; and make sure it has the following contents:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TARGET=&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== SSH into both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; nodes in separate terminals. ===&lt;br /&gt;
&lt;br /&gt;
== OpenMote / OpenUSB ==&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=359</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=359"/>
		<updated>2023-04-05T07:41:51Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This quick start guide will explain how to get started with the &amp;quot;LoRa&amp;quot; (EFM32GG+RFM95W) an the OpenUSB modules of the Citylab testbed nodes.&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
* Open the JFed GUI, create a new experiment and drag in two wireless nodes. &lt;br /&gt;
&lt;br /&gt;
* Configure the nodes. Make sure that you:&lt;br /&gt;
** Set the correct testbed for the node (defaults to w-iLab.2, needs to be set to Citylab)&lt;br /&gt;
** Set Disk image to &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt;. This is important as we&#039;ll need the ARM gcc toolchain to compile the images for the devices.&lt;br /&gt;
** Explicitly set the specific node to use. **Make sure that the nodes you select are within range of each other!**. You can use the [https://doc.lab.cityofthings.eu/nodemap/ Node Map] to help you with this.&lt;br /&gt;
** name one of the nodes &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and the other one &amp;lt;node_rx&amp;gt;. You can use other node names but those are the node names that will be used throughout this guide.&lt;br /&gt;
&lt;br /&gt;
* Click &amp;quot;Run&amp;quot; to start the experiment and wait the the nodes to finish initialising. &#039;&#039;Important&#039;&#039;: It&#039;ll take a bit longer than usual to start the experiment as the &amp;lt;code&amp;gt;Ubuntu 20.04 LTS 64-bit (CoT) with ARM gcc compiler&amp;lt;/code&amp;gt; image we&#039;re using in this experiment is quite large so it&#039;ll take some time to load it onto the nodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Getting started with the EFM32GG+RFM95W (LoRa) module ==&lt;br /&gt;
&lt;br /&gt;
To help you get started with the &amp;quot;EFM32GG+RFM95W&amp;quot; module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== SSH into both the &amp;lt;code&amp;gt;node_tx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;node_rx&amp;lt;/code&amp;gt; nodes in separate terminals. ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== OpenMote / OpenUSB ==&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=358</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=358"/>
		<updated>2023-04-05T07:14:00Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: Dvdakker moved page Lora Quick Start Guide to Embedded Radios Quick Start Guide without leaving a redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
Open&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=357</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=357"/>
		<updated>2023-04-05T07:13:20Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Experiment Setup == &lt;br /&gt;
&lt;br /&gt;
Open&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=356</id>
		<title>Embedded Radios Quick Start Guide</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Embedded_Radios_Quick_Start_Guide&amp;diff=356"/>
		<updated>2023-04-05T07:11:13Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: Created page with &amp;quot;== Prerequisites ==  This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If t...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This quick start guide assumes you already have access to the Citylab Testbed and that you are familiar with the steps required to start experiments. If that is not the case then please follow the [[Getting Started]] guide first.&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=355</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=355"/>
		<updated>2023-04-05T07:03:34Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Fire at City Campus University of Antwerp */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to CityLab, the City of Things smart cities FIRE testbed.&lt;br /&gt;
&lt;br /&gt;
This testbed is intended for wireless networking experimentation in the unlicensed spectrum. It is located in the city center of Antwerp, Belgium, and belongs to the University of Antwerp/imec. The testbed can be found in the streets in and around the city campus of the University of Antwerp, in an area of about 0.5km by 0.5km. See [[#Testbed nodes|below]] for a map of the testbed.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Hardware currently is hosted at 32 locations with another 22 planned,. Each location has its own [[Node Specifications|gateway]] attached to houses in the street or installed on a pole on a roof. See [[Nodes | Node Locations]].&lt;br /&gt;
&lt;br /&gt;
[[File:Citylab deployment.png|400px|thumb|right|Citylab deployment in the city center.]] &lt;br /&gt;
&lt;br /&gt;
The following technologies are deployed in the Citylab testbed:&lt;br /&gt;
* WiFi 802.11ac on 2.4 GHz and 5GHz&lt;br /&gt;
* WiFi 802.11n on 2.4 GHz and 5GHz&lt;br /&gt;
* Bluetooth 4.0 &lt;br /&gt;
* IEEE 802.15.4 on 2.4 GHz and IEEE 802.15.4g on 868MHz&lt;br /&gt;
* [http://www.dash7-alliance.org/ DASH7] on 433MHz and 868MHz&lt;br /&gt;
* [https://www.lora-alliance.org/ LoRaWAN] on 868MHz (client only)&lt;br /&gt;
&lt;br /&gt;
For more information about the exact hardware use, please conssult the [[Node Specifications]] page.&lt;br /&gt;
&lt;br /&gt;
CityLab is part of the [https://doc.ilabt.imec.be/ilabt/# larger imec iLab.t testbed offer]. &lt;br /&gt;
&lt;br /&gt;
Listed below are a number of pages that should help you to get stated on the CityLab testbed. Since this Wiki is still very much a work in progress the documentation is far from complete. If you get stuck or you have a question and you can&#039;t find the answer on this wiki, please don&#039;t hesitate to contact us. You can reach us at {{SafeMailTo|admin|lab.cityofthings.eu}}. We&#039;ll be happy to help you along and update the documentation where necessary.&lt;br /&gt;
&lt;br /&gt;
Since July 2019 some of the Citylab nodes have been equipped with an &amp;lt;i&amp;gt;ath9k&amp;lt;/i&amp;gt; WiFi card to facilitate experiments that require more low-level &amp;quot;tinkering&amp;quot; with the WiFi-stack. See &amp;lt;b&amp;gt;[[Node Specifications|this page]]&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;[[List of Hardware per Node|this page]]&amp;lt;/b&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Update:&amp;lt;/b&amp;gt; Since January 2020 it is no longer needed to be a member of the &#039;&#039;CityOfThings&#039;&#039; project on the legacy [https://authority.ilabt.iminds.be iMinds Authority]. Instead, authorisation to use Citylab can be requested for individual JFed-projects by sending an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}}. Once a project has been authorised all its members will automatically be granted access. See the [[Getting Started]] guide for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Useful Pages ==&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Usage Policy]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Node Specifications]]&lt;br /&gt;
* [[Nodes | Node Locations]]&lt;br /&gt;
* [[Disk Images | Available Disk Images ]]&lt;br /&gt;
* [[List of Hardware per Node ]]&lt;br /&gt;
* [[GRE Tunnels ]]&lt;br /&gt;
* [[Past Experiments and Usage]]&lt;br /&gt;
&lt;br /&gt;
== Testbed nodes ==&lt;br /&gt;
&lt;br /&gt;
A full-screen version of this map can be found [https://doc.lab.cityofthings.eu/nodemap/ here]. An explanation on how to use this map can be found [[Getting Started#Using the node map | here]].&lt;br /&gt;
&amp;lt;iframe key=&amp;quot;docs&amp;quot; path=&amp;quot;nodemap/?embed=1&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;800&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Fire at City Campus University of Antwerp ==&lt;br /&gt;
&lt;br /&gt;
On the 6th of July 2022 there was a [https://www.gva.be/cnt/dmf20220706_94596904 huge fire at the City Campus of the University of Antwerp]. Since most of the Citylab nodes are deployed on that campus, this fire has also caused a large number of nodes of the Citylab testbed to go down. This section contains the latest status on the citylab testbed and will be updated when new information becomes available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/13 14:27): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since the last update nodes 23, 25, 33 and 36 have also come back online.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/08 14:52): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since yesterday, some citylab nodes have started coming back online as a result of power being restored to (some of) the buildings.&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 12, 14-18,21,24,27-28 have come back online&lt;br /&gt;
* Nodes 7-11,13,19,22,23,25,26,32-36 are still offline&lt;br /&gt;
* Nodes 2-6, 71-74 were unaffected by the fire and are still operational&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/07 10:32): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 7-19, 21-28, 33-36 are offline as a result of the fire. &lt;br /&gt;
* Nodes 2-6, 71-74 are unaffected by the fire&lt;br /&gt;
&lt;br /&gt;
At this point it is not clear when each of the downed nodes will be brought back online. We suspect that many of the downed nodes went offline as a result of the Fire Department cutting electricity to some of the buildings and we hope to be able to bring those nodes back online in the not too distant future. &lt;br /&gt;
&lt;br /&gt;
Some of the downed nodes however are deployed against the buildings that suffered the most damage and their future is not at all certain. It is quite possible that these nodes will either remain offline for an extensive period of time or will have to be removed from the testbed permanently.&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=354</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=354"/>
		<updated>2023-04-04T13:00:53Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to CityLab, the City of Things smart cities FIRE testbed.&lt;br /&gt;
&lt;br /&gt;
This testbed is intended for wireless networking experimentation in the unlicensed spectrum. It is located in the city center of Antwerp, Belgium, and belongs to the University of Antwerp/imec. The testbed can be found in the streets in and around the city campus of the University of Antwerp, in an area of about 0.5km by 0.5km. See [[#Testbed nodes|below]] for a map of the testbed.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Hardware currently is hosted at 32 locations with another 22 planned,. Each location has its own [[Node Specifications|gateway]] attached to houses in the street or installed on a pole on a roof. See [[Nodes | Node Locations]].&lt;br /&gt;
&lt;br /&gt;
[[File:Citylab deployment.png|400px|thumb|right|Citylab deployment in the city center.]] &lt;br /&gt;
&lt;br /&gt;
The following technologies are deployed in the Citylab testbed:&lt;br /&gt;
* WiFi 802.11ac on 2.4 GHz and 5GHz&lt;br /&gt;
* WiFi 802.11n on 2.4 GHz and 5GHz&lt;br /&gt;
* Bluetooth 4.0 &lt;br /&gt;
* IEEE 802.15.4 on 2.4 GHz and IEEE 802.15.4g on 868MHz&lt;br /&gt;
* [http://www.dash7-alliance.org/ DASH7] on 433MHz and 868MHz&lt;br /&gt;
* [https://www.lora-alliance.org/ LoRaWAN] on 868MHz (client only)&lt;br /&gt;
&lt;br /&gt;
For more information about the exact hardware use, please conssult the [[Node Specifications]] page.&lt;br /&gt;
&lt;br /&gt;
CityLab is part of the [https://doc.ilabt.imec.be/ilabt/# larger imec iLab.t testbed offer]. &lt;br /&gt;
&lt;br /&gt;
Listed below are a number of pages that should help you to get stated on the CityLab testbed. Since this Wiki is still very much a work in progress the documentation is far from complete. If you get stuck or you have a question and you can&#039;t find the answer on this wiki, please don&#039;t hesitate to contact us. You can reach us at {{SafeMailTo|admin|lab.cityofthings.eu}}. We&#039;ll be happy to help you along and update the documentation where necessary.&lt;br /&gt;
&lt;br /&gt;
Since July 2019 some of the Citylab nodes have been equipped with an &amp;lt;i&amp;gt;ath9k&amp;lt;/i&amp;gt; WiFi card to facilitate experiments that require more low-level &amp;quot;tinkering&amp;quot; with the WiFi-stack. See &amp;lt;b&amp;gt;[[Node Specifications|this page]]&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;[[List of Hardware per Node|this page]]&amp;lt;/b&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Update:&amp;lt;/b&amp;gt; Since January 2020 it is no longer needed to be a member of the &#039;&#039;CityOfThings&#039;&#039; project on the legacy [https://authority.ilabt.iminds.be iMinds Authority]. Instead, authorisation to use Citylab can be requested for individual JFed-projects by sending an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}}. Once a project has been authorised all its members will automatically be granted access. See the [[Getting Started]] guide for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Useful Pages ==&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Usage Policy]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Node Specifications]]&lt;br /&gt;
* [[Nodes | Node Locations]]&lt;br /&gt;
* [[Disk Images | Available Disk Images ]]&lt;br /&gt;
* [[List of Hardware per Node ]]&lt;br /&gt;
* [[GRE Tunnels ]]&lt;br /&gt;
* [[Past Experiments and Usage]]&lt;br /&gt;
&lt;br /&gt;
== Testbed nodes ==&lt;br /&gt;
&lt;br /&gt;
A full-screen version of this map can be found [https://doc.lab.cityofthings.eu/nodemap/ here]. An explanation on how to use this map can be found [[Getting Started#Using the node map | here]].&lt;br /&gt;
&amp;lt;iframe key=&amp;quot;docs&amp;quot; path=&amp;quot;nodemap/?embed=1&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;800&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;b&amp;gt;Fire at City Campus University of Antwerp&amp;lt;/b&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
On the 6th of July 2022 there was a [https://www.gva.be/cnt/dmf20220706_94596904 huge fire at the City Campus of the University of Antwerp]. Since most of the Citylab nodes are deployed on that campus, this fire has also caused a large number of nodes of the Citylab testbed to go down. This section contains the latest status on the citylab testbed and will be updated when new information becomes available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/13 14:27): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since the last update nodes 23, 25, 33 and 36 have also come back online.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/08 14:52): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since yesterday, some citylab nodes have started coming back online as a result of power being restored to (some of) the buildings.&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 12, 14-18,21,24,27-28 have come back online&lt;br /&gt;
* Nodes 7-11,13,19,22,23,25,26,32-36 are still offline&lt;br /&gt;
* Nodes 2-6, 71-74 were unaffected by the fire and are still operational&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/07 10:32): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 7-19, 21-28, 33-36 are offline as a result of the fire. &lt;br /&gt;
* Nodes 2-6, 71-74 are unaffected by the fire&lt;br /&gt;
&lt;br /&gt;
At this point it is not clear when each of the downed nodes will be brought back online. We suspect that many of the downed nodes went offline as a result of the Fire Department cutting electricity to some of the buildings and we hope to be able to bring those nodes back online in the not too distant future. &lt;br /&gt;
&lt;br /&gt;
Some of the downed nodes however are deployed against the buildings that suffered the most damage and their future is not at all certain. It is quite possible that these nodes will either remain offline for an extensive period of time or will have to be removed from the testbed permanently.&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Disk_Images&amp;diff=353</id>
		<title>Disk Images</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Disk_Images&amp;diff=353"/>
		<updated>2023-04-04T05:39:13Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Standard Images */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Standard Images ==&lt;br /&gt;
&lt;br /&gt;
The following &#039;standard&#039; images are available on the CityLab testbed. &lt;br /&gt;
By default, &#039;Ubuntu 20.04 64-bit (CoT)&#039; is used if no image is specified in the RSPec file.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 20.04 64-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This is the &#039;default&#039; image for the CityLab testbed. It is based on the [[#Ubuntu_20.04_64-bit|Standard Ubuntu 20.04 image]] but also contains the following additions:&lt;br /&gt;
* Basic &#039;networking&#039; tools are installed by default.&lt;br /&gt;
* Scripts/programs/configuration files needed to flash, erase and connect to the embedded radios listed on the [[Node Specifications]] page.&lt;br /&gt;
* Support for jFed-managed eGRE tunnels has been added&lt;br /&gt;
&lt;br /&gt;
In contrast to the [[#Ubuntu_16.04_64-bit_.28CoT.29|Ubuntu 16.04 64-bit (CoT)]] image, the ARM GCC compiler is no longer preinstalled as it takes up quite a bit of space and is not useful to every testbed user.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU20-64-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 20.04 64-bit (CoT+armgcc) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 20.04 image that is customised for use on the Citylab Testbed. It is the same as the [[#Ubuntu_20.04_64-bit_.28CoT.29| Ubuntu 20.04 64-bit (CoT)]] image except that the &#039;ARM gcc compiler&#039; is also preinstalled .&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU20-64-CoT-armgcc&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 18.04 64-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 18.04 image that is customised for use on the Citylab Testbed. It is based on the [[#Ubuntu_18.04_64-bit|Standard Ubuntu 18.04 image]] but also contains the following additions:&lt;br /&gt;
* Basic &#039;networking&#039; tools are installed by default.&lt;br /&gt;
* Scripts/programs/configuration files needed to flash, erase and connect to the embedded radios listed on the [[Node Specifications]] page.&lt;br /&gt;
* Support for jFed-managed eGRE tunnels has been added&lt;br /&gt;
&lt;br /&gt;
In constrast to the [[#Ubuntu_16.04_64-bit_.28CoT.29|Ubuntu 16.04 64-bit (CoT)]] image, the ARM GCC compiler is no longer preinstalled as it takes up quite a bit of space and is not useful to every testbed user.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU18-64-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 18.04 64-bit (CoT+armgcc) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 18.04 image that is customised for use on the Citylab Testbed. It is the same as the [[#Ubuntu_18.04_64-bit_.28CoT.29| Ubuntu 18.04 64-bit (CoT)]] image except that the &#039;ARM gcc compiler&#039; is also preinstalled .&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU18-64-CoT-armgcc&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 16.04 64-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 18.04 image that is customised for use on the Citylab Testbed. It is derived from the standard Ubuntu 16.04 image used on the [http://doc.ilabt.iminds.be/ilabt-documentation/ WiLab2] testbed, but some tools have been removed that are irrelevant for most testbed users. More importantly this image contains all the tools &amp;amp; configuration files needed to flash, erase and connect to the embedded radios listed on the [[Node Specifications]] page.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU16-64-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Voyage 0.10 32-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This image is derived from a standard Linux Voyage 0.10 installation.&lt;br /&gt;
The following changes were made to enable it to be used on the CityLab testbed&lt;br /&gt;
&lt;br /&gt;
* Installed the Emulab tools&lt;br /&gt;
* Configured Voyage so the root drive is mounted &#039;rw&#039; by default&lt;br /&gt;
* Installed tools &amp;amp; configuration files needed to use the embedded radios&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:VOYAGE010-32-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 20.04 64-bit ===&lt;br /&gt;
&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 20.04 image as used on the [http://www.emulab.net Emulab] testbed. The following (minor) changes have been made to make the image minimally suitable for use on the Citylab Testbed:&lt;br /&gt;
* Changed Timezone to Europe/Brussels&lt;br /&gt;
* Configured APT to use Belgian mirrors&lt;br /&gt;
* Enabled Serial Console&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU20-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 18.04 64-bit ===&lt;br /&gt;
&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 18.04 image as used on the [http://www.emulab.net Emulab] testbed. The following (minor) changes have been made to make the image minimally suitable for use on the Citylab Testbed:&lt;br /&gt;
* Changed Timezone to Europe/Brussels&lt;br /&gt;
* Configured APT to use Belgian mirrors&lt;br /&gt;
* Enabled Serial Console&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU18-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 16.04 64-bit ===&lt;br /&gt;
&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 16.04 image used on the [http://doc.ilabt.iminds.be/ilabt-documentation/ WiLab2] testbed. A few (very) minor modifications have been made so Emulab does not try to control the WiFi interfaces, but apart from that everything is standard. &lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU16-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
=== Ubuntu 14.04 64-bit ===&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 14.04 image used on the [http://doc.ilabt.iminds.be/ilabt-documentation/ WiLab2] testbed. No modifications have been made to this disk image.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU14-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== User-defined Images ==&lt;br /&gt;
&lt;br /&gt;
As with other JFed testbeds, it is possible for user to create their own disk images through the JFed interface.&lt;br /&gt;
How this can be done is explained [http://doc.ilabt.iminds.be/ilabt-documentation/diskimage.html here].&lt;br /&gt;
&lt;br /&gt;
Once your image has been created, you will receive an email containing the urn for your image.&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Disk_Images&amp;diff=352</id>
		<title>Disk Images</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Disk_Images&amp;diff=352"/>
		<updated>2023-04-04T05:39:02Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Ubuntu 20.04 64-bit (CoT) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Standard Images ==&lt;br /&gt;
&lt;br /&gt;
The following &#039;standard&#039; images are available on the CityLab testbed. &lt;br /&gt;
By default, &#039;Ubuntu 16.04 64-bit (CoT)&#039; is used if no image is specified in the RSPec file.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 20.04 64-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This is the &#039;default&#039; image for the CityLab testbed. It is based on the [[#Ubuntu_20.04_64-bit|Standard Ubuntu 20.04 image]] but also contains the following additions:&lt;br /&gt;
* Basic &#039;networking&#039; tools are installed by default.&lt;br /&gt;
* Scripts/programs/configuration files needed to flash, erase and connect to the embedded radios listed on the [[Node Specifications]] page.&lt;br /&gt;
* Support for jFed-managed eGRE tunnels has been added&lt;br /&gt;
&lt;br /&gt;
In contrast to the [[#Ubuntu_16.04_64-bit_.28CoT.29|Ubuntu 16.04 64-bit (CoT)]] image, the ARM GCC compiler is no longer preinstalled as it takes up quite a bit of space and is not useful to every testbed user.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU20-64-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 20.04 64-bit (CoT+armgcc) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 20.04 image that is customised for use on the Citylab Testbed. It is the same as the [[#Ubuntu_20.04_64-bit_.28CoT.29| Ubuntu 20.04 64-bit (CoT)]] image except that the &#039;ARM gcc compiler&#039; is also preinstalled .&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU20-64-CoT-armgcc&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 18.04 64-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 18.04 image that is customised for use on the Citylab Testbed. It is based on the [[#Ubuntu_18.04_64-bit|Standard Ubuntu 18.04 image]] but also contains the following additions:&lt;br /&gt;
* Basic &#039;networking&#039; tools are installed by default.&lt;br /&gt;
* Scripts/programs/configuration files needed to flash, erase and connect to the embedded radios listed on the [[Node Specifications]] page.&lt;br /&gt;
* Support for jFed-managed eGRE tunnels has been added&lt;br /&gt;
&lt;br /&gt;
In constrast to the [[#Ubuntu_16.04_64-bit_.28CoT.29|Ubuntu 16.04 64-bit (CoT)]] image, the ARM GCC compiler is no longer preinstalled as it takes up quite a bit of space and is not useful to every testbed user.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU18-64-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 18.04 64-bit (CoT+armgcc) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 18.04 image that is customised for use on the Citylab Testbed. It is the same as the [[#Ubuntu_18.04_64-bit_.28CoT.29| Ubuntu 18.04 64-bit (CoT)]] image except that the &#039;ARM gcc compiler&#039; is also preinstalled .&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU18-64-CoT-armgcc&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 16.04 64-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 18.04 image that is customised for use on the Citylab Testbed. It is derived from the standard Ubuntu 16.04 image used on the [http://doc.ilabt.iminds.be/ilabt-documentation/ WiLab2] testbed, but some tools have been removed that are irrelevant for most testbed users. More importantly this image contains all the tools &amp;amp; configuration files needed to flash, erase and connect to the embedded radios listed on the [[Node Specifications]] page.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU16-64-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Voyage 0.10 32-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This image is derived from a standard Linux Voyage 0.10 installation.&lt;br /&gt;
The following changes were made to enable it to be used on the CityLab testbed&lt;br /&gt;
&lt;br /&gt;
* Installed the Emulab tools&lt;br /&gt;
* Configured Voyage so the root drive is mounted &#039;rw&#039; by default&lt;br /&gt;
* Installed tools &amp;amp; configuration files needed to use the embedded radios&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:VOYAGE010-32-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 20.04 64-bit ===&lt;br /&gt;
&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 20.04 image as used on the [http://www.emulab.net Emulab] testbed. The following (minor) changes have been made to make the image minimally suitable for use on the Citylab Testbed:&lt;br /&gt;
* Changed Timezone to Europe/Brussels&lt;br /&gt;
* Configured APT to use Belgian mirrors&lt;br /&gt;
* Enabled Serial Console&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU20-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 18.04 64-bit ===&lt;br /&gt;
&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 18.04 image as used on the [http://www.emulab.net Emulab] testbed. The following (minor) changes have been made to make the image minimally suitable for use on the Citylab Testbed:&lt;br /&gt;
* Changed Timezone to Europe/Brussels&lt;br /&gt;
* Configured APT to use Belgian mirrors&lt;br /&gt;
* Enabled Serial Console&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU18-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 16.04 64-bit ===&lt;br /&gt;
&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 16.04 image used on the [http://doc.ilabt.iminds.be/ilabt-documentation/ WiLab2] testbed. A few (very) minor modifications have been made so Emulab does not try to control the WiFi interfaces, but apart from that everything is standard. &lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU16-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
=== Ubuntu 14.04 64-bit ===&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 14.04 image used on the [http://doc.ilabt.iminds.be/ilabt-documentation/ WiLab2] testbed. No modifications have been made to this disk image.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU14-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== User-defined Images ==&lt;br /&gt;
&lt;br /&gt;
As with other JFed testbeds, it is possible for user to create their own disk images through the JFed interface.&lt;br /&gt;
How this can be done is explained [http://doc.ilabt.iminds.be/ilabt-documentation/diskimage.html here].&lt;br /&gt;
&lt;br /&gt;
Once your image has been created, you will receive an email containing the urn for your image.&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Disk_Images&amp;diff=351</id>
		<title>Disk Images</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Disk_Images&amp;diff=351"/>
		<updated>2023-04-04T05:38:18Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Ubuntu 20.04 64-bit (CoT+armgcc) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Standard Images ==&lt;br /&gt;
&lt;br /&gt;
The following &#039;standard&#039; images are available on the CityLab testbed. &lt;br /&gt;
By default, &#039;Ubuntu 16.04 64-bit (CoT)&#039; is used if no image is specified in the RSPec file.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 20.04 64-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 20.04 image that is customised for use on the Citylab Testbed. It is based on the [[#Ubuntu_20.04_64-bit|Standard Ubuntu 20.04 image]] but also contains the following additions:&lt;br /&gt;
* Basic &#039;networking&#039; tools are installed by default.&lt;br /&gt;
* Scripts/programs/configuration files needed to flash, erase and connect to the embedded radios listed on the [[Node Specifications]] page.&lt;br /&gt;
* Support for jFed-managed eGRE tunnels has been added&lt;br /&gt;
&lt;br /&gt;
In contrast to the [[#Ubuntu_16.04_64-bit_.28CoT.29|Ubuntu 16.04 64-bit (CoT)]] image, the ARM GCC compiler is no longer preinstalled as it takes up quite a bit of space and is not useful to every testbed user.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU20-64-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 20.04 64-bit (CoT+armgcc) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 20.04 image that is customised for use on the Citylab Testbed. It is the same as the [[#Ubuntu_20.04_64-bit_.28CoT.29| Ubuntu 20.04 64-bit (CoT)]] image except that the &#039;ARM gcc compiler&#039; is also preinstalled .&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU20-64-CoT-armgcc&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 18.04 64-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 18.04 image that is customised for use on the Citylab Testbed. It is based on the [[#Ubuntu_18.04_64-bit|Standard Ubuntu 18.04 image]] but also contains the following additions:&lt;br /&gt;
* Basic &#039;networking&#039; tools are installed by default.&lt;br /&gt;
* Scripts/programs/configuration files needed to flash, erase and connect to the embedded radios listed on the [[Node Specifications]] page.&lt;br /&gt;
* Support for jFed-managed eGRE tunnels has been added&lt;br /&gt;
&lt;br /&gt;
In constrast to the [[#Ubuntu_16.04_64-bit_.28CoT.29|Ubuntu 16.04 64-bit (CoT)]] image, the ARM GCC compiler is no longer preinstalled as it takes up quite a bit of space and is not useful to every testbed user.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU18-64-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 18.04 64-bit (CoT+armgcc) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 18.04 image that is customised for use on the Citylab Testbed. It is the same as the [[#Ubuntu_18.04_64-bit_.28CoT.29| Ubuntu 18.04 64-bit (CoT)]] image except that the &#039;ARM gcc compiler&#039; is also preinstalled .&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU18-64-CoT-armgcc&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 16.04 64-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 18.04 image that is customised for use on the Citylab Testbed. It is derived from the standard Ubuntu 16.04 image used on the [http://doc.ilabt.iminds.be/ilabt-documentation/ WiLab2] testbed, but some tools have been removed that are irrelevant for most testbed users. More importantly this image contains all the tools &amp;amp; configuration files needed to flash, erase and connect to the embedded radios listed on the [[Node Specifications]] page.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU16-64-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Voyage 0.10 32-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This image is derived from a standard Linux Voyage 0.10 installation.&lt;br /&gt;
The following changes were made to enable it to be used on the CityLab testbed&lt;br /&gt;
&lt;br /&gt;
* Installed the Emulab tools&lt;br /&gt;
* Configured Voyage so the root drive is mounted &#039;rw&#039; by default&lt;br /&gt;
* Installed tools &amp;amp; configuration files needed to use the embedded radios&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:VOYAGE010-32-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 20.04 64-bit ===&lt;br /&gt;
&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 20.04 image as used on the [http://www.emulab.net Emulab] testbed. The following (minor) changes have been made to make the image minimally suitable for use on the Citylab Testbed:&lt;br /&gt;
* Changed Timezone to Europe/Brussels&lt;br /&gt;
* Configured APT to use Belgian mirrors&lt;br /&gt;
* Enabled Serial Console&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU20-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 18.04 64-bit ===&lt;br /&gt;
&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 18.04 image as used on the [http://www.emulab.net Emulab] testbed. The following (minor) changes have been made to make the image minimally suitable for use on the Citylab Testbed:&lt;br /&gt;
* Changed Timezone to Europe/Brussels&lt;br /&gt;
* Configured APT to use Belgian mirrors&lt;br /&gt;
* Enabled Serial Console&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU18-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 16.04 64-bit ===&lt;br /&gt;
&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 16.04 image used on the [http://doc.ilabt.iminds.be/ilabt-documentation/ WiLab2] testbed. A few (very) minor modifications have been made so Emulab does not try to control the WiFi interfaces, but apart from that everything is standard. &lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU16-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
=== Ubuntu 14.04 64-bit ===&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 14.04 image used on the [http://doc.ilabt.iminds.be/ilabt-documentation/ WiLab2] testbed. No modifications have been made to this disk image.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU14-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== User-defined Images ==&lt;br /&gt;
&lt;br /&gt;
As with other JFed testbeds, it is possible for user to create their own disk images through the JFed interface.&lt;br /&gt;
How this can be done is explained [http://doc.ilabt.iminds.be/ilabt-documentation/diskimage.html here].&lt;br /&gt;
&lt;br /&gt;
Once your image has been created, you will receive an email containing the urn for your image.&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Disk_Images&amp;diff=350</id>
		<title>Disk Images</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Disk_Images&amp;diff=350"/>
		<updated>2023-04-04T05:37:55Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Ubuntu 16.04 64-bit (CoT) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Standard Images ==&lt;br /&gt;
&lt;br /&gt;
The following &#039;standard&#039; images are available on the CityLab testbed. &lt;br /&gt;
By default, &#039;Ubuntu 16.04 64-bit (CoT)&#039; is used if no image is specified in the RSPec file.&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 20.04 64-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 20.04 image that is customised for use on the Citylab Testbed. It is based on the [[#Ubuntu_20.04_64-bit|Standard Ubuntu 20.04 image]] but also contains the following additions:&lt;br /&gt;
* Basic &#039;networking&#039; tools are installed by default.&lt;br /&gt;
* Scripts/programs/configuration files needed to flash, erase and connect to the embedded radios listed on the [[Node Specifications]] page.&lt;br /&gt;
* Support for jFed-managed eGRE tunnels has been added&lt;br /&gt;
&lt;br /&gt;
In contrast to the [[#Ubuntu_16.04_64-bit_.28CoT.29|Ubuntu 16.04 64-bit (CoT)]] image, the ARM GCC compiler is no longer preinstalled as it takes up quite a bit of space and is not useful to every testbed user.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU20-64-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 20.04 64-bit (CoT+armgcc) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 18.04 image that is customised for use on the Citylab Testbed. It is the same as the [[#Ubuntu_20.04_64-bit_.28CoT.29| Ubuntu 18.04 64-bit (CoT)]] image except that the &#039;ARM gcc compiler&#039; is also preinstalled .&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU20-64-CoT-armgcc&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 18.04 64-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 18.04 image that is customised for use on the Citylab Testbed. It is based on the [[#Ubuntu_18.04_64-bit|Standard Ubuntu 18.04 image]] but also contains the following additions:&lt;br /&gt;
* Basic &#039;networking&#039; tools are installed by default.&lt;br /&gt;
* Scripts/programs/configuration files needed to flash, erase and connect to the embedded radios listed on the [[Node Specifications]] page.&lt;br /&gt;
* Support for jFed-managed eGRE tunnels has been added&lt;br /&gt;
&lt;br /&gt;
In constrast to the [[#Ubuntu_16.04_64-bit_.28CoT.29|Ubuntu 16.04 64-bit (CoT)]] image, the ARM GCC compiler is no longer preinstalled as it takes up quite a bit of space and is not useful to every testbed user.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU18-64-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 18.04 64-bit (CoT+armgcc) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 18.04 image that is customised for use on the Citylab Testbed. It is the same as the [[#Ubuntu_18.04_64-bit_.28CoT.29| Ubuntu 18.04 64-bit (CoT)]] image except that the &#039;ARM gcc compiler&#039; is also preinstalled .&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU18-64-CoT-armgcc&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 16.04 64-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This is an Ubuntu 18.04 image that is customised for use on the Citylab Testbed. It is derived from the standard Ubuntu 16.04 image used on the [http://doc.ilabt.iminds.be/ilabt-documentation/ WiLab2] testbed, but some tools have been removed that are irrelevant for most testbed users. More importantly this image contains all the tools &amp;amp; configuration files needed to flash, erase and connect to the embedded radios listed on the [[Node Specifications]] page.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU16-64-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Voyage 0.10 32-bit (CoT) ===&lt;br /&gt;
&lt;br /&gt;
This image is derived from a standard Linux Voyage 0.10 installation.&lt;br /&gt;
The following changes were made to enable it to be used on the CityLab testbed&lt;br /&gt;
&lt;br /&gt;
* Installed the Emulab tools&lt;br /&gt;
* Configured Voyage so the root drive is mounted &#039;rw&#039; by default&lt;br /&gt;
* Installed tools &amp;amp; configuration files needed to use the embedded radios&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:VOYAGE010-32-CoT&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 20.04 64-bit ===&lt;br /&gt;
&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 20.04 image as used on the [http://www.emulab.net Emulab] testbed. The following (minor) changes have been made to make the image minimally suitable for use on the Citylab Testbed:&lt;br /&gt;
* Changed Timezone to Europe/Brussels&lt;br /&gt;
* Configured APT to use Belgian mirrors&lt;br /&gt;
* Enabled Serial Console&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU20-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 18.04 64-bit ===&lt;br /&gt;
&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 18.04 image as used on the [http://www.emulab.net Emulab] testbed. The following (minor) changes have been made to make the image minimally suitable for use on the Citylab Testbed:&lt;br /&gt;
* Changed Timezone to Europe/Brussels&lt;br /&gt;
* Configured APT to use Belgian mirrors&lt;br /&gt;
* Enabled Serial Console&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU18-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu 16.04 64-bit ===&lt;br /&gt;
&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 16.04 image used on the [http://doc.ilabt.iminds.be/ilabt-documentation/ WiLab2] testbed. A few (very) minor modifications have been made so Emulab does not try to control the WiFi interfaces, but apart from that everything is standard. &lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU16-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
=== Ubuntu 14.04 64-bit ===&lt;br /&gt;
This is the &#039;standard&#039; Ubuntu 14.04 image used on the [http://doc.ilabt.iminds.be/ilabt-documentation/ WiLab2] testbed. No modifications have been made to this disk image.&lt;br /&gt;
&lt;br /&gt;
This image can be selected by using the following URN in your RSPec file:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;urn:publicid:IDN+lab.cityofthings.eu+image+emulab-ops:UBUNTU14-64-STD&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== User-defined Images ==&lt;br /&gt;
&lt;br /&gt;
As with other JFed testbeds, it is possible for user to create their own disk images through the JFed interface.&lt;br /&gt;
How this can be done is explained [http://doc.ilabt.iminds.be/ilabt-documentation/diskimage.html here].&lt;br /&gt;
&lt;br /&gt;
Once your image has been created, you will receive an email containing the urn for your image.&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=349</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=349"/>
		<updated>2022-07-13T12:27:59Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Fire at City Campus University of Antwerp */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to CityLab, the City of Things smart cities FIRE testbed.&lt;br /&gt;
&lt;br /&gt;
This testbed is intended for wireless networking experimentation in the unlicensed spectrum. It is located in the city center of Antwerp, Belgium, and belongs to the University of Antwerp/imec. The testbed can be found in the streets in and around the city campus of the University of Antwerp, in an area of about 0.5km by 0.5km. See [[#Testbed nodes|below]] for a map of the testbed.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;b&amp;gt;Fire at City Campus University of Antwerp&amp;lt;/b&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
On the 6th of July 2022 there was a [https://www.gva.be/cnt/dmf20220706_94596904 huge fire at the City Campus of the University of Antwerp]. Since most of the Citylab nodes are deployed on that campus, this fire has also caused a large number of nodes of the Citylab testbed to go down. This section contains the latest status on the citylab testbed and will be updated when new information becomes available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/13 14:27): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since the last update nodes 23, 25, 33 and 36 have also come back online.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/08 14:52): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since yesterday, some citylab nodes have started coming back online as a result of power being restored to (some of) the buildings.&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 12, 14-18,21,24,27-28 have come back online&lt;br /&gt;
* Nodes 7-11,13,19,22,23,25,26,32-36 are still offline&lt;br /&gt;
* Nodes 2-6, 71-74 were unaffected by the fire and are still operational&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/07 10:32): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 7-19, 21-28, 33-36 are offline as a result of the fire. &lt;br /&gt;
* Nodes 2-6, 71-74 are unaffected by the fire&lt;br /&gt;
&lt;br /&gt;
At this point it is not clear when each of the downed nodes will be brought back online. We suspect that many of the downed nodes went offline as a result of the Fire Department cutting electricity to some of the buildings and we hope to be able to bring those nodes back online in the not too distant future. &lt;br /&gt;
&lt;br /&gt;
Some of the downed nodes however are deployed against the buildings that suffered the most damage and their future is not at all certain. It is quite possible that these nodes will either remain offline for an extensive period of time or will have to be removed from the testbed permanently.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Hardware currently is hosted at 32 locations with another 22 planned,. Each location has its own [[Node Specifications|gateway]] attached to houses in the street or installed on a pole on a roof. See [[Nodes | Node Locations]].&lt;br /&gt;
&lt;br /&gt;
[[File:Citylab deployment.png|400px|thumb|right|Citylab deployment in the city center.]] &lt;br /&gt;
&lt;br /&gt;
The following technologies are deployed in the Citylab testbed:&lt;br /&gt;
* WiFi 802.11ac on 2.4 GHz and 5GHz&lt;br /&gt;
* WiFi 802.11n on 2.4 GHz and 5GHz&lt;br /&gt;
* Bluetooth 4.0 &lt;br /&gt;
* IEEE 802.15.4 on 2.4 GHz and IEEE 802.15.4g on 868MHz&lt;br /&gt;
* [http://www.dash7-alliance.org/ DASH7] on 433MHz and 868MHz&lt;br /&gt;
* [https://www.lora-alliance.org/ LoRaWAN] on 868MHz (client only)&lt;br /&gt;
&lt;br /&gt;
For more information about the exact hardware use, please conssult the [[Node Specifications]] page.&lt;br /&gt;
&lt;br /&gt;
CityLab is part of the [https://doc.ilabt.imec.be/ilabt/# larger imec iLab.t testbed offer]. &lt;br /&gt;
&lt;br /&gt;
Listed below are a number of pages that should help you to get stated on the CityLab testbed. Since this Wiki is still very much a work in progress the documentation is far from complete. If you get stuck or you have a question and you can&#039;t find the answer on this wiki, please don&#039;t hesitate to contact us. You can reach us at {{SafeMailTo|admin|lab.cityofthings.eu}}. We&#039;ll be happy to help you along and update the documentation where necessary.&lt;br /&gt;
&lt;br /&gt;
Since July 2019 some of the Citylab nodes have been equipped with an &amp;lt;i&amp;gt;ath9k&amp;lt;/i&amp;gt; WiFi card to facilitate experiments that require more low-level &amp;quot;tinkering&amp;quot; with the WiFi-stack. See &amp;lt;b&amp;gt;[[Node Specifications|this page]]&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;[[List of Hardware per Node|this page]]&amp;lt;/b&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Update:&amp;lt;/b&amp;gt; Since January 2020 it is no longer needed to be a member of the &#039;&#039;CityOfThings&#039;&#039; project on the legacy [https://authority.ilabt.iminds.be iMinds Authority]. Instead, authorisation to use Citylab can be requested for individual JFed-projects by sending an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}}. Once a project has been authorised all its members will automatically be granted access. See the [[Getting Started]] guide for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Useful Pages ==&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Usage Policy]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Node Specifications]]&lt;br /&gt;
* [[Nodes | Node Locations]]&lt;br /&gt;
* [[Disk Images | Available Disk Images ]]&lt;br /&gt;
* [[List of Hardware per Node ]]&lt;br /&gt;
* [[GRE Tunnels ]]&lt;br /&gt;
* [[Past Experiments and Usage]]&lt;br /&gt;
&lt;br /&gt;
== Testbed nodes ==&lt;br /&gt;
&lt;br /&gt;
A full-screen version of this map can be found [https://doc.lab.cityofthings.eu/nodemap/ here]. An explanation on how to use this map can be found [[Getting Started#Using the node map | here]].&lt;br /&gt;
&amp;lt;iframe key=&amp;quot;docs&amp;quot; path=&amp;quot;nodemap/?embed=1&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;800&amp;quot; /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=348</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=348"/>
		<updated>2022-07-08T12:52:56Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Fire at City Campus University of Antwerp */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to CityLab, the City of Things smart cities FIRE testbed.&lt;br /&gt;
&lt;br /&gt;
This testbed is intended for wireless networking experimentation in the unlicensed spectrum. It is located in the city center of Antwerp, Belgium, and belongs to the University of Antwerp/imec. The testbed can be found in the streets in and around the city campus of the University of Antwerp, in an area of about 0.5km by 0.5km. See [[#Testbed nodes|below]] for a map of the testbed.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;b&amp;gt;Fire at City Campus University of Antwerp&amp;lt;/b&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
On the 6th of July 2022 there was a [https://www.gva.be/cnt/dmf20220706_94596904 huge fire at the City Campus of the University of Antwerp]. Since most of the Citylab nodes are deployed on that campus, this fire has also caused a large number of nodes of the Citylab testbed to go down. This section contains the latest status on the citylab testbed and will be updated when new information becomes available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/08 14:52): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since yesterday, some citylab nodes have started coming back online as a result of power being restored to (some of) the buildings.&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 12, 14-18,21,24,27-28 have come back online&lt;br /&gt;
* Nodes 7-11,13,19,22,23,25,26,32-36 are still offline&lt;br /&gt;
* Nodes 2-6, 71-74 were unaffected by the fire and are still operational&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/07 10:32): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 7-19, 21-28, 33-36 are offline as a result of the fire. &lt;br /&gt;
* Nodes 2-6, 71-74 are unaffected by the fire&lt;br /&gt;
&lt;br /&gt;
At this point it is not clear when each of the downed nodes will be brought back online. We suspect that many of the downed nodes went offline as a result of the Fire Department cutting electricity to some of the buildings and we hope to be able to bring those nodes back online in the not too distant future. &lt;br /&gt;
&lt;br /&gt;
Some of the downed nodes however are deployed against the buildings that suffered the most damage and their future is not at all certain. It is quite possible that these nodes will either remain offline for an extensive period of time or will have to be removed from the testbed permanently.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Hardware currently is hosted at 32 locations with another 22 planned,. Each location has its own [[Node Specifications|gateway]] attached to houses in the street or installed on a pole on a roof. See [[Nodes | Node Locations]].&lt;br /&gt;
&lt;br /&gt;
[[File:Citylab deployment.png|400px|thumb|right|Citylab deployment in the city center.]] &lt;br /&gt;
&lt;br /&gt;
The following technologies are deployed in the Citylab testbed:&lt;br /&gt;
* WiFi 802.11ac on 2.4 GHz and 5GHz&lt;br /&gt;
* WiFi 802.11n on 2.4 GHz and 5GHz&lt;br /&gt;
* Bluetooth 4.0 &lt;br /&gt;
* IEEE 802.15.4 on 2.4 GHz and IEEE 802.15.4g on 868MHz&lt;br /&gt;
* [http://www.dash7-alliance.org/ DASH7] on 433MHz and 868MHz&lt;br /&gt;
* [https://www.lora-alliance.org/ LoRaWAN] on 868MHz (client only)&lt;br /&gt;
&lt;br /&gt;
For more information about the exact hardware use, please conssult the [[Node Specifications]] page.&lt;br /&gt;
&lt;br /&gt;
CityLab is part of the [https://doc.ilabt.imec.be/ilabt/# larger imec iLab.t testbed offer]. &lt;br /&gt;
&lt;br /&gt;
Listed below are a number of pages that should help you to get stated on the CityLab testbed. Since this Wiki is still very much a work in progress the documentation is far from complete. If you get stuck or you have a question and you can&#039;t find the answer on this wiki, please don&#039;t hesitate to contact us. You can reach us at {{SafeMailTo|admin|lab.cityofthings.eu}}. We&#039;ll be happy to help you along and update the documentation where necessary.&lt;br /&gt;
&lt;br /&gt;
Since July 2019 some of the Citylab nodes have been equipped with an &amp;lt;i&amp;gt;ath9k&amp;lt;/i&amp;gt; WiFi card to facilitate experiments that require more low-level &amp;quot;tinkering&amp;quot; with the WiFi-stack. See &amp;lt;b&amp;gt;[[Node Specifications|this page]]&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;[[List of Hardware per Node|this page]]&amp;lt;/b&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Update:&amp;lt;/b&amp;gt; Since January 2020 it is no longer needed to be a member of the &#039;&#039;CityOfThings&#039;&#039; project on the legacy [https://authority.ilabt.iminds.be iMinds Authority]. Instead, authorisation to use Citylab can be requested for individual JFed-projects by sending an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}}. Once a project has been authorised all its members will automatically be granted access. See the [[Getting Started]] guide for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Useful Pages ==&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Usage Policy]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Node Specifications]]&lt;br /&gt;
* [[Nodes | Node Locations]]&lt;br /&gt;
* [[Disk Images | Available Disk Images ]]&lt;br /&gt;
* [[List of Hardware per Node ]]&lt;br /&gt;
* [[GRE Tunnels ]]&lt;br /&gt;
* [[Past Experiments and Usage]]&lt;br /&gt;
&lt;br /&gt;
== Testbed nodes ==&lt;br /&gt;
&lt;br /&gt;
A full-screen version of this map can be found [https://doc.lab.cityofthings.eu/nodemap/ here]. An explanation on how to use this map can be found [[Getting Started#Using the node map | here]].&lt;br /&gt;
&amp;lt;iframe key=&amp;quot;docs&amp;quot; path=&amp;quot;nodemap/?embed=1&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;800&amp;quot; /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=347</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=347"/>
		<updated>2022-07-08T12:52:42Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Fire at City Campus University of Antwerp */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to CityLab, the City of Things smart cities FIRE testbed.&lt;br /&gt;
&lt;br /&gt;
This testbed is intended for wireless networking experimentation in the unlicensed spectrum. It is located in the city center of Antwerp, Belgium, and belongs to the University of Antwerp/imec. The testbed can be found in the streets in and around the city campus of the University of Antwerp, in an area of about 0.5km by 0.5km. See [[#Testbed nodes|below]] for a map of the testbed.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;b&amp;gt;Fire at City Campus University of Antwerp&amp;lt;/b&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
On the 6th of July 2022 there was a [https://www.gva.be/cnt/dmf20220706_94596904 huge fire at the City Campus of the University of Antwerp]. Since most of the Citylab nodes are deployed on that campus, this fire has also caused a large number of nodes of the Citylab testbed to go down. This section contains the latest status on the citylab testbed and will be updated when new information becomes available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/08 10:32): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since yesterday, some citylab nodes have started coming back online as a result of power being restored to (some of) the buildings.&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 12, 14-18,21,24,27-28 have come back online&lt;br /&gt;
* Nodes 7-11,13,19,22,23,25,26,32-36 are still offline&lt;br /&gt;
* Nodes 2-6, 71-74 were unaffected by the fire and are still operational&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/07 10:32): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 7-19, 21-28, 33-36 are offline as a result of the fire. &lt;br /&gt;
* Nodes 2-6, 71-74 are unaffected by the fire&lt;br /&gt;
&lt;br /&gt;
At this point it is not clear when each of the downed nodes will be brought back online. We suspect that many of the downed nodes went offline as a result of the Fire Department cutting electricity to some of the buildings and we hope to be able to bring those nodes back online in the not too distant future. &lt;br /&gt;
&lt;br /&gt;
Some of the downed nodes however are deployed against the buildings that suffered the most damage and their future is not at all certain. It is quite possible that these nodes will either remain offline for an extensive period of time or will have to be removed from the testbed permanently.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Hardware currently is hosted at 32 locations with another 22 planned,. Each location has its own [[Node Specifications|gateway]] attached to houses in the street or installed on a pole on a roof. See [[Nodes | Node Locations]].&lt;br /&gt;
&lt;br /&gt;
[[File:Citylab deployment.png|400px|thumb|right|Citylab deployment in the city center.]] &lt;br /&gt;
&lt;br /&gt;
The following technologies are deployed in the Citylab testbed:&lt;br /&gt;
* WiFi 802.11ac on 2.4 GHz and 5GHz&lt;br /&gt;
* WiFi 802.11n on 2.4 GHz and 5GHz&lt;br /&gt;
* Bluetooth 4.0 &lt;br /&gt;
* IEEE 802.15.4 on 2.4 GHz and IEEE 802.15.4g on 868MHz&lt;br /&gt;
* [http://www.dash7-alliance.org/ DASH7] on 433MHz and 868MHz&lt;br /&gt;
* [https://www.lora-alliance.org/ LoRaWAN] on 868MHz (client only)&lt;br /&gt;
&lt;br /&gt;
For more information about the exact hardware use, please conssult the [[Node Specifications]] page.&lt;br /&gt;
&lt;br /&gt;
CityLab is part of the [https://doc.ilabt.imec.be/ilabt/# larger imec iLab.t testbed offer]. &lt;br /&gt;
&lt;br /&gt;
Listed below are a number of pages that should help you to get stated on the CityLab testbed. Since this Wiki is still very much a work in progress the documentation is far from complete. If you get stuck or you have a question and you can&#039;t find the answer on this wiki, please don&#039;t hesitate to contact us. You can reach us at {{SafeMailTo|admin|lab.cityofthings.eu}}. We&#039;ll be happy to help you along and update the documentation where necessary.&lt;br /&gt;
&lt;br /&gt;
Since July 2019 some of the Citylab nodes have been equipped with an &amp;lt;i&amp;gt;ath9k&amp;lt;/i&amp;gt; WiFi card to facilitate experiments that require more low-level &amp;quot;tinkering&amp;quot; with the WiFi-stack. See &amp;lt;b&amp;gt;[[Node Specifications|this page]]&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;[[List of Hardware per Node|this page]]&amp;lt;/b&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Update:&amp;lt;/b&amp;gt; Since January 2020 it is no longer needed to be a member of the &#039;&#039;CityOfThings&#039;&#039; project on the legacy [https://authority.ilabt.iminds.be iMinds Authority]. Instead, authorisation to use Citylab can be requested for individual JFed-projects by sending an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}}. Once a project has been authorised all its members will automatically be granted access. See the [[Getting Started]] guide for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Useful Pages ==&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Usage Policy]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Node Specifications]]&lt;br /&gt;
* [[Nodes | Node Locations]]&lt;br /&gt;
* [[Disk Images | Available Disk Images ]]&lt;br /&gt;
* [[List of Hardware per Node ]]&lt;br /&gt;
* [[GRE Tunnels ]]&lt;br /&gt;
* [[Past Experiments and Usage]]&lt;br /&gt;
&lt;br /&gt;
== Testbed nodes ==&lt;br /&gt;
&lt;br /&gt;
A full-screen version of this map can be found [https://doc.lab.cityofthings.eu/nodemap/ here]. An explanation on how to use this map can be found [[Getting Started#Using the node map | here]].&lt;br /&gt;
&amp;lt;iframe key=&amp;quot;docs&amp;quot; path=&amp;quot;nodemap/?embed=1&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;800&amp;quot; /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=346</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=346"/>
		<updated>2022-07-07T11:17:41Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Fire at City Campus University of Antwerp */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to CityLab, the City of Things smart cities FIRE testbed.&lt;br /&gt;
&lt;br /&gt;
This testbed is intended for wireless networking experimentation in the unlicensed spectrum. It is located in the city center of Antwerp, Belgium, and belongs to the University of Antwerp/imec. The testbed can be found in the streets in and around the city campus of the University of Antwerp, in an area of about 0.5km by 0.5km. See [[#Testbed nodes|below]] for a map of the testbed.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;b&amp;gt;Fire at City Campus University of Antwerp&amp;lt;/b&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
On the 6th of July 2022 there was a [https://www.gva.be/cnt/dmf20220706_94596904 huge fire at the City Campus of the University of Antwerp]. Since most of the Citylab nodes are deployed on that campus, this fire has also caused a large number of nodes of the Citylab testbed to go down. This section contains the latest status on the citylab testbed and will be updated when new information becomes available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/07 10:32): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 7-19, 21-28, 33-36 are offline as a result of the fire. &lt;br /&gt;
* Nodes 2-6, 71-74 are unaffected by the fire&lt;br /&gt;
&lt;br /&gt;
At this point it is not clear when each of the downed nodes will be brought back online. We suspect that many of the downed nodes went offline as a result of the Fire Department cutting electricity to some of the buildings and we hope to be able to bring those nodes back online in the not too distant future. &lt;br /&gt;
&lt;br /&gt;
Some of the downed nodes however are deployed against the buildings that suffered the most damage and their future is not at all certain. It is quite possible that these nodes will either remain offline for an extensive period of time or will have to be removed from the testbed permanently.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Hardware currently is hosted at 32 locations with another 22 planned,. Each location has its own [[Node Specifications|gateway]] attached to houses in the street or installed on a pole on a roof. See [[Nodes | Node Locations]].&lt;br /&gt;
&lt;br /&gt;
[[File:Citylab deployment.png|400px|thumb|right|Citylab deployment in the city center.]] &lt;br /&gt;
&lt;br /&gt;
The following technologies are deployed in the Citylab testbed:&lt;br /&gt;
* WiFi 802.11ac on 2.4 GHz and 5GHz&lt;br /&gt;
* WiFi 802.11n on 2.4 GHz and 5GHz&lt;br /&gt;
* Bluetooth 4.0 &lt;br /&gt;
* IEEE 802.15.4 on 2.4 GHz and IEEE 802.15.4g on 868MHz&lt;br /&gt;
* [http://www.dash7-alliance.org/ DASH7] on 433MHz and 868MHz&lt;br /&gt;
* [https://www.lora-alliance.org/ LoRaWAN] on 868MHz (client only)&lt;br /&gt;
&lt;br /&gt;
For more information about the exact hardware use, please conssult the [[Node Specifications]] page.&lt;br /&gt;
&lt;br /&gt;
CityLab is part of the [https://doc.ilabt.imec.be/ilabt/# larger imec iLab.t testbed offer]. &lt;br /&gt;
&lt;br /&gt;
Listed below are a number of pages that should help you to get stated on the CityLab testbed. Since this Wiki is still very much a work in progress the documentation is far from complete. If you get stuck or you have a question and you can&#039;t find the answer on this wiki, please don&#039;t hesitate to contact us. You can reach us at {{SafeMailTo|admin|lab.cityofthings.eu}}. We&#039;ll be happy to help you along and update the documentation where necessary.&lt;br /&gt;
&lt;br /&gt;
Since July 2019 some of the Citylab nodes have been equipped with an &amp;lt;i&amp;gt;ath9k&amp;lt;/i&amp;gt; WiFi card to facilitate experiments that require more low-level &amp;quot;tinkering&amp;quot; with the WiFi-stack. See &amp;lt;b&amp;gt;[[Node Specifications|this page]]&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;[[List of Hardware per Node|this page]]&amp;lt;/b&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Update:&amp;lt;/b&amp;gt; Since January 2020 it is no longer needed to be a member of the &#039;&#039;CityOfThings&#039;&#039; project on the legacy [https://authority.ilabt.iminds.be iMinds Authority]. Instead, authorisation to use Citylab can be requested for individual JFed-projects by sending an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}}. Once a project has been authorised all its members will automatically be granted access. See the [[Getting Started]] guide for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Useful Pages ==&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Usage Policy]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Node Specifications]]&lt;br /&gt;
* [[Nodes | Node Locations]]&lt;br /&gt;
* [[Disk Images | Available Disk Images ]]&lt;br /&gt;
* [[List of Hardware per Node ]]&lt;br /&gt;
* [[GRE Tunnels ]]&lt;br /&gt;
* [[Past Experiments and Usage]]&lt;br /&gt;
&lt;br /&gt;
== Testbed nodes ==&lt;br /&gt;
&lt;br /&gt;
A full-screen version of this map can be found [https://doc.lab.cityofthings.eu/nodemap/ here]. An explanation on how to use this map can be found [[Getting Started#Using the node map | here]].&lt;br /&gt;
&amp;lt;iframe key=&amp;quot;docs&amp;quot; path=&amp;quot;nodemap/?embed=1&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;800&amp;quot; /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=345</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=345"/>
		<updated>2022-07-07T11:16:01Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Fire at City Campus University of Antwerp */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to CityLab, the City of Things smart cities FIRE testbed.&lt;br /&gt;
&lt;br /&gt;
This testbed is intended for wireless networking experimentation in the unlicensed spectrum. It is located in the city center of Antwerp, Belgium, and belongs to the University of Antwerp/imec. The testbed can be found in the streets in and around the city campus of the University of Antwerp, in an area of about 0.5km by 0.5km. See [[#Testbed nodes|below]] for a map of the testbed.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;b&amp;gt;Fire at City Campus University of Antwerp&amp;lt;/b&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
On the 6th of July 2022 there was a [https://www.gva.be/cnt/dmf20220706_94596904 huge fire at the City Campus of the University of Antwerp]. Since most of the Citylab nodes are deployed on that campus, this fire has also caused a large number of nodes of the Citylab testbed to go down. This section contains the latest status on the citylab testbed and will be updated when new information becomes available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/07 10:32): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 7-19, 21-28, 33-36 are offline as a result of the fire. &lt;br /&gt;
* Nodes 2-6, 71-74 are unaffected by the fire&lt;br /&gt;
&lt;br /&gt;
At this point it is not clear when each of the downed nodes will be brought back online. We suspect that many of the downed nodes went offline as a result of the Fire Department cutting electricity to some of the buildings and we hope to be able to bring those nodes back online in the not too distant future. &lt;br /&gt;
&lt;br /&gt;
Some of the downed nodes however (more specifically nodes 10-13 and 34,35) are deployed against the buildings that suffered the most damage and their future is not at all certain. It is quite possible that these nodes will either remain offline for an extensive period of time or will have to be removed from the testbed permanently.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Hardware currently is hosted at 32 locations with another 22 planned,. Each location has its own [[Node Specifications|gateway]] attached to houses in the street or installed on a pole on a roof. See [[Nodes | Node Locations]].&lt;br /&gt;
&lt;br /&gt;
[[File:Citylab deployment.png|400px|thumb|right|Citylab deployment in the city center.]] &lt;br /&gt;
&lt;br /&gt;
The following technologies are deployed in the Citylab testbed:&lt;br /&gt;
* WiFi 802.11ac on 2.4 GHz and 5GHz&lt;br /&gt;
* WiFi 802.11n on 2.4 GHz and 5GHz&lt;br /&gt;
* Bluetooth 4.0 &lt;br /&gt;
* IEEE 802.15.4 on 2.4 GHz and IEEE 802.15.4g on 868MHz&lt;br /&gt;
* [http://www.dash7-alliance.org/ DASH7] on 433MHz and 868MHz&lt;br /&gt;
* [https://www.lora-alliance.org/ LoRaWAN] on 868MHz (client only)&lt;br /&gt;
&lt;br /&gt;
For more information about the exact hardware use, please conssult the [[Node Specifications]] page.&lt;br /&gt;
&lt;br /&gt;
CityLab is part of the [https://doc.ilabt.imec.be/ilabt/# larger imec iLab.t testbed offer]. &lt;br /&gt;
&lt;br /&gt;
Listed below are a number of pages that should help you to get stated on the CityLab testbed. Since this Wiki is still very much a work in progress the documentation is far from complete. If you get stuck or you have a question and you can&#039;t find the answer on this wiki, please don&#039;t hesitate to contact us. You can reach us at {{SafeMailTo|admin|lab.cityofthings.eu}}. We&#039;ll be happy to help you along and update the documentation where necessary.&lt;br /&gt;
&lt;br /&gt;
Since July 2019 some of the Citylab nodes have been equipped with an &amp;lt;i&amp;gt;ath9k&amp;lt;/i&amp;gt; WiFi card to facilitate experiments that require more low-level &amp;quot;tinkering&amp;quot; with the WiFi-stack. See &amp;lt;b&amp;gt;[[Node Specifications|this page]]&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;[[List of Hardware per Node|this page]]&amp;lt;/b&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Update:&amp;lt;/b&amp;gt; Since January 2020 it is no longer needed to be a member of the &#039;&#039;CityOfThings&#039;&#039; project on the legacy [https://authority.ilabt.iminds.be iMinds Authority]. Instead, authorisation to use Citylab can be requested for individual JFed-projects by sending an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}}. Once a project has been authorised all its members will automatically be granted access. See the [[Getting Started]] guide for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Useful Pages ==&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Usage Policy]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Node Specifications]]&lt;br /&gt;
* [[Nodes | Node Locations]]&lt;br /&gt;
* [[Disk Images | Available Disk Images ]]&lt;br /&gt;
* [[List of Hardware per Node ]]&lt;br /&gt;
* [[GRE Tunnels ]]&lt;br /&gt;
* [[Past Experiments and Usage]]&lt;br /&gt;
&lt;br /&gt;
== Testbed nodes ==&lt;br /&gt;
&lt;br /&gt;
A full-screen version of this map can be found [https://doc.lab.cityofthings.eu/nodemap/ here]. An explanation on how to use this map can be found [[Getting Started#Using the node map | here]].&lt;br /&gt;
&amp;lt;iframe key=&amp;quot;docs&amp;quot; path=&amp;quot;nodemap/?embed=1&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;800&amp;quot; /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=344</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=344"/>
		<updated>2022-07-07T11:00:26Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Fire at City Campus University of Antwerp */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to CityLab, the City of Things smart cities FIRE testbed.&lt;br /&gt;
&lt;br /&gt;
This testbed is intended for wireless networking experimentation in the unlicensed spectrum. It is located in the city center of Antwerp, Belgium, and belongs to the University of Antwerp/imec. The testbed can be found in the streets in and around the city campus of the University of Antwerp, in an area of about 0.5km by 0.5km. See [[#Testbed nodes|below]] for a map of the testbed.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;b&amp;gt;Fire at City Campus University of Antwerp&amp;lt;/b&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
On the 6th of July 2022 there was a [https://www.gva.be/cnt/dmf20220706_94596904 huge fire at the City Campus of the University of Antwerp]. Since most of the Citylab nodes are deployed on that campus, this fire has also caused a large number of nodes of the Citylab testbed to go down. This section contains the latest status on the citylab testbed and will be updated when new information becomes available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/07 10:32): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 7-19, 21-28, 33-36 are offline as a result of the fire. &lt;br /&gt;
* Nodes 2-6, 71-74 are unaffected by the fire&lt;br /&gt;
&lt;br /&gt;
At this point it is not clear when each of the downed nodes will be brought back online. We suspect that many of the downed nodes went offline as a result of the Fire Department cutting electricity to some of the buildings and we hope to be able to bring those nodes back online in the not too distant future. &lt;br /&gt;
&lt;br /&gt;
Some of the downed nodes however (more specifically nodes 10-13 and 34,35) are deployed against the building that suffered the most fire damage and their future is not at all certain. It is quite possible that these nodes will either remain offline for a long time or will have to be removed from the testbed permanently.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Hardware currently is hosted at 32 locations with another 22 planned,. Each location has its own [[Node Specifications|gateway]] attached to houses in the street or installed on a pole on a roof. See [[Nodes | Node Locations]].&lt;br /&gt;
&lt;br /&gt;
[[File:Citylab deployment.png|400px|thumb|right|Citylab deployment in the city center.]] &lt;br /&gt;
&lt;br /&gt;
The following technologies are deployed in the Citylab testbed:&lt;br /&gt;
* WiFi 802.11ac on 2.4 GHz and 5GHz&lt;br /&gt;
* WiFi 802.11n on 2.4 GHz and 5GHz&lt;br /&gt;
* Bluetooth 4.0 &lt;br /&gt;
* IEEE 802.15.4 on 2.4 GHz and IEEE 802.15.4g on 868MHz&lt;br /&gt;
* [http://www.dash7-alliance.org/ DASH7] on 433MHz and 868MHz&lt;br /&gt;
* [https://www.lora-alliance.org/ LoRaWAN] on 868MHz (client only)&lt;br /&gt;
&lt;br /&gt;
For more information about the exact hardware use, please conssult the [[Node Specifications]] page.&lt;br /&gt;
&lt;br /&gt;
CityLab is part of the [https://doc.ilabt.imec.be/ilabt/# larger imec iLab.t testbed offer]. &lt;br /&gt;
&lt;br /&gt;
Listed below are a number of pages that should help you to get stated on the CityLab testbed. Since this Wiki is still very much a work in progress the documentation is far from complete. If you get stuck or you have a question and you can&#039;t find the answer on this wiki, please don&#039;t hesitate to contact us. You can reach us at {{SafeMailTo|admin|lab.cityofthings.eu}}. We&#039;ll be happy to help you along and update the documentation where necessary.&lt;br /&gt;
&lt;br /&gt;
Since July 2019 some of the Citylab nodes have been equipped with an &amp;lt;i&amp;gt;ath9k&amp;lt;/i&amp;gt; WiFi card to facilitate experiments that require more low-level &amp;quot;tinkering&amp;quot; with the WiFi-stack. See &amp;lt;b&amp;gt;[[Node Specifications|this page]]&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;[[List of Hardware per Node|this page]]&amp;lt;/b&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Update:&amp;lt;/b&amp;gt; Since January 2020 it is no longer needed to be a member of the &#039;&#039;CityOfThings&#039;&#039; project on the legacy [https://authority.ilabt.iminds.be iMinds Authority]. Instead, authorisation to use Citylab can be requested for individual JFed-projects by sending an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}}. Once a project has been authorised all its members will automatically be granted access. See the [[Getting Started]] guide for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Useful Pages ==&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Usage Policy]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Node Specifications]]&lt;br /&gt;
* [[Nodes | Node Locations]]&lt;br /&gt;
* [[Disk Images | Available Disk Images ]]&lt;br /&gt;
* [[List of Hardware per Node ]]&lt;br /&gt;
* [[GRE Tunnels ]]&lt;br /&gt;
* [[Past Experiments and Usage]]&lt;br /&gt;
&lt;br /&gt;
== Testbed nodes ==&lt;br /&gt;
&lt;br /&gt;
A full-screen version of this map can be found [https://doc.lab.cityofthings.eu/nodemap/ here]. An explanation on how to use this map can be found [[Getting Started#Using the node map | here]].&lt;br /&gt;
&amp;lt;iframe key=&amp;quot;docs&amp;quot; path=&amp;quot;nodemap/?embed=1&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;800&amp;quot; /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=343</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=343"/>
		<updated>2022-07-07T08:59:10Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to CityLab, the City of Things smart cities FIRE testbed.&lt;br /&gt;
&lt;br /&gt;
This testbed is intended for wireless networking experimentation in the unlicensed spectrum. It is located in the city center of Antwerp, Belgium, and belongs to the University of Antwerp/imec. The testbed can be found in the streets in and around the city campus of the University of Antwerp, in an area of about 0.5km by 0.5km. See [[#Testbed nodes|below]] for a map of the testbed.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;b&amp;gt;Fire at City Campus University of Antwerp&amp;lt;/b&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
On the 6th of July 2022 there was a [https://www.gva.be/cnt/dmf20220706_94596904 huge fire at the City Campus of the University of Antwerp]. Since most of the Citylab nodes are deployed on that campus, this fire has also caused a large number of nodes of the Citylab testbed to go down. This section contains the latest status on the citylab testbed and will be updated when new information becomes available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/07 10:32): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 7-19, 21-28, 33-36 are offline as a result of the fire. &lt;br /&gt;
* Nodes 2-6, 71-74 are unaffected by the fire&lt;br /&gt;
&lt;br /&gt;
At this point it is not clear when each of the downed nodes will be brought back online. We suspect that many of the downed nodes went offline as a result of the as a result of the Fire Department cutting electricity to some of the buildings and we hope to be able to bring those nodes back online in the not too distant future. &lt;br /&gt;
&lt;br /&gt;
Some of the downed nodes however (more specifically nodes 10-13 and 34,35) are deployed against the building that suffered the most fire damage and their future is not at all certain. It is quite possible that these nodes will either remain offline for a long time or will have to be removed from the testbed permanently.&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Hardware currently is hosted at 32 locations with another 22 planned,. Each location has its own [[Node Specifications|gateway]] attached to houses in the street or installed on a pole on a roof. See [[Nodes | Node Locations]].&lt;br /&gt;
&lt;br /&gt;
[[File:Citylab deployment.png|400px|thumb|right|Citylab deployment in the city center.]] &lt;br /&gt;
&lt;br /&gt;
The following technologies are deployed in the Citylab testbed:&lt;br /&gt;
* WiFi 802.11ac on 2.4 GHz and 5GHz&lt;br /&gt;
* WiFi 802.11n on 2.4 GHz and 5GHz&lt;br /&gt;
* Bluetooth 4.0 &lt;br /&gt;
* IEEE 802.15.4 on 2.4 GHz and IEEE 802.15.4g on 868MHz&lt;br /&gt;
* [http://www.dash7-alliance.org/ DASH7] on 433MHz and 868MHz&lt;br /&gt;
* [https://www.lora-alliance.org/ LoRaWAN] on 868MHz (client only)&lt;br /&gt;
&lt;br /&gt;
For more information about the exact hardware use, please conssult the [[Node Specifications]] page.&lt;br /&gt;
&lt;br /&gt;
CityLab is part of the [https://doc.ilabt.imec.be/ilabt/# larger imec iLab.t testbed offer]. &lt;br /&gt;
&lt;br /&gt;
Listed below are a number of pages that should help you to get stated on the CityLab testbed. Since this Wiki is still very much a work in progress the documentation is far from complete. If you get stuck or you have a question and you can&#039;t find the answer on this wiki, please don&#039;t hesitate to contact us. You can reach us at {{SafeMailTo|admin|lab.cityofthings.eu}}. We&#039;ll be happy to help you along and update the documentation where necessary.&lt;br /&gt;
&lt;br /&gt;
Since July 2019 some of the Citylab nodes have been equipped with an &amp;lt;i&amp;gt;ath9k&amp;lt;/i&amp;gt; WiFi card to facilitate experiments that require more low-level &amp;quot;tinkering&amp;quot; with the WiFi-stack. See &amp;lt;b&amp;gt;[[Node Specifications|this page]]&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;[[List of Hardware per Node|this page]]&amp;lt;/b&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Update:&amp;lt;/b&amp;gt; Since January 2020 it is no longer needed to be a member of the &#039;&#039;CityOfThings&#039;&#039; project on the legacy [https://authority.ilabt.iminds.be iMinds Authority]. Instead, authorisation to use Citylab can be requested for individual JFed-projects by sending an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}}. Once a project has been authorised all its members will automatically be granted access. See the [[Getting Started]] guide for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Useful Pages ==&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Usage Policy]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Node Specifications]]&lt;br /&gt;
* [[Nodes | Node Locations]]&lt;br /&gt;
* [[Disk Images | Available Disk Images ]]&lt;br /&gt;
* [[List of Hardware per Node ]]&lt;br /&gt;
* [[GRE Tunnels ]]&lt;br /&gt;
* [[Past Experiments and Usage]]&lt;br /&gt;
&lt;br /&gt;
== Testbed nodes ==&lt;br /&gt;
&lt;br /&gt;
A full-screen version of this map can be found [https://doc.lab.cityofthings.eu/nodemap/ here]. An explanation on how to use this map can be found [[Getting Started#Using the node map | here]].&lt;br /&gt;
&amp;lt;iframe key=&amp;quot;docs&amp;quot; path=&amp;quot;nodemap/?embed=1&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;800&amp;quot; /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=342</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=Main_Page&amp;diff=342"/>
		<updated>2022-07-07T08:58:11Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to CityLab, the City of Things smart cities FIRE testbed.&lt;br /&gt;
&lt;br /&gt;
This testbed is intended for wireless networking experimentation in the unlicensed spectrum. It is located in the city center of Antwerp, Belgium, and belongs to the University of Antwerp/imec. The testbed can be found in the streets in and around the city campus of the University of Antwerp, in an area of about 0.5km by 0.5km. See [[#Testbed nodes|below]] for a map of the testbed.&lt;br /&gt;
&lt;br /&gt;
Hardware currently is hosted at 32 locations with another 22 planned,. Each location has its own [[Node Specifications|gateway]] attached to houses in the street or installed on a pole on a roof. See [[Nodes | Node Locations]].&lt;br /&gt;
&lt;br /&gt;
[[File:Citylab deployment.png|400px|thumb|right|Citylab deployment in the city center.]] &lt;br /&gt;
&lt;br /&gt;
The following technologies are deployed in the Citylab testbed:&lt;br /&gt;
* WiFi 802.11ac on 2.4 GHz and 5GHz&lt;br /&gt;
* WiFi 802.11n on 2.4 GHz and 5GHz&lt;br /&gt;
* Bluetooth 4.0 &lt;br /&gt;
* IEEE 802.15.4 on 2.4 GHz and IEEE 802.15.4g on 868MHz&lt;br /&gt;
* [http://www.dash7-alliance.org/ DASH7] on 433MHz and 868MHz&lt;br /&gt;
* [https://www.lora-alliance.org/ LoRaWAN] on 868MHz (client only)&lt;br /&gt;
&lt;br /&gt;
For more information about the exact hardware use, please conssult the [[Node Specifications]] page.&lt;br /&gt;
&lt;br /&gt;
CityLab is part of the [https://doc.ilabt.imec.be/ilabt/# larger imec iLab.t testbed offer]. &lt;br /&gt;
&lt;br /&gt;
Listed below are a number of pages that should help you to get stated on the CityLab testbed. Since this Wiki is still very much a work in progress the documentation is far from complete. If you get stuck or you have a question and you can&#039;t find the answer on this wiki, please don&#039;t hesitate to contact us. You can reach us at {{SafeMailTo|admin|lab.cityofthings.eu}}. We&#039;ll be happy to help you along and update the documentation where necessary.&lt;br /&gt;
&lt;br /&gt;
Since July 2019 some of the Citylab nodes have been equipped with an &amp;lt;i&amp;gt;ath9k&amp;lt;/i&amp;gt; WiFi card to facilitate experiments that require more low-level &amp;quot;tinkering&amp;quot; with the WiFi-stack. See &amp;lt;b&amp;gt;[[Node Specifications|this page]]&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;[[List of Hardware per Node|this page]]&amp;lt;/b&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Update:&amp;lt;/b&amp;gt; Since January 2020 it is no longer needed to be a member of the &#039;&#039;CityOfThings&#039;&#039; project on the legacy [https://authority.ilabt.iminds.be iMinds Authority]. Instead, authorisation to use Citylab can be requested for individual JFed-projects by sending an e-mail to {{SafeMailTo|admin|lab.cityofthings.eu}}. Once a project has been authorised all its members will automatically be granted access. See the [[Getting Started]] guide for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;b&amp;gt;Fire at City Campus University of Antwerp&amp;lt;/b&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
On the 6th of July 2022 there was a [https://www.gva.be/cnt/dmf20220706_94596904 huge fire at the City Campus of the University of Antwerp]. Since most of the Citylab nodes are deployed on that campus, this fire has also caused a large number of nodes of the Citylab testbed to go down. This section contains the latest status on the citylab testbed and will be updated when new information becomes available.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt; Update (2022/07/07 10:32): &amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently:&lt;br /&gt;
* Nodes 7-19, 21-28, 33-36 are offline as a result of the fire. &lt;br /&gt;
* Nodes 2-6, 71-74 are unaffected by the fire&lt;br /&gt;
&lt;br /&gt;
At this point it is not clear when each of the downed nodes will be brought back online. We suspect that many of the downed nodes went offline as a result of the as a result of the Fire Department cutting electricity to some of the buildings and we hope to be able to bring those nodes back online in the not too distant future. &lt;br /&gt;
&lt;br /&gt;
Some of the downed nodes however (more specifically nodes 10-13 and 34,35) are deployed against the building that suffered the most fire damage and their future is not at all certain. It is quite possible that these nodes will either remain offline for a long time or will have to be removed from the testbed permanently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Useful Pages ==&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Usage Policy]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Node Specifications]]&lt;br /&gt;
* [[Nodes | Node Locations]]&lt;br /&gt;
* [[Disk Images | Available Disk Images ]]&lt;br /&gt;
* [[List of Hardware per Node ]]&lt;br /&gt;
* [[GRE Tunnels ]]&lt;br /&gt;
* [[Past Experiments and Usage]]&lt;br /&gt;
&lt;br /&gt;
== Testbed nodes ==&lt;br /&gt;
&lt;br /&gt;
A full-screen version of this map can be found [https://doc.lab.cityofthings.eu/nodemap/ here]. An explanation on how to use this map can be found [[Getting Started#Using the node map | here]].&lt;br /&gt;
&amp;lt;iframe key=&amp;quot;docs&amp;quot; path=&amp;quot;nodemap/?embed=1&amp;quot; width=&amp;quot;100%&amp;quot; height=&amp;quot;800&amp;quot; /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=341</id>
		<title>GRE Tunnels</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=341"/>
		<updated>2021-08-11T12:07:18Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Setting up (E)GRE-Tunnels Citylab and the Virtual Wall */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At this point, the CityLab testbed only has limited support for &#039;&#039;automatically&#039;&#039; creating links between nodes using the JFed interface. Standard IP-in-IP GRE Tunnels and Ethernet-in-IP GRE Tunnels (&#039;&#039;gre-tunnel&#039;&#039; and &#039;&#039;egre-tunnel&#039;&#039; links in JFed) are supported. Adding support &#039;&#039;native&#039;&#039; Ethernet links (lan links in JFed) is on our TODO list. Since both &#039;gre&#039; and &#039;egre&#039; tunnels are point-to-point tunnels it is currently not (yet) possible to create a JFed-link with more than two connected nodes. As a workaround it &#039;&#039;is&#039;&#039; possible to bridge multiple &#039;egre&#039;-tunnels together into a single (tunneled) L2-network once the test has started.&lt;br /&gt;
&lt;br /&gt;
This page provides a quick How-To guide on how to create standard &#039;gre&#039; or &#039;egre-tunnels&#039; in JFed and then explains how to manually set up and bridge  egre-tunnels manually (after the test has started).&lt;br /&gt;
&lt;br /&gt;
== Creating Links between nodes through the JFed interface ==&lt;br /&gt;
&lt;br /&gt;
=== Setting up links ===&lt;br /&gt;
&lt;br /&gt;
Creating Links between nodes through the JFed interface is very straightforward and can be done as follows:&lt;br /&gt;
&lt;br /&gt;
* Start JFed, click on &#039;New&#039; and drag in two wireless nodes. For this tutorial we&#039;ll assume that these nodes are called &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;&lt;br /&gt;
* Edit the node properties so both nodes are sourced from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed. (By default Wilab2 is used).&amp;lt;p&amp;gt;[[File:Jfed_experiment_2_nodes.png|Drag in two nodes from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed and name them &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;|720px]]&amp;lt;/P&amp;gt;&lt;br /&gt;
* Drag a line from &#039;&#039;apu1&#039;&#039; to &#039;&#039;apu2&#039;&#039;. A &#039;&#039;link&#039;&#039; element connecting the two nodes is automatically created.&lt;br /&gt;
* If you are using JFed GUI 5.9 or above, link type of the link will already be set to &#039;gre&#039;. (This is shown between braces behind the name of the link). &amp;lt;p&amp;gt;[[File:Jfed_gre_link_2_nodes.png||300px]]&amp;lt;/p&amp;gt; If this is not the case, or you would like to create an &#039;egre&#039;-link instead, the link-type will need to be manually configured: &lt;br /&gt;
*# Right-click on the &#039;&#039;link&#039;&#039;-element, Click on &#039;&#039;Configure Link&#039;&#039; and select the &#039;&#039;Link Type&#039;&#039;-tab in the options window. &lt;br /&gt;
*# Change the link-type to &#039;gre-tunnel&#039; or &#039;egre-tunnel&#039; in the drop-down menu. If you select &#039;gre-tunnel&#039; an IP-in-IP tunnel will be created, if you select &#039;egre-tunnel&#039; an Ehternet-in-IP tunnel will be created. &amp;lt;p&amp;gt;[[File:JFed_link_options_type.png|Set the link-type to &#039;gre-tunnel&#039;|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
* JFed will automatically configure an IP-address on the tunnel interface for both nodes. optionally you can modify these IP-addresses in the &#039;&#039;General&#039;&#039; tab of the Link options-window &amp;lt;p&amp;gt;[[File:JFed_link_options_general.png|Changes the IP-addresses for the link if needed|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click &#039;Run&#039; to start your slice. When all nodes are green, your experiment has started and the GRE-tunnel between the two nodes has been configured. &amp;lt;p&amp;gt;[[File:JFed_gre_link_2_nodes_running.png|The running experiment|720px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*SSH into the &#039;&#039;apu1&#039;&#039; node. &lt;br /&gt;
*Run &amp;lt;code&amp;gt;ifconfig link02&amp;lt;/code&amp;gt; to verify that the GRE-tunnel has been created&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ifconfig link02&lt;br /&gt;
link02    Link encap:UNSPEC  HWaddr 8F-81-55-10-00-00-80-3F-00-00-00-00-00-00-00-00&lt;br /&gt;
          inet addr:192.168.0.1  P-t-P:192.168.0.1  Mask:255.255.255.0&lt;br /&gt;
          inet6 addr: fe80::200:5efe:8f81:5510/64 Scope:Link&lt;br /&gt;
          UP POINTOPOINT RUNNING NOARP  MTU:1434  Metric:1&lt;br /&gt;
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 txqueuelen:1&lt;br /&gt;
          RX bytes:112 (112.0 B)  TX bytes:168 (168.0 B)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Ping the &#039;&#039;apu2&#039;&#039;-tunnel enpoint by running &amp;lt;code&amp;gt;ping -c 4 &amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;&amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; is the IP-address configured for the tunnel endpoint on &#039;&#039;apu2&#039;&#039;. If you have not changed this, this is &amp;lt;code&amp;gt;192.168.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ping -c 4 192.168.0.2&lt;br /&gt;
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=2.21 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=1.60 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=1.46 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=4 ttl=64 time=1.51 ms&lt;br /&gt;
&lt;br /&gt;
--- 192.168.0.2 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3004ms&lt;br /&gt;
rtt min/avg/max/mdev = 1.464/1.699/2.218/0.303 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
==== No more than 2 nodes per link ====&lt;br /&gt;
&lt;br /&gt;
It is not possible to create (E)GRE-links with more than two nodes. The JFed GUI does allow additional nodes to be added to the link, but when the test is started the link will only exist on two nodes. This limitation is caused by the fact that the GRE-protocol only supports point-to-point tunnels. It is possible to [[#Manually setting up EGRE-tunnels|set up]] and [[#Creating a link between three or more nodes|bridge]] multiple egre-tunnels, but this cannot be done through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== EGRE-tunnels only work with &#039;CoT&#039; disk images ====&lt;br /&gt;
&lt;br /&gt;
To enable support for &#039;egre-tunnel&#039; links, a few tweaks had to be made to the &#039;client-side&#039; emulab-tools installed in the testbed disk images. Since these tweaks are not (yet) incorporated in the upstream emulab-code base, they are also not present in the many emulab-images used around the world. &lt;br /&gt;
&lt;br /&gt;
We have added these tweaks to the &#039;CoT&#039; disk-images of the CityLab testbed (see [[Disk Images]]), so if you want to use egre-links you must use a &#039;CoT&#039; disk image.&lt;br /&gt;
&lt;br /&gt;
==== (E)GRE-tunnels between nodes of different testbeds cannot be created via JFed ====&lt;br /&gt;
&lt;br /&gt;
Even at the best of times, creating links between nodes of different testbeds is an &#039;experimental feature&#039; at best. While it is perfectly possible to set up GRE and EGRE tunnels between nodes of different testbeds, it is currently not possible to do so through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== Link impairment on GRE Tunnels cannot be configured through the JFed GUI ====&lt;br /&gt;
&lt;br /&gt;
The way JFed normally adds impairment to a link is by adding a so-called &#039;impairment node&#039; in between the nodes of a link to change the properties of the traffic flowing over the link. This mechanism however only works with ethernet interfaces and not with GRE Tunnels. That being said: it is possible to add link impairment to GRE tunnels manually. How to do so is [[#Setting_up_Link_impairment_on_GRE_Tunnels|explained below]].&lt;br /&gt;
&lt;br /&gt;
== Manually setting up EGRE-tunnels ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; although it is possible to manually set up GRE-tunnels it is much easier to do so through the JFed-interface. The only reason for creating them manually is to create a &#039;link&#039; between more than two nodes or to create links with nodes of another testbed (both of which are currently not supported through JFed)&lt;br /&gt;
&lt;br /&gt;
A number of [[:File:Gre-utils.tar.gz | scripts]] are provided to make it as easy as possible to create and manage EGRE-tunnels.&lt;br /&gt;
Before any EGRE-tunnels can be created, these scripts first need to be installed on every node.&lt;br /&gt;
This can be done by running the following one-liner:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will&lt;br /&gt;
* Download the [[:File:Gre-utils.tar.gz | Gre-utils.tar.gz]] archive&lt;br /&gt;
* Install the scripts in &amp;lt;code&amp;gt;/usr/local&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
&lt;br /&gt;
[[File:Jfed-link-2-nodes.png|thumb|right|A simple link between two nodes.]]&lt;br /&gt;
&lt;br /&gt;
A simple GRE tunnel can be created by running the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.1/24 link0 apu2&amp;lt;/code&amp;gt;&lt;br /&gt;
* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above commands &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and &amp;lt;code&amp;gt;apuX&amp;lt;/code&amp;gt; is the host to create a tunnel to. The optional &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can be used to automatically configure an IPv4-address on the newly created interface.&lt;br /&gt;
&lt;br /&gt;
To allow the node names configured in JFed to be used to configure GRE tunnels, the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script tries to behave somewhat intelligently when resolving hostnames:&lt;br /&gt;
* If the specified host is a Fully Qualified Domain Name (i.e: it contains a &#039;.&#039;), a regular DNS query is performed&lt;br /&gt;
* If the specified host is a simple hostname (no &#039;.&#039; in the hostname), the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script &#039;&#039;first&#039;&#039; tries to resolve the specified host to a node name specified in JFed. If this fails, the IP-address of the host is resolved using a normal DNS query. &lt;br /&gt;
* If the specified host is a valid IPv4 address, no DNS-resolution is performed.&lt;br /&gt;
&lt;br /&gt;
Once the GRE tunnel is created, it can be used just like any other Ethernet interface, except that the MTU is a bit lower than normal.&lt;br /&gt;
&lt;br /&gt;
Removing the tunnel is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script. &lt;br /&gt;
To remove the tunnels created above for example, the following command would have to be run on each node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-link-3-nodes.png|thumb|right|A slightly more complicated link between more than two nodes.]]&lt;br /&gt;
&lt;br /&gt;
Creating a link between more than two nodes is (slightly) more complicated since GRE only allows Point-to-Point tunnels to be created. To work around this, GRE Tunnels are created from one &#039;central&#039; node to all other nodes on the link. These GRE Tunnels are then &#039;bridged&#039; together on the central node to form a shared subnet. Such a &#039;GRE Bridge&#039; can easily be created using the &amp;lt;code&amp;gt;gre_add_bridge&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
The 3-node setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_bridge -c 192.168.0.1/24 link0 apu2 apu3&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;As for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script, &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and the &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can optionally be used to configure an IPv4 address on the interface. The remaining parameters, in this case &amp;lt;code&amp;gt;apu2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apu3&amp;lt;/code&amp;gt; are the hosts to connect to. The resolution of these hostnames to IP-addresses is done in exactly the same way as for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script.&lt;br /&gt;
#&lt;br /&gt;
#* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;apu3&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.3/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case &#039;&#039;apu1&#039;&#039; is used as the central node and &#039;&#039;apu2&#039;&#039; and &#039;&#039;apu3&#039;&#039; connect to it in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario.&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been created it can be used just like any other linux bridge. Additional interfaces can be added/removed using the &amp;lt;code&amp;gt;brctl&amp;lt;/code&amp;gt; command. The bridge&#039;s stastus can be queried using the &amp;lt;code&amp;gt;brctl show&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  user@apu1:~$ brctl show link0&lt;br /&gt;
  bridge name	bridge id		STP enabled	interfaces&lt;br /&gt;
  link0		8000.a2b74a105a76	no		link0_gre_0&lt;br /&gt;
  							link0_gre_1&lt;br /&gt;
In the above output, the &amp;lt;code&amp;gt;link0_gre_x&amp;lt;/code&amp;gt; interfaces are the GRE tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
Removing the &#039;GRE Bridge&#039; is done using the &amp;lt;code&amp;gt;gre_del_bridge_script&amp;lt;/code&amp;gt;. It is highly recommended to use this script to remove the bridge (rather than the &#039;&#039;brctl&#039;&#039; command) as this script not only removes the bridge itself, but also cleans up the GRE-tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
To remove the bridge created in the above example the following command would have to be run &lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039;: &amp;lt;code&amp;gt;sudo gre_del_bridge link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been removed, the GRE-Tunnels on the other nodes also need to be cleaned up. This is done in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
==== Single tunnel between two nodes ====&lt;br /&gt;
&lt;br /&gt;
GRE Tunnels are identified &#039;&#039;solely&#039;&#039; on the source and destination IP-address of the encapsulating packet. That means that it is &#039;&#039;not&#039;&#039; possible to establish two independent tunnels between the same two nodes at the same time.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between two nodes| two node]] scenario, this means that only a &#039;&#039;single&#039;&#039; link can be created between two nodes.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between three or more nodes| mutliple nodes]] scenario, a node can participate in multiple links as long as:&lt;br /&gt;
* each link uses a different &#039;central node&#039;&lt;br /&gt;
* each &#039;central node&#039; is only part of &#039;&#039;one&#039;&#039; link at the same time&lt;br /&gt;
&lt;br /&gt;
It should be noted however, that GRE Tunnels can be used in combination with VLAN-tagging, so if you &#039;&#039;really&#039;&#039; need to create multiple links between two nodes, you can do so by defining multiple VLANs on the GRE tunnel interface. This however is not something that can be done using the scripts provided here.&lt;br /&gt;
&lt;br /&gt;
==== Reduced MTU ====&lt;br /&gt;
&lt;br /&gt;
Using a GRE Tunnel incurs an overhead of 38 bytes. This is because the original Ethernet packet needs to be prefixed with an additional IP- and Ethernet-header in order to send it to the other tunnel endpoint. To prevent fragmentation, the linux kernel automatically reduces the MTU of the GRE-interface. As a result, the MTU &#039;&#039;inside&#039;&#039; the tunnel is 38 bytes lower than the MTU &#039;&#039;outside&#039;&#039; the tunnel.&lt;br /&gt;
&lt;br /&gt;
Except for a small decrease in performance this usually is not that big of a problem, with one notable exception. When, for instance, a WiFi AP-interface is bridged to a GRE Tunnel, the MTU is set to the smallest MTU of the &#039;slave&#039; interfaces (in this case the GRE-tunnel). This lower MTU however is &#039;&#039;&#039;not&#039;&#039;&#039; automagically communicated to the connected WiFi clients and as a result these clients may still send packets that are larger than the MTU of the bridge. Since these packets are subsequently dropped by the linux bridge, this can lead to all sorts of nasty problems. The most common of which are dropped UDP packets and TCP sessions seem to work fine and then suddenly hang when more than a few bytes at a time are sent over them.&lt;br /&gt;
&lt;br /&gt;
To resolve this issue the MTU of the other WiFi clients should be reduced to the MTU of the linux bridge. When static IP-addresses are used, this can easily be done using the &amp;lt;code&amp;gt;ip link&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  ip link set mtu &amp;lt;mtu&amp;gt; dev &amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If DHCP is used, the lower MTU should be advertised by the DHCP server.&lt;br /&gt;
&lt;br /&gt;
== Setting up EGRE-Tunnels Citylab and the Virtual Wall ==&lt;br /&gt;
&lt;br /&gt;
At this point it is not possible to set up &#039;multi-site&#039; (e)GRE tunnels through the JFed interface, but it is possible to do so manually after the test has started. The process of doing so is very similar to manually creating EGRE-Tunnels within the citylab testbed itself, but the following caveats need to be taken into account:&lt;br /&gt;
&lt;br /&gt;
* Setting up GRE Tunnels between nodes of different testbeds requires both endpoints to have a &#039;&#039;routable&#039;&#039; (i.e. public) IPv4 or IPv6 address and for GRE-traffic to be allowed by the firewall/router through which the nodes are connected to the internet. While all nodes of the citylab testbed meet the above requirement, this may not necessarily be the case for nodes of other testbeds.&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;MTU&#039;&#039; of the created link needs to be set manually. Otherwise you will most likely encounter MTU-mismatch issues given that, by default, the MTU of the created tunnel is calculated from the MTU of the uplink interface, and that not all testbeds use the same MTU on their uplink interface.&lt;br /&gt;
&lt;br /&gt;
* GRE tunnels are &#039;&#039;&#039;not encrypted&#039;&#039;&#039;. Any data you send over them is sent plain-text over the internet so make sure not to send any sensitive data over them without adding encryption in some other way. If you need a tunnel which encrypts the traffic as well, OpenVPN is most likely a better solution.&lt;br /&gt;
&lt;br /&gt;
The remainder of this section explains how to set up &#039;multi-site&#039; (e)gre tunnels. We specifically focus on setting up GRE tunnels between Citylab and the [https://doc.ilabt.imec.be/ilabt/virtualwall/|Virtual Wall], but setting up GRE tunnels to other testbeds should be very similar.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
* Make sure that all nodes involved are running &#039;&#039;at least&#039;&#039; Ubuntu 16.04 (EGRE tunnels are not supported in Ubuntu 14.04 and before). For citylab nodes this is the case by default, but for the nodes on the virtual wall you will have to explicitly specify a different disk image when you set up the experiment as that testbed uses &#039;Ubuntu 14.04&#039; by default.&lt;br /&gt;
&lt;br /&gt;
* Setting up multi-site (e)gre tunnels is done with the same &#039;helper scripts&#039; as [[#Manually_setting_up_EGRE-tunnels|used before]]. Before setting up the tunnels themselves, these scripts need to be installed on every node. This can be done using the following one-liner: &lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-2-nodes.png|thumb|right|A &#039;simple&#039; multi-site link with two nodes. &#039;citynode1&#039; is a node of the Citylab testbed. &#039;vwallnode1&#039; is a node of the Virtual Wall testbed.]]&lt;br /&gt;
A point-to-point (E)GRE tunnel can be created using the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# Run the &amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt; command on both hosts to learn their fully qualified domain names (FQDNs). E.g: &lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@citynode1:~# hostname&amp;amp;#10;citynode1.gretest.wall2-ilabt-iminds-be.lab.cityofthings.eu&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@vwallnode1:~# hostname&amp;amp;#10;vwallnode1.gretest.wall2-ilabt-iminds-be.wall2.ilabt.iminds.be&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: As shown in the examples above the FQDNs of the nodes depends not only on the hostname configured in JFed but also on the name of the experiment, project and the testbed the node belongs to. Therefore yuo will almost certainly need to use different FQDNs than the ones listed above&lt;br /&gt;
# Create the EGRE tunnel itself:&lt;br /&gt;
#* On &#039;&#039;&#039;citynode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_vwallnode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;vwallnode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.2/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; commands shown above are very similar to the ones used to set up an EGRE-tunnel between citylab nodes, but there are a few important differences:&lt;br /&gt;
* Rather than only specifying the hostname of the other endpoint, the full FQDN needs to be specified&lt;br /&gt;
* The &amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt; flag is added to manually set the MTU on the link. As explained before, this is needed to prevent MTU-mismatch issues. In this specific example an MTU of &amp;lt;code&amp;gt;1400&amp;lt;/code&amp;gt; bytes is specified since it provides enough headroom for multiple encapsulation headers and is &#039;good enough&#039; for an initial test. For optimal performance however, the MTU should be set to &amp;lt;code&amp;gt;min(uplink MTU of all nodes involved) - &amp;lt;GRE Overhead&amp;gt;(38 bytes)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt; flag is added to instruct the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; to create a &#039;GRE-over-IPv6&#039; rather than a &#039;GRE-over-IPv4&#039; tunnel. The reason for using IPv6 in this case is that the nodes of the virtual wall testbed don&#039;t have a public IPv4 address.&lt;br /&gt;
&lt;br /&gt;
Instead of specifying the FQDNs of the nodes, it would also have been possible to specify the public IP address of the node directly but this is more cumbersome and error prone (especially when using IPv6). Once the tunnel has been created it can be used just like any regular Ethernet interface except that, once again, the MTU is somewhat lower.&lt;br /&gt;
&lt;br /&gt;
As before, removing the tunnels is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-3-nodes.png|right|thumb|A multi-site link with three nodes. &#039;citynode1&#039; and &#039;citynode2&#039; are Citylab nodes. &#039;vwallnode1&#039; is a node on the Virtual Wall testbed.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As with [[#Creating_a_link_between_three_or_more_nodes|GRE links between citylab nodes]], setting up a GRE-link with more than two nodes is done by:&lt;br /&gt;
#Creating GRE tunnels from all nodes to a &#039;central&#039; node&lt;br /&gt;
#Bridging all of these tunnels together to create a single shared subnet.&lt;br /&gt;
&lt;br /&gt;
When such an &#039;overlay subnet&#039; spans multiple testbeds however, it is important to select the &#039;central node&#039; very carefully. Consider for example the topology shown on the right. In this case a link is created to which two nodes of the citylab testbed and a single node of the virtual wall are connected. If, in this case, &amp;lt;code&amp;gt;vwallnode1&amp;lt;/code&amp;gt; were to be selected as the &#039;central&#039; node, then all traffic between &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; would be sent over the virtual wall testbed unnecessarily. While in this case it would therefore be better to use &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; as a central node, for other test-setups the &#039;central node&#039; to use may not be so simple to determine.&lt;br /&gt;
&lt;br /&gt;
The 3-node setup shown in the example on the right, with &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; as a central node, can be created as follows:&lt;br /&gt;
&lt;br /&gt;
#Run the `hostname` command on all three nodes to learn their fully qualified domain names.&lt;br /&gt;
#On &#039;&#039;&#039;citynode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_bridge -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode2&amp;gt; &amp;lt;fdn_of_vwallnode1&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;The &amp;lt;code&amp;gt;gre_add_bridge&amp;lt;/code&amp;gt; command used here is very similar to the one used to set up a multipoint GRE-link within the citylab testbed itself. Once again, the only differences are&lt;br /&gt;
#* The added &amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt; flag to manually set the MTU on the created link (see [[#Creating_a_link_between_two_nodes_2|this section]] as to why this is needed)&lt;br /&gt;
#* The added &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt; flag to force the use of IPv6 (this is needed because the Virtual Wall testbed doesn&#039;t use public IPv4 addresses)&lt;br /&gt;
#* The use of FQDNs rather than just hostnames to specify the other nodes to connect to.&lt;br /&gt;
#Connect the other nodes to the &#039;GRE Bridge:&lt;br /&gt;
#* On &#039;&#039;&#039;citynode2&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.2/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;vwallnode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.3/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been created it can be used just like any other linux bridge. Removing the &#039;GRE Bridge&#039; is done in exactly the same way as it is done for a &#039;local&#039; GRE Bridge. See [[#Creating_a_link_between_three_or_more_nodes|this section]] for more information.&lt;br /&gt;
&lt;br /&gt;
== Setting up Link impairment on GRE Tunnels ==&lt;br /&gt;
&lt;br /&gt;
While it is not possible to configure link-impairment on GRE tunnels via the JFed interface, it is possible to do so manually once the test has started. This not only works for links created by JFed but also for links created manually.&lt;br /&gt;
&lt;br /&gt;
Adding impairment to a link is done by running the following command on each node connected to the GRE-tunnel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem loss random &amp;lt;loss_percentage&amp;gt;% rate &amp;lt;data_rate&amp;gt; delay &amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this command:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;link&amp;gt;&amp;lt;/code&amp;gt; is the name of the gre tunnel interface&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;loss_percentage&amp;gt;&amp;lt;/code&amp;gt; is the percent of packets to be randomly dropped&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;data_rate&amp;gt;&amp;lt;/code&amp;gt; is the data rate limit to impose on the link (e.g 10mbit, 20kbit, ...)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt; is the delay (in microseconds) to add to packets sent from the host. (So: to add a 5ms delay you need to specify 5000)&lt;br /&gt;
&lt;br /&gt;
As an example, the following command adds a 20% loss, a maximum data rate of 35mbit and a 7.5ms delay to link0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev link0 root netem loss random 20% rate 35mbit delay 7500&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The link impairment configured with the above command only affects packet that are &#039;&#039;sent&#039;&#039; from the host. Received packets are unaffected. Therefore it is imperative that you configure the same link impairment settings on both nodes connected to the GRE tunnel.&lt;br /&gt;
&lt;br /&gt;
Removing link impairment on a link is done by running the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the impairment settings on a link, you first need to remove the link impairment all together and then add it again with the new settings.&lt;br /&gt;
&lt;br /&gt;
More information on the &#039;netem&#039; traffic control queueing discipline can be found here: https://www.systutorials.com/docs/linux/man/8-tc-netem/&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=340</id>
		<title>GRE Tunnels</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=340"/>
		<updated>2021-08-11T12:07:04Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Creating a link between three or more nodes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At this point, the CityLab testbed only has limited support for &#039;&#039;automatically&#039;&#039; creating links between nodes using the JFed interface. Standard IP-in-IP GRE Tunnels and Ethernet-in-IP GRE Tunnels (&#039;&#039;gre-tunnel&#039;&#039; and &#039;&#039;egre-tunnel&#039;&#039; links in JFed) are supported. Adding support &#039;&#039;native&#039;&#039; Ethernet links (lan links in JFed) is on our TODO list. Since both &#039;gre&#039; and &#039;egre&#039; tunnels are point-to-point tunnels it is currently not (yet) possible to create a JFed-link with more than two connected nodes. As a workaround it &#039;&#039;is&#039;&#039; possible to bridge multiple &#039;egre&#039;-tunnels together into a single (tunneled) L2-network once the test has started.&lt;br /&gt;
&lt;br /&gt;
This page provides a quick How-To guide on how to create standard &#039;gre&#039; or &#039;egre-tunnels&#039; in JFed and then explains how to manually set up and bridge  egre-tunnels manually (after the test has started).&lt;br /&gt;
&lt;br /&gt;
== Creating Links between nodes through the JFed interface ==&lt;br /&gt;
&lt;br /&gt;
=== Setting up links ===&lt;br /&gt;
&lt;br /&gt;
Creating Links between nodes through the JFed interface is very straightforward and can be done as follows:&lt;br /&gt;
&lt;br /&gt;
* Start JFed, click on &#039;New&#039; and drag in two wireless nodes. For this tutorial we&#039;ll assume that these nodes are called &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;&lt;br /&gt;
* Edit the node properties so both nodes are sourced from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed. (By default Wilab2 is used).&amp;lt;p&amp;gt;[[File:Jfed_experiment_2_nodes.png|Drag in two nodes from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed and name them &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;|720px]]&amp;lt;/P&amp;gt;&lt;br /&gt;
* Drag a line from &#039;&#039;apu1&#039;&#039; to &#039;&#039;apu2&#039;&#039;. A &#039;&#039;link&#039;&#039; element connecting the two nodes is automatically created.&lt;br /&gt;
* If you are using JFed GUI 5.9 or above, link type of the link will already be set to &#039;gre&#039;. (This is shown between braces behind the name of the link). &amp;lt;p&amp;gt;[[File:Jfed_gre_link_2_nodes.png||300px]]&amp;lt;/p&amp;gt; If this is not the case, or you would like to create an &#039;egre&#039;-link instead, the link-type will need to be manually configured: &lt;br /&gt;
*# Right-click on the &#039;&#039;link&#039;&#039;-element, Click on &#039;&#039;Configure Link&#039;&#039; and select the &#039;&#039;Link Type&#039;&#039;-tab in the options window. &lt;br /&gt;
*# Change the link-type to &#039;gre-tunnel&#039; or &#039;egre-tunnel&#039; in the drop-down menu. If you select &#039;gre-tunnel&#039; an IP-in-IP tunnel will be created, if you select &#039;egre-tunnel&#039; an Ehternet-in-IP tunnel will be created. &amp;lt;p&amp;gt;[[File:JFed_link_options_type.png|Set the link-type to &#039;gre-tunnel&#039;|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
* JFed will automatically configure an IP-address on the tunnel interface for both nodes. optionally you can modify these IP-addresses in the &#039;&#039;General&#039;&#039; tab of the Link options-window &amp;lt;p&amp;gt;[[File:JFed_link_options_general.png|Changes the IP-addresses for the link if needed|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click &#039;Run&#039; to start your slice. When all nodes are green, your experiment has started and the GRE-tunnel between the two nodes has been configured. &amp;lt;p&amp;gt;[[File:JFed_gre_link_2_nodes_running.png|The running experiment|720px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*SSH into the &#039;&#039;apu1&#039;&#039; node. &lt;br /&gt;
*Run &amp;lt;code&amp;gt;ifconfig link02&amp;lt;/code&amp;gt; to verify that the GRE-tunnel has been created&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ifconfig link02&lt;br /&gt;
link02    Link encap:UNSPEC  HWaddr 8F-81-55-10-00-00-80-3F-00-00-00-00-00-00-00-00&lt;br /&gt;
          inet addr:192.168.0.1  P-t-P:192.168.0.1  Mask:255.255.255.0&lt;br /&gt;
          inet6 addr: fe80::200:5efe:8f81:5510/64 Scope:Link&lt;br /&gt;
          UP POINTOPOINT RUNNING NOARP  MTU:1434  Metric:1&lt;br /&gt;
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 txqueuelen:1&lt;br /&gt;
          RX bytes:112 (112.0 B)  TX bytes:168 (168.0 B)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Ping the &#039;&#039;apu2&#039;&#039;-tunnel enpoint by running &amp;lt;code&amp;gt;ping -c 4 &amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;&amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; is the IP-address configured for the tunnel endpoint on &#039;&#039;apu2&#039;&#039;. If you have not changed this, this is &amp;lt;code&amp;gt;192.168.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ping -c 4 192.168.0.2&lt;br /&gt;
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=2.21 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=1.60 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=1.46 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=4 ttl=64 time=1.51 ms&lt;br /&gt;
&lt;br /&gt;
--- 192.168.0.2 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3004ms&lt;br /&gt;
rtt min/avg/max/mdev = 1.464/1.699/2.218/0.303 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
==== No more than 2 nodes per link ====&lt;br /&gt;
&lt;br /&gt;
It is not possible to create (E)GRE-links with more than two nodes. The JFed GUI does allow additional nodes to be added to the link, but when the test is started the link will only exist on two nodes. This limitation is caused by the fact that the GRE-protocol only supports point-to-point tunnels. It is possible to [[#Manually setting up EGRE-tunnels|set up]] and [[#Creating a link between three or more nodes|bridge]] multiple egre-tunnels, but this cannot be done through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== EGRE-tunnels only work with &#039;CoT&#039; disk images ====&lt;br /&gt;
&lt;br /&gt;
To enable support for &#039;egre-tunnel&#039; links, a few tweaks had to be made to the &#039;client-side&#039; emulab-tools installed in the testbed disk images. Since these tweaks are not (yet) incorporated in the upstream emulab-code base, they are also not present in the many emulab-images used around the world. &lt;br /&gt;
&lt;br /&gt;
We have added these tweaks to the &#039;CoT&#039; disk-images of the CityLab testbed (see [[Disk Images]]), so if you want to use egre-links you must use a &#039;CoT&#039; disk image.&lt;br /&gt;
&lt;br /&gt;
==== (E)GRE-tunnels between nodes of different testbeds cannot be created via JFed ====&lt;br /&gt;
&lt;br /&gt;
Even at the best of times, creating links between nodes of different testbeds is an &#039;experimental feature&#039; at best. While it is perfectly possible to set up GRE and EGRE tunnels between nodes of different testbeds, it is currently not possible to do so through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== Link impairment on GRE Tunnels cannot be configured through the JFed GUI ====&lt;br /&gt;
&lt;br /&gt;
The way JFed normally adds impairment to a link is by adding a so-called &#039;impairment node&#039; in between the nodes of a link to change the properties of the traffic flowing over the link. This mechanism however only works with ethernet interfaces and not with GRE Tunnels. That being said: it is possible to add link impairment to GRE tunnels manually. How to do so is [[#Setting_up_Link_impairment_on_GRE_Tunnels|explained below]].&lt;br /&gt;
&lt;br /&gt;
== Manually setting up EGRE-tunnels ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; although it is possible to manually set up GRE-tunnels it is much easier to do so through the JFed-interface. The only reason for creating them manually is to create a &#039;link&#039; between more than two nodes or to create links with nodes of another testbed (both of which are currently not supported through JFed)&lt;br /&gt;
&lt;br /&gt;
A number of [[:File:Gre-utils.tar.gz | scripts]] are provided to make it as easy as possible to create and manage EGRE-tunnels.&lt;br /&gt;
Before any EGRE-tunnels can be created, these scripts first need to be installed on every node.&lt;br /&gt;
This can be done by running the following one-liner:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will&lt;br /&gt;
* Download the [[:File:Gre-utils.tar.gz | Gre-utils.tar.gz]] archive&lt;br /&gt;
* Install the scripts in &amp;lt;code&amp;gt;/usr/local&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
&lt;br /&gt;
[[File:Jfed-link-2-nodes.png|thumb|right|A simple link between two nodes.]]&lt;br /&gt;
&lt;br /&gt;
A simple GRE tunnel can be created by running the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.1/24 link0 apu2&amp;lt;/code&amp;gt;&lt;br /&gt;
* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above commands &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and &amp;lt;code&amp;gt;apuX&amp;lt;/code&amp;gt; is the host to create a tunnel to. The optional &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can be used to automatically configure an IPv4-address on the newly created interface.&lt;br /&gt;
&lt;br /&gt;
To allow the node names configured in JFed to be used to configure GRE tunnels, the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script tries to behave somewhat intelligently when resolving hostnames:&lt;br /&gt;
* If the specified host is a Fully Qualified Domain Name (i.e: it contains a &#039;.&#039;), a regular DNS query is performed&lt;br /&gt;
* If the specified host is a simple hostname (no &#039;.&#039; in the hostname), the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script &#039;&#039;first&#039;&#039; tries to resolve the specified host to a node name specified in JFed. If this fails, the IP-address of the host is resolved using a normal DNS query. &lt;br /&gt;
* If the specified host is a valid IPv4 address, no DNS-resolution is performed.&lt;br /&gt;
&lt;br /&gt;
Once the GRE tunnel is created, it can be used just like any other Ethernet interface, except that the MTU is a bit lower than normal.&lt;br /&gt;
&lt;br /&gt;
Removing the tunnel is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script. &lt;br /&gt;
To remove the tunnels created above for example, the following command would have to be run on each node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-link-3-nodes.png|thumb|right|A slightly more complicated link between more than two nodes.]]&lt;br /&gt;
&lt;br /&gt;
Creating a link between more than two nodes is (slightly) more complicated since GRE only allows Point-to-Point tunnels to be created. To work around this, GRE Tunnels are created from one &#039;central&#039; node to all other nodes on the link. These GRE Tunnels are then &#039;bridged&#039; together on the central node to form a shared subnet. Such a &#039;GRE Bridge&#039; can easily be created using the &amp;lt;code&amp;gt;gre_add_bridge&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
The 3-node setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_bridge -c 192.168.0.1/24 link0 apu2 apu3&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;As for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script, &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and the &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can optionally be used to configure an IPv4 address on the interface. The remaining parameters, in this case &amp;lt;code&amp;gt;apu2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apu3&amp;lt;/code&amp;gt; are the hosts to connect to. The resolution of these hostnames to IP-addresses is done in exactly the same way as for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script.&lt;br /&gt;
#&lt;br /&gt;
#* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;apu3&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.3/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case &#039;&#039;apu1&#039;&#039; is used as the central node and &#039;&#039;apu2&#039;&#039; and &#039;&#039;apu3&#039;&#039; connect to it in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario.&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been created it can be used just like any other linux bridge. Additional interfaces can be added/removed using the &amp;lt;code&amp;gt;brctl&amp;lt;/code&amp;gt; command. The bridge&#039;s stastus can be queried using the &amp;lt;code&amp;gt;brctl show&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  user@apu1:~$ brctl show link0&lt;br /&gt;
  bridge name	bridge id		STP enabled	interfaces&lt;br /&gt;
  link0		8000.a2b74a105a76	no		link0_gre_0&lt;br /&gt;
  							link0_gre_1&lt;br /&gt;
In the above output, the &amp;lt;code&amp;gt;link0_gre_x&amp;lt;/code&amp;gt; interfaces are the GRE tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
Removing the &#039;GRE Bridge&#039; is done using the &amp;lt;code&amp;gt;gre_del_bridge_script&amp;lt;/code&amp;gt;. It is highly recommended to use this script to remove the bridge (rather than the &#039;&#039;brctl&#039;&#039; command) as this script not only removes the bridge itself, but also cleans up the GRE-tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
To remove the bridge created in the above example the following command would have to be run &lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039;: &amp;lt;code&amp;gt;sudo gre_del_bridge link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been removed, the GRE-Tunnels on the other nodes also need to be cleaned up. This is done in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
==== Single tunnel between two nodes ====&lt;br /&gt;
&lt;br /&gt;
GRE Tunnels are identified &#039;&#039;solely&#039;&#039; on the source and destination IP-address of the encapsulating packet. That means that it is &#039;&#039;not&#039;&#039; possible to establish two independent tunnels between the same two nodes at the same time.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between two nodes| two node]] scenario, this means that only a &#039;&#039;single&#039;&#039; link can be created between two nodes.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between three or more nodes| mutliple nodes]] scenario, a node can participate in multiple links as long as:&lt;br /&gt;
* each link uses a different &#039;central node&#039;&lt;br /&gt;
* each &#039;central node&#039; is only part of &#039;&#039;one&#039;&#039; link at the same time&lt;br /&gt;
&lt;br /&gt;
It should be noted however, that GRE Tunnels can be used in combination with VLAN-tagging, so if you &#039;&#039;really&#039;&#039; need to create multiple links between two nodes, you can do so by defining multiple VLANs on the GRE tunnel interface. This however is not something that can be done using the scripts provided here.&lt;br /&gt;
&lt;br /&gt;
==== Reduced MTU ====&lt;br /&gt;
&lt;br /&gt;
Using a GRE Tunnel incurs an overhead of 38 bytes. This is because the original Ethernet packet needs to be prefixed with an additional IP- and Ethernet-header in order to send it to the other tunnel endpoint. To prevent fragmentation, the linux kernel automatically reduces the MTU of the GRE-interface. As a result, the MTU &#039;&#039;inside&#039;&#039; the tunnel is 38 bytes lower than the MTU &#039;&#039;outside&#039;&#039; the tunnel.&lt;br /&gt;
&lt;br /&gt;
Except for a small decrease in performance this usually is not that big of a problem, with one notable exception. When, for instance, a WiFi AP-interface is bridged to a GRE Tunnel, the MTU is set to the smallest MTU of the &#039;slave&#039; interfaces (in this case the GRE-tunnel). This lower MTU however is &#039;&#039;&#039;not&#039;&#039;&#039; automagically communicated to the connected WiFi clients and as a result these clients may still send packets that are larger than the MTU of the bridge. Since these packets are subsequently dropped by the linux bridge, this can lead to all sorts of nasty problems. The most common of which are dropped UDP packets and TCP sessions seem to work fine and then suddenly hang when more than a few bytes at a time are sent over them.&lt;br /&gt;
&lt;br /&gt;
To resolve this issue the MTU of the other WiFi clients should be reduced to the MTU of the linux bridge. When static IP-addresses are used, this can easily be done using the &amp;lt;code&amp;gt;ip link&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  ip link set mtu &amp;lt;mtu&amp;gt; dev &amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If DHCP is used, the lower MTU should be advertised by the DHCP server.&lt;br /&gt;
&lt;br /&gt;
== Setting up (E)GRE-Tunnels Citylab and the Virtual Wall ==&lt;br /&gt;
&lt;br /&gt;
At this point it is not possible to set up &#039;multi-site&#039; (e)GRE tunnels through the JFed interface, but it is possible to do so manually after the test has started. The process of doing so is very similar to manually creating EGRE-Tunnels within the citylab testbed itself, but the following caveats need to be taken into account:&lt;br /&gt;
&lt;br /&gt;
* Setting up GRE Tunnels between nodes of different testbeds requires both endpoints to have a &#039;&#039;routable&#039;&#039; (i.e. public) IPv4 or IPv6 address and for GRE-traffic to be allowed by the firewall/router through which the nodes are connected to the internet. While all nodes of the citylab testbed meet the above requirement, this may not necessarily be the case for nodes of other testbeds.&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;MTU&#039;&#039; of the created link needs to be set manually. Otherwise you will most likely encounter MTU-mismatch issues given that, by default, the MTU of the created tunnel is calculated from the MTU of the uplink interface, and that not all testbeds use the same MTU on their uplink interface.&lt;br /&gt;
&lt;br /&gt;
* GRE tunnels are &#039;&#039;&#039;not encrypted&#039;&#039;&#039;. Any data you send over them is sent plain-text over the internet so make sure not to send any sensitive data over them without adding encryption in some other way. If you need a tunnel which encrypts the traffic as well, OpenVPN is most likely a better solution.&lt;br /&gt;
&lt;br /&gt;
The remainder of this section explains how to set up &#039;multi-site&#039; (e)gre tunnels. We specifically focus on setting up GRE tunnels between Citylab and the [https://doc.ilabt.imec.be/ilabt/virtualwall/|Virtual Wall], but setting up GRE tunnels to other testbeds should be very similar.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
* Make sure that all nodes involved are running &#039;&#039;at least&#039;&#039; Ubuntu 16.04 (EGRE tunnels are not supported in Ubuntu 14.04 and before). For citylab nodes this is the case by default, but for the nodes on the virtual wall you will have to explicitly specify a different disk image when you set up the experiment as that testbed uses &#039;Ubuntu 14.04&#039; by default.&lt;br /&gt;
&lt;br /&gt;
* Setting up multi-site (e)gre tunnels is done with the same &#039;helper scripts&#039; as [[#Manually_setting_up_EGRE-tunnels|used before]]. Before setting up the tunnels themselves, these scripts need to be installed on every node. This can be done using the following one-liner: &lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-2-nodes.png|thumb|right|A &#039;simple&#039; multi-site link with two nodes. &#039;citynode1&#039; is a node of the Citylab testbed. &#039;vwallnode1&#039; is a node of the Virtual Wall testbed.]]&lt;br /&gt;
A point-to-point (E)GRE tunnel can be created using the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# Run the &amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt; command on both hosts to learn their fully qualified domain names (FQDNs). E.g: &lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@citynode1:~# hostname&amp;amp;#10;citynode1.gretest.wall2-ilabt-iminds-be.lab.cityofthings.eu&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@vwallnode1:~# hostname&amp;amp;#10;vwallnode1.gretest.wall2-ilabt-iminds-be.wall2.ilabt.iminds.be&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: As shown in the examples above the FQDNs of the nodes depends not only on the hostname configured in JFed but also on the name of the experiment, project and the testbed the node belongs to. Therefore yuo will almost certainly need to use different FQDNs than the ones listed above&lt;br /&gt;
# Create the EGRE tunnel itself:&lt;br /&gt;
#* On &#039;&#039;&#039;citynode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_vwallnode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;vwallnode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.2/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; commands shown above are very similar to the ones used to set up an EGRE-tunnel between citylab nodes, but there are a few important differences:&lt;br /&gt;
* Rather than only specifying the hostname of the other endpoint, the full FQDN needs to be specified&lt;br /&gt;
* The &amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt; flag is added to manually set the MTU on the link. As explained before, this is needed to prevent MTU-mismatch issues. In this specific example an MTU of &amp;lt;code&amp;gt;1400&amp;lt;/code&amp;gt; bytes is specified since it provides enough headroom for multiple encapsulation headers and is &#039;good enough&#039; for an initial test. For optimal performance however, the MTU should be set to &amp;lt;code&amp;gt;min(uplink MTU of all nodes involved) - &amp;lt;GRE Overhead&amp;gt;(38 bytes)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt; flag is added to instruct the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; to create a &#039;GRE-over-IPv6&#039; rather than a &#039;GRE-over-IPv4&#039; tunnel. The reason for using IPv6 in this case is that the nodes of the virtual wall testbed don&#039;t have a public IPv4 address.&lt;br /&gt;
&lt;br /&gt;
Instead of specifying the FQDNs of the nodes, it would also have been possible to specify the public IP address of the node directly but this is more cumbersome and error prone (especially when using IPv6). Once the tunnel has been created it can be used just like any regular Ethernet interface except that, once again, the MTU is somewhat lower.&lt;br /&gt;
&lt;br /&gt;
As before, removing the tunnels is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-3-nodes.png|right|thumb|A multi-site link with three nodes. &#039;citynode1&#039; and &#039;citynode2&#039; are Citylab nodes. &#039;vwallnode1&#039; is a node on the Virtual Wall testbed.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As with [[#Creating_a_link_between_three_or_more_nodes|GRE links between citylab nodes]], setting up a GRE-link with more than two nodes is done by:&lt;br /&gt;
#Creating GRE tunnels from all nodes to a &#039;central&#039; node&lt;br /&gt;
#Bridging all of these tunnels together to create a single shared subnet.&lt;br /&gt;
&lt;br /&gt;
When such an &#039;overlay subnet&#039; spans multiple testbeds however, it is important to select the &#039;central node&#039; very carefully. Consider for example the topology shown on the right. In this case a link is created to which two nodes of the citylab testbed and a single node of the virtual wall are connected. If, in this case, &amp;lt;code&amp;gt;vwallnode1&amp;lt;/code&amp;gt; were to be selected as the &#039;central&#039; node, then all traffic between &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; would be sent over the virtual wall testbed unnecessarily. While in this case it would therefore be better to use &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; as a central node, for other test-setups the &#039;central node&#039; to use may not be so simple to determine.&lt;br /&gt;
&lt;br /&gt;
The 3-node setup shown in the example on the right, with &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; as a central node, can be created as follows:&lt;br /&gt;
&lt;br /&gt;
#Run the `hostname` command on all three nodes to learn their fully qualified domain names.&lt;br /&gt;
#On &#039;&#039;&#039;citynode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_bridge -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode2&amp;gt; &amp;lt;fdn_of_vwallnode1&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;The &amp;lt;code&amp;gt;gre_add_bridge&amp;lt;/code&amp;gt; command used here is very similar to the one used to set up a multipoint GRE-link within the citylab testbed itself. Once again, the only differences are&lt;br /&gt;
#* The added &amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt; flag to manually set the MTU on the created link (see [[#Creating_a_link_between_two_nodes_2|this section]] as to why this is needed)&lt;br /&gt;
#* The added &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt; flag to force the use of IPv6 (this is needed because the Virtual Wall testbed doesn&#039;t use public IPv4 addresses)&lt;br /&gt;
#* The use of FQDNs rather than just hostnames to specify the other nodes to connect to.&lt;br /&gt;
#Connect the other nodes to the &#039;GRE Bridge:&lt;br /&gt;
#* On &#039;&#039;&#039;citynode2&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.2/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;vwallnode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.3/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been created it can be used just like any other linux bridge. Removing the &#039;GRE Bridge&#039; is done in exactly the same way as it is done for a &#039;local&#039; GRE Bridge. See [[#Creating_a_link_between_three_or_more_nodes|this section]] for more information.&lt;br /&gt;
&lt;br /&gt;
== Setting up Link impairment on GRE Tunnels ==&lt;br /&gt;
&lt;br /&gt;
While it is not possible to configure link-impairment on GRE tunnels via the JFed interface, it is possible to do so manually once the test has started. This not only works for links created by JFed but also for links created manually.&lt;br /&gt;
&lt;br /&gt;
Adding impairment to a link is done by running the following command on each node connected to the GRE-tunnel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem loss random &amp;lt;loss_percentage&amp;gt;% rate &amp;lt;data_rate&amp;gt; delay &amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this command:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;link&amp;gt;&amp;lt;/code&amp;gt; is the name of the gre tunnel interface&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;loss_percentage&amp;gt;&amp;lt;/code&amp;gt; is the percent of packets to be randomly dropped&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;data_rate&amp;gt;&amp;lt;/code&amp;gt; is the data rate limit to impose on the link (e.g 10mbit, 20kbit, ...)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt; is the delay (in microseconds) to add to packets sent from the host. (So: to add a 5ms delay you need to specify 5000)&lt;br /&gt;
&lt;br /&gt;
As an example, the following command adds a 20% loss, a maximum data rate of 35mbit and a 7.5ms delay to link0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev link0 root netem loss random 20% rate 35mbit delay 7500&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The link impairment configured with the above command only affects packet that are &#039;&#039;sent&#039;&#039; from the host. Received packets are unaffected. Therefore it is imperative that you configure the same link impairment settings on both nodes connected to the GRE tunnel.&lt;br /&gt;
&lt;br /&gt;
Removing link impairment on a link is done by running the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the impairment settings on a link, you first need to remove the link impairment all together and then add it again with the new settings.&lt;br /&gt;
&lt;br /&gt;
More information on the &#039;netem&#039; traffic control queueing discipline can be found here: https://www.systutorials.com/docs/linux/man/8-tc-netem/&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=339</id>
		<title>GRE Tunnels</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=339"/>
		<updated>2021-08-11T12:06:19Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Creating a link between two nodes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At this point, the CityLab testbed only has limited support for &#039;&#039;automatically&#039;&#039; creating links between nodes using the JFed interface. Standard IP-in-IP GRE Tunnels and Ethernet-in-IP GRE Tunnels (&#039;&#039;gre-tunnel&#039;&#039; and &#039;&#039;egre-tunnel&#039;&#039; links in JFed) are supported. Adding support &#039;&#039;native&#039;&#039; Ethernet links (lan links in JFed) is on our TODO list. Since both &#039;gre&#039; and &#039;egre&#039; tunnels are point-to-point tunnels it is currently not (yet) possible to create a JFed-link with more than two connected nodes. As a workaround it &#039;&#039;is&#039;&#039; possible to bridge multiple &#039;egre&#039;-tunnels together into a single (tunneled) L2-network once the test has started.&lt;br /&gt;
&lt;br /&gt;
This page provides a quick How-To guide on how to create standard &#039;gre&#039; or &#039;egre-tunnels&#039; in JFed and then explains how to manually set up and bridge  egre-tunnels manually (after the test has started).&lt;br /&gt;
&lt;br /&gt;
== Creating Links between nodes through the JFed interface ==&lt;br /&gt;
&lt;br /&gt;
=== Setting up links ===&lt;br /&gt;
&lt;br /&gt;
Creating Links between nodes through the JFed interface is very straightforward and can be done as follows:&lt;br /&gt;
&lt;br /&gt;
* Start JFed, click on &#039;New&#039; and drag in two wireless nodes. For this tutorial we&#039;ll assume that these nodes are called &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;&lt;br /&gt;
* Edit the node properties so both nodes are sourced from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed. (By default Wilab2 is used).&amp;lt;p&amp;gt;[[File:Jfed_experiment_2_nodes.png|Drag in two nodes from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed and name them &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;|720px]]&amp;lt;/P&amp;gt;&lt;br /&gt;
* Drag a line from &#039;&#039;apu1&#039;&#039; to &#039;&#039;apu2&#039;&#039;. A &#039;&#039;link&#039;&#039; element connecting the two nodes is automatically created.&lt;br /&gt;
* If you are using JFed GUI 5.9 or above, link type of the link will already be set to &#039;gre&#039;. (This is shown between braces behind the name of the link). &amp;lt;p&amp;gt;[[File:Jfed_gre_link_2_nodes.png||300px]]&amp;lt;/p&amp;gt; If this is not the case, or you would like to create an &#039;egre&#039;-link instead, the link-type will need to be manually configured: &lt;br /&gt;
*# Right-click on the &#039;&#039;link&#039;&#039;-element, Click on &#039;&#039;Configure Link&#039;&#039; and select the &#039;&#039;Link Type&#039;&#039;-tab in the options window. &lt;br /&gt;
*# Change the link-type to &#039;gre-tunnel&#039; or &#039;egre-tunnel&#039; in the drop-down menu. If you select &#039;gre-tunnel&#039; an IP-in-IP tunnel will be created, if you select &#039;egre-tunnel&#039; an Ehternet-in-IP tunnel will be created. &amp;lt;p&amp;gt;[[File:JFed_link_options_type.png|Set the link-type to &#039;gre-tunnel&#039;|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
* JFed will automatically configure an IP-address on the tunnel interface for both nodes. optionally you can modify these IP-addresses in the &#039;&#039;General&#039;&#039; tab of the Link options-window &amp;lt;p&amp;gt;[[File:JFed_link_options_general.png|Changes the IP-addresses for the link if needed|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click &#039;Run&#039; to start your slice. When all nodes are green, your experiment has started and the GRE-tunnel between the two nodes has been configured. &amp;lt;p&amp;gt;[[File:JFed_gre_link_2_nodes_running.png|The running experiment|720px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*SSH into the &#039;&#039;apu1&#039;&#039; node. &lt;br /&gt;
*Run &amp;lt;code&amp;gt;ifconfig link02&amp;lt;/code&amp;gt; to verify that the GRE-tunnel has been created&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ifconfig link02&lt;br /&gt;
link02    Link encap:UNSPEC  HWaddr 8F-81-55-10-00-00-80-3F-00-00-00-00-00-00-00-00&lt;br /&gt;
          inet addr:192.168.0.1  P-t-P:192.168.0.1  Mask:255.255.255.0&lt;br /&gt;
          inet6 addr: fe80::200:5efe:8f81:5510/64 Scope:Link&lt;br /&gt;
          UP POINTOPOINT RUNNING NOARP  MTU:1434  Metric:1&lt;br /&gt;
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 txqueuelen:1&lt;br /&gt;
          RX bytes:112 (112.0 B)  TX bytes:168 (168.0 B)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Ping the &#039;&#039;apu2&#039;&#039;-tunnel enpoint by running &amp;lt;code&amp;gt;ping -c 4 &amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;&amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; is the IP-address configured for the tunnel endpoint on &#039;&#039;apu2&#039;&#039;. If you have not changed this, this is &amp;lt;code&amp;gt;192.168.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ping -c 4 192.168.0.2&lt;br /&gt;
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=2.21 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=1.60 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=1.46 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=4 ttl=64 time=1.51 ms&lt;br /&gt;
&lt;br /&gt;
--- 192.168.0.2 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3004ms&lt;br /&gt;
rtt min/avg/max/mdev = 1.464/1.699/2.218/0.303 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
==== No more than 2 nodes per link ====&lt;br /&gt;
&lt;br /&gt;
It is not possible to create (E)GRE-links with more than two nodes. The JFed GUI does allow additional nodes to be added to the link, but when the test is started the link will only exist on two nodes. This limitation is caused by the fact that the GRE-protocol only supports point-to-point tunnels. It is possible to [[#Manually setting up EGRE-tunnels|set up]] and [[#Creating a link between three or more nodes|bridge]] multiple egre-tunnels, but this cannot be done through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== EGRE-tunnels only work with &#039;CoT&#039; disk images ====&lt;br /&gt;
&lt;br /&gt;
To enable support for &#039;egre-tunnel&#039; links, a few tweaks had to be made to the &#039;client-side&#039; emulab-tools installed in the testbed disk images. Since these tweaks are not (yet) incorporated in the upstream emulab-code base, they are also not present in the many emulab-images used around the world. &lt;br /&gt;
&lt;br /&gt;
We have added these tweaks to the &#039;CoT&#039; disk-images of the CityLab testbed (see [[Disk Images]]), so if you want to use egre-links you must use a &#039;CoT&#039; disk image.&lt;br /&gt;
&lt;br /&gt;
==== (E)GRE-tunnels between nodes of different testbeds cannot be created via JFed ====&lt;br /&gt;
&lt;br /&gt;
Even at the best of times, creating links between nodes of different testbeds is an &#039;experimental feature&#039; at best. While it is perfectly possible to set up GRE and EGRE tunnels between nodes of different testbeds, it is currently not possible to do so through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== Link impairment on GRE Tunnels cannot be configured through the JFed GUI ====&lt;br /&gt;
&lt;br /&gt;
The way JFed normally adds impairment to a link is by adding a so-called &#039;impairment node&#039; in between the nodes of a link to change the properties of the traffic flowing over the link. This mechanism however only works with ethernet interfaces and not with GRE Tunnels. That being said: it is possible to add link impairment to GRE tunnels manually. How to do so is [[#Setting_up_Link_impairment_on_GRE_Tunnels|explained below]].&lt;br /&gt;
&lt;br /&gt;
== Manually setting up EGRE-tunnels ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; although it is possible to manually set up GRE-tunnels it is much easier to do so through the JFed-interface. The only reason for creating them manually is to create a &#039;link&#039; between more than two nodes or to create links with nodes of another testbed (both of which are currently not supported through JFed)&lt;br /&gt;
&lt;br /&gt;
A number of [[:File:Gre-utils.tar.gz | scripts]] are provided to make it as easy as possible to create and manage EGRE-tunnels.&lt;br /&gt;
Before any EGRE-tunnels can be created, these scripts first need to be installed on every node.&lt;br /&gt;
This can be done by running the following one-liner:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will&lt;br /&gt;
* Download the [[:File:Gre-utils.tar.gz | Gre-utils.tar.gz]] archive&lt;br /&gt;
* Install the scripts in &amp;lt;code&amp;gt;/usr/local&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
&lt;br /&gt;
[[File:Jfed-link-2-nodes.png|thumb|right|A simple link between two nodes.]]&lt;br /&gt;
&lt;br /&gt;
A simple GRE tunnel can be created by running the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.1/24 link0 apu2&amp;lt;/code&amp;gt;&lt;br /&gt;
* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above commands &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and &amp;lt;code&amp;gt;apuX&amp;lt;/code&amp;gt; is the host to create a tunnel to. The optional &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can be used to automatically configure an IPv4-address on the newly created interface.&lt;br /&gt;
&lt;br /&gt;
To allow the node names configured in JFed to be used to configure GRE tunnels, the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script tries to behave somewhat intelligently when resolving hostnames:&lt;br /&gt;
* If the specified host is a Fully Qualified Domain Name (i.e: it contains a &#039;.&#039;), a regular DNS query is performed&lt;br /&gt;
* If the specified host is a simple hostname (no &#039;.&#039; in the hostname), the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script &#039;&#039;first&#039;&#039; tries to resolve the specified host to a node name specified in JFed. If this fails, the IP-address of the host is resolved using a normal DNS query. &lt;br /&gt;
* If the specified host is a valid IPv4 address, no DNS-resolution is performed.&lt;br /&gt;
&lt;br /&gt;
Once the GRE tunnel is created, it can be used just like any other Ethernet interface, except that the MTU is a bit lower than normal.&lt;br /&gt;
&lt;br /&gt;
Removing the tunnel is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script. &lt;br /&gt;
To remove the tunnels created above for example, the following command would have to be run on each node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-link-3-nodes.png|thumb|right|A slightly more complicated link between more than two nodes.]]&lt;br /&gt;
&lt;br /&gt;
Creating a link between more than two nodes is (slightly) more complicated since GRE only allows Point-to-Point tunnels to be created. To work around this, GRE Tunnels are created from one &#039;central&#039; node to all other nodes on the link. These GRE Tunnels are then &#039;bridged&#039; together on the central node to form a shared subnet. Such a &#039;GRE Bridge&#039; can easily be created using the &amp;lt;code&amp;gt;gre_add_bridge&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
The 3-node setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_bridge -c 192.168.0.1/24 link0 apu2 apu3&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;As for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script, &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and the &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can optionally be used to configure an IPv4 address on the interface. The remaining parameters, in this case &amp;lt;code&amp;gt;apu2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apu3&amp;lt;/code&amp;gt; are the hosts to connect to. The resolution of these hostnames to IP-addresses is done in exactly the same way as for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script.&lt;br /&gt;
#&lt;br /&gt;
#* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;apu3&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.3/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case &#039;&#039;apu1&#039;&#039; is used as the central node and &#039;&#039;apu2&#039;&#039; and &#039;&#039;apu3&#039;&#039; connect to it in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario.&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been created it can be used just like any other linux bridge. Additional interfaces can be added/removed using the &amp;lt;code&amp;gt;brctl&amp;lt;/code&amp;gt; command. The bridge&#039;s stastus can be queried using the &amp;lt;code&amp;gt;brctl show&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  user@apu1:~$ brctl show link0&lt;br /&gt;
  bridge name	bridge id		STP enabled	interfaces&lt;br /&gt;
  link0		8000.a2b74a105a76	no		link0_gre_0&lt;br /&gt;
  							link0_gre_1&lt;br /&gt;
In the above output, the &amp;lt;code&amp;gt;link0_gre_x&amp;lt;/code&amp;gt; interfaces are the GRE tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
Removing the &#039;GRE Bridge&#039; is done using the &amp;lt;code&amp;gt;gre_del_bridge_script&amp;lt;/code&amp;gt;. It is highly recommended to use this script to remove the bridge (rather than the &#039;&#039;brctl&#039;&#039; command) as this script not only removes the bridge itself, but also cleans up the GRE-tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
To remove the bridge created in the above example the following command would have to be run &lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039;: &amp;lt;code&amp;gt;sudo gre_del_bridge link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been removed, the GRE-Tunnels on the other nodes also need to be cleaned up. This is done in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
==== Single tunnel between two nodes ====&lt;br /&gt;
&lt;br /&gt;
GRE Tunnels are identified &#039;&#039;solely&#039;&#039; on the source and destination IP-address of the encapsulating packet. That means that it is &#039;&#039;not&#039;&#039; possible to establish two independent tunnels between the same two nodes at the same time.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between two nodes| two node]] scenario, this means that only a &#039;&#039;single&#039;&#039; link can be created between two nodes.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between three or more nodes| mutliple nodes]] scenario, a node can participate in multiple links as long as:&lt;br /&gt;
* each link uses a different &#039;central node&#039;&lt;br /&gt;
* each &#039;central node&#039; is only part of &#039;&#039;one&#039;&#039; link at the same time&lt;br /&gt;
&lt;br /&gt;
It should be noted however, that GRE Tunnels can be used in combination with VLAN-tagging, so if you &#039;&#039;really&#039;&#039; need to create multiple links between two nodes, you can do so by defining multiple VLANs on the GRE tunnel interface. This however is not something that can be done using the scripts provided here.&lt;br /&gt;
&lt;br /&gt;
==== Reduced MTU ====&lt;br /&gt;
&lt;br /&gt;
Using a GRE Tunnel incurs an overhead of 38 bytes. This is because the original Ethernet packet needs to be prefixed with an additional IP- and Ethernet-header in order to send it to the other tunnel endpoint. To prevent fragmentation, the linux kernel automatically reduces the MTU of the GRE-interface. As a result, the MTU &#039;&#039;inside&#039;&#039; the tunnel is 38 bytes lower than the MTU &#039;&#039;outside&#039;&#039; the tunnel.&lt;br /&gt;
&lt;br /&gt;
Except for a small decrease in performance this usually is not that big of a problem, with one notable exception. When, for instance, a WiFi AP-interface is bridged to a GRE Tunnel, the MTU is set to the smallest MTU of the &#039;slave&#039; interfaces (in this case the GRE-tunnel). This lower MTU however is &#039;&#039;&#039;not&#039;&#039;&#039; automagically communicated to the connected WiFi clients and as a result these clients may still send packets that are larger than the MTU of the bridge. Since these packets are subsequently dropped by the linux bridge, this can lead to all sorts of nasty problems. The most common of which are dropped UDP packets and TCP sessions seem to work fine and then suddenly hang when more than a few bytes at a time are sent over them.&lt;br /&gt;
&lt;br /&gt;
To resolve this issue the MTU of the other WiFi clients should be reduced to the MTU of the linux bridge. When static IP-addresses are used, this can easily be done using the &amp;lt;code&amp;gt;ip link&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  ip link set mtu &amp;lt;mtu&amp;gt; dev &amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If DHCP is used, the lower MTU should be advertised by the DHCP server.&lt;br /&gt;
&lt;br /&gt;
== Setting up (E)GRE-Tunnels Citylab and the Virtual Wall ==&lt;br /&gt;
&lt;br /&gt;
At this point it is not possible to set up &#039;multi-site&#039; (e)GRE tunnels through the JFed interface, but it is possible to do so manually after the test has started. The process of doing so is very similar to manually creating EGRE-Tunnels within the citylab testbed itself, but the following caveats need to be taken into account:&lt;br /&gt;
&lt;br /&gt;
* Setting up GRE Tunnels between nodes of different testbeds requires both endpoints to have a &#039;&#039;routable&#039;&#039; (i.e. public) IPv4 or IPv6 address and for GRE-traffic to be allowed by the firewall/router through which the nodes are connected to the internet. While all nodes of the citylab testbed meet the above requirement, this may not necessarily be the case for nodes of other testbeds.&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;MTU&#039;&#039; of the created link needs to be set manually. Otherwise you will most likely encounter MTU-mismatch issues given that, by default, the MTU of the created tunnel is calculated from the MTU of the uplink interface, and that not all testbeds use the same MTU on their uplink interface.&lt;br /&gt;
&lt;br /&gt;
* GRE tunnels are &#039;&#039;&#039;not encrypted&#039;&#039;&#039;. Any data you send over them is sent plain-text over the internet so make sure not to send any sensitive data over them without adding encryption in some other way. If you need a tunnel which encrypts the traffic as well, OpenVPN is most likely a better solution.&lt;br /&gt;
&lt;br /&gt;
The remainder of this section explains how to set up &#039;multi-site&#039; (e)gre tunnels. We specifically focus on setting up GRE tunnels between Citylab and the [https://doc.ilabt.imec.be/ilabt/virtualwall/|Virtual Wall], but setting up GRE tunnels to other testbeds should be very similar.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
* Make sure that all nodes involved are running &#039;&#039;at least&#039;&#039; Ubuntu 16.04 (EGRE tunnels are not supported in Ubuntu 14.04 and before). For citylab nodes this is the case by default, but for the nodes on the virtual wall you will have to explicitly specify a different disk image when you set up the experiment as that testbed uses &#039;Ubuntu 14.04&#039; by default.&lt;br /&gt;
&lt;br /&gt;
* Setting up multi-site (e)gre tunnels is done with the same &#039;helper scripts&#039; as [[#Manually_setting_up_EGRE-tunnels|used before]]. Before setting up the tunnels themselves, these scripts need to be installed on every node. This can be done using the following one-liner: &lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-2-nodes.png|thumb|right|A &#039;simple&#039; multi-site link with two nodes. &#039;citynode1&#039; is a node of the Citylab testbed. &#039;vwallnode1&#039; is a node of the Virtual Wall testbed.]]&lt;br /&gt;
A point-to-point (E)GRE tunnel can be created using the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# Run the &amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt; command on both hosts to learn their fully qualified domain names (FQDNs). E.g: &lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@citynode1:~# hostname&amp;amp;#10;citynode1.gretest.wall2-ilabt-iminds-be.lab.cityofthings.eu&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@vwallnode1:~# hostname&amp;amp;#10;vwallnode1.gretest.wall2-ilabt-iminds-be.wall2.ilabt.iminds.be&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: As shown in the examples above the FQDNs of the nodes depends not only on the hostname configured in JFed but also on the name of the experiment, project and the testbed the node belongs to. Therefore yuo will almost certainly need to use different FQDNs than the ones listed above&lt;br /&gt;
# Create the EGRE tunnel itself:&lt;br /&gt;
#* On &#039;&#039;&#039;citynode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_vwallnode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;vwallnode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.2/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; commands shown above are very similar to the ones used to set up an EGRE-tunnel between citylab nodes, but there are a few important differences:&lt;br /&gt;
* Rather than only specifying the hostname of the other endpoint, the full FQDN needs to be specified&lt;br /&gt;
* The &amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt; flag is added to manually set the MTU on the link. As explained before, this is needed to prevent MTU-mismatch issues. In this specific example an MTU of &amp;lt;code&amp;gt;1400&amp;lt;/code&amp;gt; bytes is specified since it provides enough headroom for multiple encapsulation headers and is &#039;good enough&#039; for an initial test. For optimal performance however, the MTU should be set to &amp;lt;code&amp;gt;min(uplink MTU of all nodes involved) - &amp;lt;GRE Overhead&amp;gt;(38 bytes)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt; flag is added to instruct the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; to create a &#039;GRE-over-IPv6&#039; rather than a &#039;GRE-over-IPv4&#039; tunnel. The reason for using IPv6 in this case is that the nodes of the virtual wall testbed don&#039;t have a public IPv4 address.&lt;br /&gt;
&lt;br /&gt;
Instead of specifying the FQDNs of the nodes, it would also have been possible to specify the public IP address of the node directly but this is more cumbersome and error prone (especially when using IPv6). Once the tunnel has been created it can be used just like any regular Ethernet interface except that, once again, the MTU is somewhat lower.&lt;br /&gt;
&lt;br /&gt;
As before, removing the tunnels is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-3-nodes.png|right|thumb|A multi-site link with three nodes. &#039;citynode1&#039; and &#039;citynode2&#039; are Citylab nodes. &#039;vwallnode1&#039; is a node on the Virtual Wall testbed.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As with [[#Creating_a_link_between_three_or_more_nodes|GRE links between citylab nodes]], setting up a GRE-link with more than two nodes is done by:&lt;br /&gt;
#Creating GRE tunnels from all nodes to a &#039;central&#039; node&lt;br /&gt;
#Bridging all of these tunnels together to create a single shared subnet.&lt;br /&gt;
&lt;br /&gt;
When such an &#039;overlay subnet&#039; spans multiple testbeds however, it is important to select the &#039;central node&#039; very carefully. Consider for example the topology shown on the right. In this case a link is created to which two nodes of the citylab testbed and a single node of the virtual wall are connected. If, in this case, &amp;lt;code&amp;gt;vwallnode1&amp;lt;/code&amp;gt; were to be selected as the &#039;central&#039; node, then all traffic between &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; would be sent over the virtual wall testbed unnecessarily. While in this case it would therefore be better to use &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; as a central node, for other test-setups the &#039;central node&#039; to use may not be so simple to determine.&lt;br /&gt;
&lt;br /&gt;
The 3-node setup shown in the example on the right, with &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; as a central node, can be created as follows:&lt;br /&gt;
 can be created as follows:&lt;br /&gt;
&lt;br /&gt;
#Run the `hostname` command on all three nodes to learn their fully qualified domain names.&lt;br /&gt;
#On &#039;&#039;&#039;citynode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_bridge -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode2&amp;gt; &amp;lt;fdn_of_vwallnode1&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;The &amp;lt;code&amp;gt;gre_add_bridge&amp;lt;/code&amp;gt; command used here is very similar to the one used to set up a multipoint GRE-link within the citylab testbed itself. Once again, the only differences are&lt;br /&gt;
#* The added &amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt; flag to manually set the MTU on the created link (see [[#Creating_a_link_between_two_nodes_2|this section]] as to why this is needed)&lt;br /&gt;
#* The added &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt; flag to force the use of IPv6 (this is needed because the Virtual Wall testbed doesn&#039;t use public IPv4 addresses)&lt;br /&gt;
#* The use of FQDNs rather than just hostnames to specify the other nodes to connect to.&lt;br /&gt;
#Connect the other nodes to the &#039;GRE Bridge:&lt;br /&gt;
#* On &#039;&#039;&#039;citynode2&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.2/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;vwallnode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.3/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been created it can be used just like any other linux bridge. Removing the &#039;GRE Bridge&#039; is done in exactly the same way as it is done for a &#039;local&#039; GRE Bridge. See [[#Creating_a_link_between_three_or_more_nodes|this section]] for more information.&lt;br /&gt;
&lt;br /&gt;
== Setting up Link impairment on GRE Tunnels ==&lt;br /&gt;
&lt;br /&gt;
While it is not possible to configure link-impairment on GRE tunnels via the JFed interface, it is possible to do so manually once the test has started. This not only works for links created by JFed but also for links created manually.&lt;br /&gt;
&lt;br /&gt;
Adding impairment to a link is done by running the following command on each node connected to the GRE-tunnel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem loss random &amp;lt;loss_percentage&amp;gt;% rate &amp;lt;data_rate&amp;gt; delay &amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this command:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;link&amp;gt;&amp;lt;/code&amp;gt; is the name of the gre tunnel interface&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;loss_percentage&amp;gt;&amp;lt;/code&amp;gt; is the percent of packets to be randomly dropped&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;data_rate&amp;gt;&amp;lt;/code&amp;gt; is the data rate limit to impose on the link (e.g 10mbit, 20kbit, ...)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt; is the delay (in microseconds) to add to packets sent from the host. (So: to add a 5ms delay you need to specify 5000)&lt;br /&gt;
&lt;br /&gt;
As an example, the following command adds a 20% loss, a maximum data rate of 35mbit and a 7.5ms delay to link0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev link0 root netem loss random 20% rate 35mbit delay 7500&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The link impairment configured with the above command only affects packet that are &#039;&#039;sent&#039;&#039; from the host. Received packets are unaffected. Therefore it is imperative that you configure the same link impairment settings on both nodes connected to the GRE tunnel.&lt;br /&gt;
&lt;br /&gt;
Removing link impairment on a link is done by running the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the impairment settings on a link, you first need to remove the link impairment all together and then add it again with the new settings.&lt;br /&gt;
&lt;br /&gt;
More information on the &#039;netem&#039; traffic control queueing discipline can be found here: https://www.systutorials.com/docs/linux/man/8-tc-netem/&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=338</id>
		<title>GRE Tunnels</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=338"/>
		<updated>2021-08-11T12:06:00Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Creating a link between three or more nodes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At this point, the CityLab testbed only has limited support for &#039;&#039;automatically&#039;&#039; creating links between nodes using the JFed interface. Standard IP-in-IP GRE Tunnels and Ethernet-in-IP GRE Tunnels (&#039;&#039;gre-tunnel&#039;&#039; and &#039;&#039;egre-tunnel&#039;&#039; links in JFed) are supported. Adding support &#039;&#039;native&#039;&#039; Ethernet links (lan links in JFed) is on our TODO list. Since both &#039;gre&#039; and &#039;egre&#039; tunnels are point-to-point tunnels it is currently not (yet) possible to create a JFed-link with more than two connected nodes. As a workaround it &#039;&#039;is&#039;&#039; possible to bridge multiple &#039;egre&#039;-tunnels together into a single (tunneled) L2-network once the test has started.&lt;br /&gt;
&lt;br /&gt;
This page provides a quick How-To guide on how to create standard &#039;gre&#039; or &#039;egre-tunnels&#039; in JFed and then explains how to manually set up and bridge  egre-tunnels manually (after the test has started).&lt;br /&gt;
&lt;br /&gt;
== Creating Links between nodes through the JFed interface ==&lt;br /&gt;
&lt;br /&gt;
=== Setting up links ===&lt;br /&gt;
&lt;br /&gt;
Creating Links between nodes through the JFed interface is very straightforward and can be done as follows:&lt;br /&gt;
&lt;br /&gt;
* Start JFed, click on &#039;New&#039; and drag in two wireless nodes. For this tutorial we&#039;ll assume that these nodes are called &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;&lt;br /&gt;
* Edit the node properties so both nodes are sourced from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed. (By default Wilab2 is used).&amp;lt;p&amp;gt;[[File:Jfed_experiment_2_nodes.png|Drag in two nodes from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed and name them &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;|720px]]&amp;lt;/P&amp;gt;&lt;br /&gt;
* Drag a line from &#039;&#039;apu1&#039;&#039; to &#039;&#039;apu2&#039;&#039;. A &#039;&#039;link&#039;&#039; element connecting the two nodes is automatically created.&lt;br /&gt;
* If you are using JFed GUI 5.9 or above, link type of the link will already be set to &#039;gre&#039;. (This is shown between braces behind the name of the link). &amp;lt;p&amp;gt;[[File:Jfed_gre_link_2_nodes.png||300px]]&amp;lt;/p&amp;gt; If this is not the case, or you would like to create an &#039;egre&#039;-link instead, the link-type will need to be manually configured: &lt;br /&gt;
*# Right-click on the &#039;&#039;link&#039;&#039;-element, Click on &#039;&#039;Configure Link&#039;&#039; and select the &#039;&#039;Link Type&#039;&#039;-tab in the options window. &lt;br /&gt;
*# Change the link-type to &#039;gre-tunnel&#039; or &#039;egre-tunnel&#039; in the drop-down menu. If you select &#039;gre-tunnel&#039; an IP-in-IP tunnel will be created, if you select &#039;egre-tunnel&#039; an Ehternet-in-IP tunnel will be created. &amp;lt;p&amp;gt;[[File:JFed_link_options_type.png|Set the link-type to &#039;gre-tunnel&#039;|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
* JFed will automatically configure an IP-address on the tunnel interface for both nodes. optionally you can modify these IP-addresses in the &#039;&#039;General&#039;&#039; tab of the Link options-window &amp;lt;p&amp;gt;[[File:JFed_link_options_general.png|Changes the IP-addresses for the link if needed|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click &#039;Run&#039; to start your slice. When all nodes are green, your experiment has started and the GRE-tunnel between the two nodes has been configured. &amp;lt;p&amp;gt;[[File:JFed_gre_link_2_nodes_running.png|The running experiment|720px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*SSH into the &#039;&#039;apu1&#039;&#039; node. &lt;br /&gt;
*Run &amp;lt;code&amp;gt;ifconfig link02&amp;lt;/code&amp;gt; to verify that the GRE-tunnel has been created&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ifconfig link02&lt;br /&gt;
link02    Link encap:UNSPEC  HWaddr 8F-81-55-10-00-00-80-3F-00-00-00-00-00-00-00-00&lt;br /&gt;
          inet addr:192.168.0.1  P-t-P:192.168.0.1  Mask:255.255.255.0&lt;br /&gt;
          inet6 addr: fe80::200:5efe:8f81:5510/64 Scope:Link&lt;br /&gt;
          UP POINTOPOINT RUNNING NOARP  MTU:1434  Metric:1&lt;br /&gt;
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 txqueuelen:1&lt;br /&gt;
          RX bytes:112 (112.0 B)  TX bytes:168 (168.0 B)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Ping the &#039;&#039;apu2&#039;&#039;-tunnel enpoint by running &amp;lt;code&amp;gt;ping -c 4 &amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;&amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; is the IP-address configured for the tunnel endpoint on &#039;&#039;apu2&#039;&#039;. If you have not changed this, this is &amp;lt;code&amp;gt;192.168.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ping -c 4 192.168.0.2&lt;br /&gt;
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=2.21 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=1.60 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=1.46 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=4 ttl=64 time=1.51 ms&lt;br /&gt;
&lt;br /&gt;
--- 192.168.0.2 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3004ms&lt;br /&gt;
rtt min/avg/max/mdev = 1.464/1.699/2.218/0.303 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
==== No more than 2 nodes per link ====&lt;br /&gt;
&lt;br /&gt;
It is not possible to create (E)GRE-links with more than two nodes. The JFed GUI does allow additional nodes to be added to the link, but when the test is started the link will only exist on two nodes. This limitation is caused by the fact that the GRE-protocol only supports point-to-point tunnels. It is possible to [[#Manually setting up EGRE-tunnels|set up]] and [[#Creating a link between three or more nodes|bridge]] multiple egre-tunnels, but this cannot be done through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== EGRE-tunnels only work with &#039;CoT&#039; disk images ====&lt;br /&gt;
&lt;br /&gt;
To enable support for &#039;egre-tunnel&#039; links, a few tweaks had to be made to the &#039;client-side&#039; emulab-tools installed in the testbed disk images. Since these tweaks are not (yet) incorporated in the upstream emulab-code base, they are also not present in the many emulab-images used around the world. &lt;br /&gt;
&lt;br /&gt;
We have added these tweaks to the &#039;CoT&#039; disk-images of the CityLab testbed (see [[Disk Images]]), so if you want to use egre-links you must use a &#039;CoT&#039; disk image.&lt;br /&gt;
&lt;br /&gt;
==== (E)GRE-tunnels between nodes of different testbeds cannot be created via JFed ====&lt;br /&gt;
&lt;br /&gt;
Even at the best of times, creating links between nodes of different testbeds is an &#039;experimental feature&#039; at best. While it is perfectly possible to set up GRE and EGRE tunnels between nodes of different testbeds, it is currently not possible to do so through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== Link impairment on GRE Tunnels cannot be configured through the JFed GUI ====&lt;br /&gt;
&lt;br /&gt;
The way JFed normally adds impairment to a link is by adding a so-called &#039;impairment node&#039; in between the nodes of a link to change the properties of the traffic flowing over the link. This mechanism however only works with ethernet interfaces and not with GRE Tunnels. That being said: it is possible to add link impairment to GRE tunnels manually. How to do so is [[#Setting_up_Link_impairment_on_GRE_Tunnels|explained below]].&lt;br /&gt;
&lt;br /&gt;
== Manually setting up EGRE-tunnels ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; although it is possible to manually set up GRE-tunnels it is much easier to do so through the JFed-interface. The only reason for creating them manually is to create a &#039;link&#039; between more than two nodes or to create links with nodes of another testbed (both of which are currently not supported through JFed)&lt;br /&gt;
&lt;br /&gt;
A number of [[:File:Gre-utils.tar.gz | scripts]] are provided to make it as easy as possible to create and manage EGRE-tunnels.&lt;br /&gt;
Before any EGRE-tunnels can be created, these scripts first need to be installed on every node.&lt;br /&gt;
This can be done by running the following one-liner:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will&lt;br /&gt;
* Download the [[:File:Gre-utils.tar.gz | Gre-utils.tar.gz]] archive&lt;br /&gt;
* Install the scripts in &amp;lt;code&amp;gt;/usr/local&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
&lt;br /&gt;
[[File:Jfed-link-2-nodes.png|thumb|right|A simple link between two nodes.]]&lt;br /&gt;
&lt;br /&gt;
A simple GRE tunnel can be created by running the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.1/24 link0 apu2&amp;lt;/code&amp;gt;&lt;br /&gt;
* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above commands &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and &amp;lt;code&amp;gt;apuX&amp;lt;/code&amp;gt; is the host to create a tunnel to. The optional &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can be used to automatically configure an IPv4-address on the newly created interface.&lt;br /&gt;
&lt;br /&gt;
To allow the node names configured in JFed to be used to configure GRE tunnels, the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script tries to behave somewhat intelligently when resolving hostnames:&lt;br /&gt;
* If the specified host is a Fully Qualified Domain Name (i.e: it contains a &#039;.&#039;), a regular DNS query is performed&lt;br /&gt;
* If the specified host is a simple hostname (no &#039;.&#039; in the hostname), the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script &#039;&#039;first&#039;&#039; tries to resolve the specified host to a node name specified in JFed. If this fails, the IP-address of the host is resolved using a normal DNS query. &lt;br /&gt;
* If the specified host is a valid IPv4 address, no DNS-resolution is performed.&lt;br /&gt;
&lt;br /&gt;
Once the GRE tunnel is created, it can be used just like any other Ethernet interface, except that the MTU is a bit lower than normal.&lt;br /&gt;
&lt;br /&gt;
Removing the tunnel is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script. &lt;br /&gt;
To remove the tunnels created above for example, the following command would have to be run on each node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-link-3-nodes.png|thumb|right|A slightly more complicated link between more than two nodes.]]&lt;br /&gt;
&lt;br /&gt;
Creating a link between more than two nodes is (slightly) more complicated since GRE only allows Point-to-Point tunnels to be created. To work around this, GRE Tunnels are created from one &#039;central&#039; node to all other nodes on the link. These GRE Tunnels are then &#039;bridged&#039; together on the central node to form a shared subnet. Such a &#039;GRE Bridge&#039; can easily be created using the &amp;lt;code&amp;gt;gre_add_bridge&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
The 3-node setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_bridge -c 192.168.0.1/24 link0 apu2 apu3&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;As for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script, &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and the &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can optionally be used to configure an IPv4 address on the interface. The remaining parameters, in this case &amp;lt;code&amp;gt;apu2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apu3&amp;lt;/code&amp;gt; are the hosts to connect to. The resolution of these hostnames to IP-addresses is done in exactly the same way as for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script.&lt;br /&gt;
#&lt;br /&gt;
#* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;apu3&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.3/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case &#039;&#039;apu1&#039;&#039; is used as the central node and &#039;&#039;apu2&#039;&#039; and &#039;&#039;apu3&#039;&#039; connect to it in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario.&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been created it can be used just like any other linux bridge. Additional interfaces can be added/removed using the &amp;lt;code&amp;gt;brctl&amp;lt;/code&amp;gt; command. The bridge&#039;s stastus can be queried using the &amp;lt;code&amp;gt;brctl show&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  user@apu1:~$ brctl show link0&lt;br /&gt;
  bridge name	bridge id		STP enabled	interfaces&lt;br /&gt;
  link0		8000.a2b74a105a76	no		link0_gre_0&lt;br /&gt;
  							link0_gre_1&lt;br /&gt;
In the above output, the &amp;lt;code&amp;gt;link0_gre_x&amp;lt;/code&amp;gt; interfaces are the GRE tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
Removing the &#039;GRE Bridge&#039; is done using the &amp;lt;code&amp;gt;gre_del_bridge_script&amp;lt;/code&amp;gt;. It is highly recommended to use this script to remove the bridge (rather than the &#039;&#039;brctl&#039;&#039; command) as this script not only removes the bridge itself, but also cleans up the GRE-tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
To remove the bridge created in the above example the following command would have to be run &lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039;: &amp;lt;code&amp;gt;sudo gre_del_bridge link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been removed, the GRE-Tunnels on the other nodes also need to be cleaned up. This is done in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
==== Single tunnel between two nodes ====&lt;br /&gt;
&lt;br /&gt;
GRE Tunnels are identified &#039;&#039;solely&#039;&#039; on the source and destination IP-address of the encapsulating packet. That means that it is &#039;&#039;not&#039;&#039; possible to establish two independent tunnels between the same two nodes at the same time.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between two nodes| two node]] scenario, this means that only a &#039;&#039;single&#039;&#039; link can be created between two nodes.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between three or more nodes| mutliple nodes]] scenario, a node can participate in multiple links as long as:&lt;br /&gt;
* each link uses a different &#039;central node&#039;&lt;br /&gt;
* each &#039;central node&#039; is only part of &#039;&#039;one&#039;&#039; link at the same time&lt;br /&gt;
&lt;br /&gt;
It should be noted however, that GRE Tunnels can be used in combination with VLAN-tagging, so if you &#039;&#039;really&#039;&#039; need to create multiple links between two nodes, you can do so by defining multiple VLANs on the GRE tunnel interface. This however is not something that can be done using the scripts provided here.&lt;br /&gt;
&lt;br /&gt;
==== Reduced MTU ====&lt;br /&gt;
&lt;br /&gt;
Using a GRE Tunnel incurs an overhead of 38 bytes. This is because the original Ethernet packet needs to be prefixed with an additional IP- and Ethernet-header in order to send it to the other tunnel endpoint. To prevent fragmentation, the linux kernel automatically reduces the MTU of the GRE-interface. As a result, the MTU &#039;&#039;inside&#039;&#039; the tunnel is 38 bytes lower than the MTU &#039;&#039;outside&#039;&#039; the tunnel.&lt;br /&gt;
&lt;br /&gt;
Except for a small decrease in performance this usually is not that big of a problem, with one notable exception. When, for instance, a WiFi AP-interface is bridged to a GRE Tunnel, the MTU is set to the smallest MTU of the &#039;slave&#039; interfaces (in this case the GRE-tunnel). This lower MTU however is &#039;&#039;&#039;not&#039;&#039;&#039; automagically communicated to the connected WiFi clients and as a result these clients may still send packets that are larger than the MTU of the bridge. Since these packets are subsequently dropped by the linux bridge, this can lead to all sorts of nasty problems. The most common of which are dropped UDP packets and TCP sessions seem to work fine and then suddenly hang when more than a few bytes at a time are sent over them.&lt;br /&gt;
&lt;br /&gt;
To resolve this issue the MTU of the other WiFi clients should be reduced to the MTU of the linux bridge. When static IP-addresses are used, this can easily be done using the &amp;lt;code&amp;gt;ip link&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  ip link set mtu &amp;lt;mtu&amp;gt; dev &amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If DHCP is used, the lower MTU should be advertised by the DHCP server.&lt;br /&gt;
&lt;br /&gt;
== Setting up (E)GRE-Tunnels Citylab and the Virtual Wall ==&lt;br /&gt;
&lt;br /&gt;
At this point it is not possible to set up &#039;multi-site&#039; (e)GRE tunnels through the JFed interface, but it is possible to do so manually after the test has started. The process of doing so is very similar to manually creating EGRE-Tunnels within the citylab testbed itself, but the following caveats need to be taken into account:&lt;br /&gt;
&lt;br /&gt;
* Setting up GRE Tunnels between nodes of different testbeds requires both endpoints to have a &#039;&#039;routable&#039;&#039; (i.e. public) IPv4 or IPv6 address and for GRE-traffic to be allowed by the firewall/router through which the nodes are connected to the internet. While all nodes of the citylab testbed meet the above requirement, this may not necessarily be the case for nodes of other testbeds.&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;MTU&#039;&#039; of the created link needs to be set manually. Otherwise you will most likely encounter MTU-mismatch issues given that, by default, the MTU of the created tunnel is calculated from the MTU of the uplink interface, and that not all testbeds use the same MTU on their uplink interface.&lt;br /&gt;
&lt;br /&gt;
* GRE tunnels are &#039;&#039;&#039;not encrypted&#039;&#039;&#039;. Any data you send over them is sent plain-text over the internet so make sure not to send any sensitive data over them without adding encryption in some other way. If you need a tunnel which encrypts the traffic as well, OpenVPN is most likely a better solution.&lt;br /&gt;
&lt;br /&gt;
The remainder of this section explains how to set up &#039;multi-site&#039; (e)gre tunnels. We specifically focus on setting up GRE tunnels between Citylab and the [https://doc.ilabt.imec.be/ilabt/virtualwall/|Virtual Wall], but setting up GRE tunnels to other testbeds should be very similar.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
* Make sure that all nodes involved are running &#039;&#039;at least&#039;&#039; Ubuntu 16.04 (EGRE tunnels are not supported in Ubuntu 14.04 and before). For citylab nodes this is the case by default, but for the nodes on the virtual wall you will have to explicitly specify a different disk image when you set up the experiment as that testbed uses &#039;Ubuntu 14.04&#039; by default.&lt;br /&gt;
&lt;br /&gt;
* Setting up multi-site (e)gre tunnels is done with the same &#039;helper scripts&#039; as [[#Manually_setting_up_EGRE-tunnels|used before]]. Before setting up the tunnels themselves, these scripts need to be installed on every node. This can be done using the following one-liner: &lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-2-nodes.png|thumb|right|A &#039;simple&#039; multi-site link with two nodes. &#039;citynode1&#039; is a node of the Citylab testbed. &#039;vwallnode1&#039; is a node of the Virtual Wall testbed.]]&lt;br /&gt;
A point-to-point (E)GRE tunnel can be created using the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# Run the &amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt; command on both hosts to learn their fully qualified domain names (FQDNs). E.g: &lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@citynode1:~# hostname&amp;amp;#10;citynode1.gretest.wall2-ilabt-iminds-be.lab.cityofthings.eu&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@vwallnode1:~# hostname&amp;amp;#10;vwallnode1.gretest.wall2-ilabt-iminds-be.wall2.ilabt.iminds.be&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: As shown in the examples above the FQDNs of the nodes depends not only on the hostname configured in JFed but also on the name of the experiment, project and the testbed the node belongs to. Therefore yuo will almost certainly need to use different FQDNs than the ones listed above&lt;br /&gt;
# Create the EGRE tunnel itself:&lt;br /&gt;
#* On &#039;&#039;&#039;citynode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_vwallnode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;vwallnode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; commands shown above are very similar to the ones used to set up an EGRE-tunnel between citylab nodes, but there are a few important differences:&lt;br /&gt;
* Rather than only specifying the hostname of the other endpoint, the full FQDN needs to be specified&lt;br /&gt;
* The &amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt; flag is added to manually set the MTU on the link. As explained before, this is needed to prevent MTU-mismatch issues. In this specific example an MTU of &amp;lt;code&amp;gt;1400&amp;lt;/code&amp;gt; bytes is specified since it provides enough headroom for multiple encapsulation headers and is &#039;good enough&#039; for an initial test. For optimal performance however, the MTU should be set to &amp;lt;code&amp;gt;min(uplink MTU of all nodes involved) - &amp;lt;GRE Overhead&amp;gt;(38 bytes)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt; flag is added to instruct the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; to create a &#039;GRE-over-IPv6&#039; rather than a &#039;GRE-over-IPv4&#039; tunnel. The reason for using IPv6 in this case is that the nodes of the virtual wall testbed don&#039;t have a public IPv4 address.&lt;br /&gt;
&lt;br /&gt;
Instead of specifying the FQDNs of the nodes, it would also have been possible to specify the public IP address of the node directly but this is more cumbersome and error prone (especially when using IPv6). Once the tunnel has been created it can be used just like any regular Ethernet interface except that, once again, the MTU is somewhat lower.&lt;br /&gt;
&lt;br /&gt;
As before, removing the tunnels is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-3-nodes.png|right|thumb|A multi-site link with three nodes. &#039;citynode1&#039; and &#039;citynode2&#039; are Citylab nodes. &#039;vwallnode1&#039; is a node on the Virtual Wall testbed.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As with [[#Creating_a_link_between_three_or_more_nodes|GRE links between citylab nodes]], setting up a GRE-link with more than two nodes is done by:&lt;br /&gt;
#Creating GRE tunnels from all nodes to a &#039;central&#039; node&lt;br /&gt;
#Bridging all of these tunnels together to create a single shared subnet.&lt;br /&gt;
&lt;br /&gt;
When such an &#039;overlay subnet&#039; spans multiple testbeds however, it is important to select the &#039;central node&#039; very carefully. Consider for example the topology shown on the right. In this case a link is created to which two nodes of the citylab testbed and a single node of the virtual wall are connected. If, in this case, &amp;lt;code&amp;gt;vwallnode1&amp;lt;/code&amp;gt; were to be selected as the &#039;central&#039; node, then all traffic between &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; would be sent over the virtual wall testbed unnecessarily. While in this case it would therefore be better to use &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; as a central node, for other test-setups the &#039;central node&#039; to use may not be so simple to determine.&lt;br /&gt;
&lt;br /&gt;
The 3-node setup shown in the example on the right, with &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; as a central node, can be created as follows:&lt;br /&gt;
 can be created as follows:&lt;br /&gt;
&lt;br /&gt;
#Run the `hostname` command on all three nodes to learn their fully qualified domain names.&lt;br /&gt;
#On &#039;&#039;&#039;citynode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_bridge -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode2&amp;gt; &amp;lt;fdn_of_vwallnode1&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;The &amp;lt;code&amp;gt;gre_add_bridge&amp;lt;/code&amp;gt; command used here is very similar to the one used to set up a multipoint GRE-link within the citylab testbed itself. Once again, the only differences are&lt;br /&gt;
#* The added &amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt; flag to manually set the MTU on the created link (see [[#Creating_a_link_between_two_nodes_2|this section]] as to why this is needed)&lt;br /&gt;
#* The added &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt; flag to force the use of IPv6 (this is needed because the Virtual Wall testbed doesn&#039;t use public IPv4 addresses)&lt;br /&gt;
#* The use of FQDNs rather than just hostnames to specify the other nodes to connect to.&lt;br /&gt;
#Connect the other nodes to the &#039;GRE Bridge:&lt;br /&gt;
#* On &#039;&#039;&#039;citynode2&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.2/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;vwallnode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.3/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been created it can be used just like any other linux bridge. Removing the &#039;GRE Bridge&#039; is done in exactly the same way as it is done for a &#039;local&#039; GRE Bridge. See [[#Creating_a_link_between_three_or_more_nodes|this section]] for more information.&lt;br /&gt;
&lt;br /&gt;
== Setting up Link impairment on GRE Tunnels ==&lt;br /&gt;
&lt;br /&gt;
While it is not possible to configure link-impairment on GRE tunnels via the JFed interface, it is possible to do so manually once the test has started. This not only works for links created by JFed but also for links created manually.&lt;br /&gt;
&lt;br /&gt;
Adding impairment to a link is done by running the following command on each node connected to the GRE-tunnel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem loss random &amp;lt;loss_percentage&amp;gt;% rate &amp;lt;data_rate&amp;gt; delay &amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this command:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;link&amp;gt;&amp;lt;/code&amp;gt; is the name of the gre tunnel interface&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;loss_percentage&amp;gt;&amp;lt;/code&amp;gt; is the percent of packets to be randomly dropped&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;data_rate&amp;gt;&amp;lt;/code&amp;gt; is the data rate limit to impose on the link (e.g 10mbit, 20kbit, ...)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt; is the delay (in microseconds) to add to packets sent from the host. (So: to add a 5ms delay you need to specify 5000)&lt;br /&gt;
&lt;br /&gt;
As an example, the following command adds a 20% loss, a maximum data rate of 35mbit and a 7.5ms delay to link0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev link0 root netem loss random 20% rate 35mbit delay 7500&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The link impairment configured with the above command only affects packet that are &#039;&#039;sent&#039;&#039; from the host. Received packets are unaffected. Therefore it is imperative that you configure the same link impairment settings on both nodes connected to the GRE tunnel.&lt;br /&gt;
&lt;br /&gt;
Removing link impairment on a link is done by running the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the impairment settings on a link, you first need to remove the link impairment all together and then add it again with the new settings.&lt;br /&gt;
&lt;br /&gt;
More information on the &#039;netem&#039; traffic control queueing discipline can be found here: https://www.systutorials.com/docs/linux/man/8-tc-netem/&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=337</id>
		<title>GRE Tunnels</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=337"/>
		<updated>2021-08-11T10:35:50Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Creating a link between three or more nodes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At this point, the CityLab testbed only has limited support for &#039;&#039;automatically&#039;&#039; creating links between nodes using the JFed interface. Standard IP-in-IP GRE Tunnels and Ethernet-in-IP GRE Tunnels (&#039;&#039;gre-tunnel&#039;&#039; and &#039;&#039;egre-tunnel&#039;&#039; links in JFed) are supported. Adding support &#039;&#039;native&#039;&#039; Ethernet links (lan links in JFed) is on our TODO list. Since both &#039;gre&#039; and &#039;egre&#039; tunnels are point-to-point tunnels it is currently not (yet) possible to create a JFed-link with more than two connected nodes. As a workaround it &#039;&#039;is&#039;&#039; possible to bridge multiple &#039;egre&#039;-tunnels together into a single (tunneled) L2-network once the test has started.&lt;br /&gt;
&lt;br /&gt;
This page provides a quick How-To guide on how to create standard &#039;gre&#039; or &#039;egre-tunnels&#039; in JFed and then explains how to manually set up and bridge  egre-tunnels manually (after the test has started).&lt;br /&gt;
&lt;br /&gt;
== Creating Links between nodes through the JFed interface ==&lt;br /&gt;
&lt;br /&gt;
=== Setting up links ===&lt;br /&gt;
&lt;br /&gt;
Creating Links between nodes through the JFed interface is very straightforward and can be done as follows:&lt;br /&gt;
&lt;br /&gt;
* Start JFed, click on &#039;New&#039; and drag in two wireless nodes. For this tutorial we&#039;ll assume that these nodes are called &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;&lt;br /&gt;
* Edit the node properties so both nodes are sourced from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed. (By default Wilab2 is used).&amp;lt;p&amp;gt;[[File:Jfed_experiment_2_nodes.png|Drag in two nodes from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed and name them &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;|720px]]&amp;lt;/P&amp;gt;&lt;br /&gt;
* Drag a line from &#039;&#039;apu1&#039;&#039; to &#039;&#039;apu2&#039;&#039;. A &#039;&#039;link&#039;&#039; element connecting the two nodes is automatically created.&lt;br /&gt;
* If you are using JFed GUI 5.9 or above, link type of the link will already be set to &#039;gre&#039;. (This is shown between braces behind the name of the link). &amp;lt;p&amp;gt;[[File:Jfed_gre_link_2_nodes.png||300px]]&amp;lt;/p&amp;gt; If this is not the case, or you would like to create an &#039;egre&#039;-link instead, the link-type will need to be manually configured: &lt;br /&gt;
*# Right-click on the &#039;&#039;link&#039;&#039;-element, Click on &#039;&#039;Configure Link&#039;&#039; and select the &#039;&#039;Link Type&#039;&#039;-tab in the options window. &lt;br /&gt;
*# Change the link-type to &#039;gre-tunnel&#039; or &#039;egre-tunnel&#039; in the drop-down menu. If you select &#039;gre-tunnel&#039; an IP-in-IP tunnel will be created, if you select &#039;egre-tunnel&#039; an Ehternet-in-IP tunnel will be created. &amp;lt;p&amp;gt;[[File:JFed_link_options_type.png|Set the link-type to &#039;gre-tunnel&#039;|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
* JFed will automatically configure an IP-address on the tunnel interface for both nodes. optionally you can modify these IP-addresses in the &#039;&#039;General&#039;&#039; tab of the Link options-window &amp;lt;p&amp;gt;[[File:JFed_link_options_general.png|Changes the IP-addresses for the link if needed|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click &#039;Run&#039; to start your slice. When all nodes are green, your experiment has started and the GRE-tunnel between the two nodes has been configured. &amp;lt;p&amp;gt;[[File:JFed_gre_link_2_nodes_running.png|The running experiment|720px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*SSH into the &#039;&#039;apu1&#039;&#039; node. &lt;br /&gt;
*Run &amp;lt;code&amp;gt;ifconfig link02&amp;lt;/code&amp;gt; to verify that the GRE-tunnel has been created&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ifconfig link02&lt;br /&gt;
link02    Link encap:UNSPEC  HWaddr 8F-81-55-10-00-00-80-3F-00-00-00-00-00-00-00-00&lt;br /&gt;
          inet addr:192.168.0.1  P-t-P:192.168.0.1  Mask:255.255.255.0&lt;br /&gt;
          inet6 addr: fe80::200:5efe:8f81:5510/64 Scope:Link&lt;br /&gt;
          UP POINTOPOINT RUNNING NOARP  MTU:1434  Metric:1&lt;br /&gt;
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 txqueuelen:1&lt;br /&gt;
          RX bytes:112 (112.0 B)  TX bytes:168 (168.0 B)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Ping the &#039;&#039;apu2&#039;&#039;-tunnel enpoint by running &amp;lt;code&amp;gt;ping -c 4 &amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;&amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; is the IP-address configured for the tunnel endpoint on &#039;&#039;apu2&#039;&#039;. If you have not changed this, this is &amp;lt;code&amp;gt;192.168.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ping -c 4 192.168.0.2&lt;br /&gt;
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=2.21 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=1.60 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=1.46 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=4 ttl=64 time=1.51 ms&lt;br /&gt;
&lt;br /&gt;
--- 192.168.0.2 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3004ms&lt;br /&gt;
rtt min/avg/max/mdev = 1.464/1.699/2.218/0.303 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
==== No more than 2 nodes per link ====&lt;br /&gt;
&lt;br /&gt;
It is not possible to create (E)GRE-links with more than two nodes. The JFed GUI does allow additional nodes to be added to the link, but when the test is started the link will only exist on two nodes. This limitation is caused by the fact that the GRE-protocol only supports point-to-point tunnels. It is possible to [[#Manually setting up EGRE-tunnels|set up]] and [[#Creating a link between three or more nodes|bridge]] multiple egre-tunnels, but this cannot be done through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== EGRE-tunnels only work with &#039;CoT&#039; disk images ====&lt;br /&gt;
&lt;br /&gt;
To enable support for &#039;egre-tunnel&#039; links, a few tweaks had to be made to the &#039;client-side&#039; emulab-tools installed in the testbed disk images. Since these tweaks are not (yet) incorporated in the upstream emulab-code base, they are also not present in the many emulab-images used around the world. &lt;br /&gt;
&lt;br /&gt;
We have added these tweaks to the &#039;CoT&#039; disk-images of the CityLab testbed (see [[Disk Images]]), so if you want to use egre-links you must use a &#039;CoT&#039; disk image.&lt;br /&gt;
&lt;br /&gt;
==== (E)GRE-tunnels between nodes of different testbeds cannot be created via JFed ====&lt;br /&gt;
&lt;br /&gt;
Even at the best of times, creating links between nodes of different testbeds is an &#039;experimental feature&#039; at best. While it is perfectly possible to set up GRE and EGRE tunnels between nodes of different testbeds, it is currently not possible to do so through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== Link impairment on GRE Tunnels cannot be configured through the JFed GUI ====&lt;br /&gt;
&lt;br /&gt;
The way JFed normally adds impairment to a link is by adding a so-called &#039;impairment node&#039; in between the nodes of a link to change the properties of the traffic flowing over the link. This mechanism however only works with ethernet interfaces and not with GRE Tunnels. That being said: it is possible to add link impairment to GRE tunnels manually. How to do so is [[#Setting_up_Link_impairment_on_GRE_Tunnels|explained below]].&lt;br /&gt;
&lt;br /&gt;
== Manually setting up EGRE-tunnels ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; although it is possible to manually set up GRE-tunnels it is much easier to do so through the JFed-interface. The only reason for creating them manually is to create a &#039;link&#039; between more than two nodes or to create links with nodes of another testbed (both of which are currently not supported through JFed)&lt;br /&gt;
&lt;br /&gt;
A number of [[:File:Gre-utils.tar.gz | scripts]] are provided to make it as easy as possible to create and manage EGRE-tunnels.&lt;br /&gt;
Before any EGRE-tunnels can be created, these scripts first need to be installed on every node.&lt;br /&gt;
This can be done by running the following one-liner:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will&lt;br /&gt;
* Download the [[:File:Gre-utils.tar.gz | Gre-utils.tar.gz]] archive&lt;br /&gt;
* Install the scripts in &amp;lt;code&amp;gt;/usr/local&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
&lt;br /&gt;
[[File:Jfed-link-2-nodes.png|thumb|right|A simple link between two nodes.]]&lt;br /&gt;
&lt;br /&gt;
A simple GRE tunnel can be created by running the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.1/24 link0 apu2&amp;lt;/code&amp;gt;&lt;br /&gt;
* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above commands &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and &amp;lt;code&amp;gt;apuX&amp;lt;/code&amp;gt; is the host to create a tunnel to. The optional &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can be used to automatically configure an IPv4-address on the newly created interface.&lt;br /&gt;
&lt;br /&gt;
To allow the node names configured in JFed to be used to configure GRE tunnels, the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script tries to behave somewhat intelligently when resolving hostnames:&lt;br /&gt;
* If the specified host is a Fully Qualified Domain Name (i.e: it contains a &#039;.&#039;), a regular DNS query is performed&lt;br /&gt;
* If the specified host is a simple hostname (no &#039;.&#039; in the hostname), the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script &#039;&#039;first&#039;&#039; tries to resolve the specified host to a node name specified in JFed. If this fails, the IP-address of the host is resolved using a normal DNS query. &lt;br /&gt;
* If the specified host is a valid IPv4 address, no DNS-resolution is performed.&lt;br /&gt;
&lt;br /&gt;
Once the GRE tunnel is created, it can be used just like any other Ethernet interface, except that the MTU is a bit lower than normal.&lt;br /&gt;
&lt;br /&gt;
Removing the tunnel is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script. &lt;br /&gt;
To remove the tunnels created above for example, the following command would have to be run on each node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-link-3-nodes.png|thumb|right|A slightly more complicated link between more than two nodes.]]&lt;br /&gt;
&lt;br /&gt;
Creating a link between more than two nodes is (slightly) more complicated since GRE only allows Point-to-Point tunnels to be created. To work around this, GRE Tunnels are created from one &#039;central&#039; node to all other nodes on the link. These GRE Tunnels are then &#039;bridged&#039; together on the central node to form a shared subnet. Such a &#039;GRE Bridge&#039; can easily be created using the &amp;lt;code&amp;gt;gre_add_bridge&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
The 3-node setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_bridge -c 192.168.0.1/24 link0 apu2 apu3&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;As for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script, &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and the &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can optionally be used to configure an IPv4 address on the interface. The remaining parameters, in this case &amp;lt;code&amp;gt;apu2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apu3&amp;lt;/code&amp;gt; are the hosts to connect to. The resolution of these hostnames to IP-addresses is done in exactly the same way as for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script.&lt;br /&gt;
#&lt;br /&gt;
#* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;apu3&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.3/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case &#039;&#039;apu1&#039;&#039; is used as the central node and &#039;&#039;apu2&#039;&#039; and &#039;&#039;apu3&#039;&#039; connect to it in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario.&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been created it can be used just like any other linux bridge. Additional interfaces can be added/removed using the &amp;lt;code&amp;gt;brctl&amp;lt;/code&amp;gt; command. The bridge&#039;s stastus can be queried using the &amp;lt;code&amp;gt;brctl show&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  user@apu1:~$ brctl show link0&lt;br /&gt;
  bridge name	bridge id		STP enabled	interfaces&lt;br /&gt;
  link0		8000.a2b74a105a76	no		link0_gre_0&lt;br /&gt;
  							link0_gre_1&lt;br /&gt;
In the above output, the &amp;lt;code&amp;gt;link0_gre_x&amp;lt;/code&amp;gt; interfaces are the GRE tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
Removing the &#039;GRE Bridge&#039; is done using the &amp;lt;code&amp;gt;gre_del_bridge_script&amp;lt;/code&amp;gt;. It is highly recommended to use this script to remove the bridge (rather than the &#039;&#039;brctl&#039;&#039; command) as this script not only removes the bridge itself, but also cleans up the GRE-tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
To remove the bridge created in the above example the following command would have to be run &lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039;: &amp;lt;code&amp;gt;sudo gre_del_bridge link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been removed, the GRE-Tunnels on the other nodes also need to be cleaned up. This is done in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
==== Single tunnel between two nodes ====&lt;br /&gt;
&lt;br /&gt;
GRE Tunnels are identified &#039;&#039;solely&#039;&#039; on the source and destination IP-address of the encapsulating packet. That means that it is &#039;&#039;not&#039;&#039; possible to establish two independent tunnels between the same two nodes at the same time.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between two nodes| two node]] scenario, this means that only a &#039;&#039;single&#039;&#039; link can be created between two nodes.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between three or more nodes| mutliple nodes]] scenario, a node can participate in multiple links as long as:&lt;br /&gt;
* each link uses a different &#039;central node&#039;&lt;br /&gt;
* each &#039;central node&#039; is only part of &#039;&#039;one&#039;&#039; link at the same time&lt;br /&gt;
&lt;br /&gt;
It should be noted however, that GRE Tunnels can be used in combination with VLAN-tagging, so if you &#039;&#039;really&#039;&#039; need to create multiple links between two nodes, you can do so by defining multiple VLANs on the GRE tunnel interface. This however is not something that can be done using the scripts provided here.&lt;br /&gt;
&lt;br /&gt;
==== Reduced MTU ====&lt;br /&gt;
&lt;br /&gt;
Using a GRE Tunnel incurs an overhead of 38 bytes. This is because the original Ethernet packet needs to be prefixed with an additional IP- and Ethernet-header in order to send it to the other tunnel endpoint. To prevent fragmentation, the linux kernel automatically reduces the MTU of the GRE-interface. As a result, the MTU &#039;&#039;inside&#039;&#039; the tunnel is 38 bytes lower than the MTU &#039;&#039;outside&#039;&#039; the tunnel.&lt;br /&gt;
&lt;br /&gt;
Except for a small decrease in performance this usually is not that big of a problem, with one notable exception. When, for instance, a WiFi AP-interface is bridged to a GRE Tunnel, the MTU is set to the smallest MTU of the &#039;slave&#039; interfaces (in this case the GRE-tunnel). This lower MTU however is &#039;&#039;&#039;not&#039;&#039;&#039; automagically communicated to the connected WiFi clients and as a result these clients may still send packets that are larger than the MTU of the bridge. Since these packets are subsequently dropped by the linux bridge, this can lead to all sorts of nasty problems. The most common of which are dropped UDP packets and TCP sessions seem to work fine and then suddenly hang when more than a few bytes at a time are sent over them.&lt;br /&gt;
&lt;br /&gt;
To resolve this issue the MTU of the other WiFi clients should be reduced to the MTU of the linux bridge. When static IP-addresses are used, this can easily be done using the &amp;lt;code&amp;gt;ip link&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  ip link set mtu &amp;lt;mtu&amp;gt; dev &amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If DHCP is used, the lower MTU should be advertised by the DHCP server.&lt;br /&gt;
&lt;br /&gt;
== Setting up (E)GRE-Tunnels Citylab and the Virtual Wall ==&lt;br /&gt;
&lt;br /&gt;
At this point it is not possible to set up &#039;multi-site&#039; (e)GRE tunnels through the JFed interface, but it is possible to do so manually after the test has started. The process of doing so is very similar to manually creating EGRE-Tunnels within the citylab testbed itself, but the following caveats need to be taken into account:&lt;br /&gt;
&lt;br /&gt;
* Setting up GRE Tunnels between nodes of different testbeds requires both endpoints to have a &#039;&#039;routable&#039;&#039; (i.e. public) IPv4 or IPv6 address and for GRE-traffic to be allowed by the firewall/router through which the nodes are connected to the internet. While all nodes of the citylab testbed meet the above requirement, this may not necessarily be the case for nodes of other testbeds.&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;MTU&#039;&#039; of the created link needs to be set manually. Otherwise you will most likely encounter MTU-mismatch issues given that, by default, the MTU of the created tunnel is calculated from the MTU of the uplink interface, and that not all testbeds use the same MTU on their uplink interface.&lt;br /&gt;
&lt;br /&gt;
* GRE tunnels are &#039;&#039;&#039;not encrypted&#039;&#039;&#039;. Any data you send over them is sent plain-text over the internet so make sure not to send any sensitive data over them without adding encryption in some other way. If you need a tunnel which encrypts the traffic as well, OpenVPN is most likely a better solution.&lt;br /&gt;
&lt;br /&gt;
The remainder of this section explains how to set up &#039;multi-site&#039; (e)gre tunnels. We specifically focus on setting up GRE tunnels between Citylab and the [https://doc.ilabt.imec.be/ilabt/virtualwall/|Virtual Wall], but setting up GRE tunnels to other testbeds should be very similar.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
* Make sure that all nodes involved are running &#039;&#039;at least&#039;&#039; Ubuntu 16.04 (EGRE tunnels are not supported in Ubuntu 14.04 and before). For citylab nodes this is the case by default, but for the nodes on the virtual wall you will have to explicitly specify a different disk image when you set up the experiment as that testbed uses &#039;Ubuntu 14.04&#039; by default.&lt;br /&gt;
&lt;br /&gt;
* Setting up multi-site (e)gre tunnels is done with the same &#039;helper scripts&#039; as [[#Manually_setting_up_EGRE-tunnels|used before]]. Before setting up the tunnels themselves, these scripts need to be installed on every node. This can be done using the following one-liner: &lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-2-nodes.png|thumb|right|A &#039;simple&#039; multi-site link with two nodes. &#039;citynode1&#039; is a node of the Citylab testbed. &#039;vwallnode1&#039; is a node of the Virtual Wall testbed.]]&lt;br /&gt;
A point-to-point (E)GRE tunnel can be created using the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# Run the &amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt; command on both hosts to learn their fully qualified domain names (FQDNs). E.g: &lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@citynode1:~# hostname&amp;amp;#10;citynode1.gretest.wall2-ilabt-iminds-be.lab.cityofthings.eu&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@vwallnode1:~# hostname&amp;amp;#10;vwallnode1.gretest.wall2-ilabt-iminds-be.wall2.ilabt.iminds.be&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: As shown in the examples above the FQDNs of the nodes depends not only on the hostname configured in JFed but also on the name of the experiment, project and the testbed the node belongs to. Therefore yuo will almost certainly need to use different FQDNs than the ones listed above&lt;br /&gt;
# Create the EGRE tunnel itself:&lt;br /&gt;
#* On &#039;&#039;&#039;citynode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_vwallnode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;vwallnode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; commands shown above are very similar to the ones used to set up an EGRE-tunnel between citylab nodes, but there are a few important differences:&lt;br /&gt;
* Rather than only specifying the hostname of the other endpoint, the full FQDN needs to be specified&lt;br /&gt;
* The &amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt; flag is added to manually set the MTU on the link. As explained before, this is needed to prevent MTU-mismatch issues. In this specific example an MTU of &amp;lt;code&amp;gt;1400&amp;lt;/code&amp;gt; bytes is specified since it provides enough headroom for multiple encapsulation headers and is &#039;good enough&#039; for an initial test. For optimal performance however, the MTU should be set to &amp;lt;code&amp;gt;min(uplink MTU of all nodes involved) - &amp;lt;GRE Overhead&amp;gt;(38 bytes)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt; flag is added to instruct the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; to create a &#039;GRE-over-IPv6&#039; rather than a &#039;GRE-over-IPv4&#039; tunnel. The reason for using IPv6 in this case is that the nodes of the virtual wall testbed don&#039;t have a public IPv4 address.&lt;br /&gt;
&lt;br /&gt;
Instead of specifying the FQDNs of the nodes, it would also have been possible to specify the public IP address of the node directly but this is more cumbersome and error prone (especially when using IPv6). Once the tunnel has been created it can be used just like any regular Ethernet interface except that, once again, the MTU is somewhat lower.&lt;br /&gt;
&lt;br /&gt;
As before, removing the tunnels is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-3-nodes.png|right|thumb|A multi-site link with three nodes. &#039;citynode1&#039; and &#039;citynode2&#039; are Citylab nodes. &#039;vwallnode1&#039; is a node on the Virtual Wall testbed.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As with [[#Creating_a_link_between_three_or_more_nodes|GRE links between citylab nodes]], setting up a GRE-link with more than two nodes is done by:&lt;br /&gt;
#Creating GRE tunnels from all nodes to a &#039;central&#039; node&lt;br /&gt;
#Bridging all of these tunnels together to create a single shared subnet.&lt;br /&gt;
&lt;br /&gt;
When such an &#039;overlay subnet&#039; spans multiple testbeds however, it is important to select the &#039;central node&#039; very carefully. Consider for example the topology shown on the right. In this case a link is created to which two nodes of the citylab testbed and a single node of the virtual wall are connected. If, in this case, &amp;lt;code&amp;gt;vwallnode1&amp;lt;/code&amp;gt; were to be selected as the &#039;central&#039; node, then all traffic between &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; would be sent over the virtual wall testbed unnecessarily. While in this case it would therefore be better to use &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; as a central node, for other test-setups the &#039;central node&#039; to use may not be so simple to determine.&lt;br /&gt;
&lt;br /&gt;
The 3-node setup shown in the example on the right, with &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; as a central node, can be created as follows:&lt;br /&gt;
 can be created as follows:&lt;br /&gt;
#Run the `hostname` command on all three nodes to learn their fully qualified domain names. E.g:&lt;br /&gt;
#* &amp;lt;code&amp;gt;citynode1.gretest.wall2-ilabt-iminds-be.lab.cityofthings.eu&amp;lt;/code&amp;gt;&lt;br /&gt;
#* &amp;lt;code&amp;gt;citynode2.gretest.wall2-ilabt-iminds-be.lab.cityofthings.eu&amp;lt;/code&amp;gt;&lt;br /&gt;
#* &amp;lt;code&amp;gt;vwallnode1.gretest.wall2-ilabt-iminds-be.wall2.ilabt.iminds.be&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up Link impairment on GRE Tunnels ==&lt;br /&gt;
&lt;br /&gt;
While it is not possible to configure link-impairment on GRE tunnels via the JFed interface, it is possible to do so manually once the test has started. This not only works for links created by JFed but also for links created manually.&lt;br /&gt;
&lt;br /&gt;
Adding impairment to a link is done by running the following command on each node connected to the GRE-tunnel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem loss random &amp;lt;loss_percentage&amp;gt;% rate &amp;lt;data_rate&amp;gt; delay &amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this command:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;link&amp;gt;&amp;lt;/code&amp;gt; is the name of the gre tunnel interface&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;loss_percentage&amp;gt;&amp;lt;/code&amp;gt; is the percent of packets to be randomly dropped&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;data_rate&amp;gt;&amp;lt;/code&amp;gt; is the data rate limit to impose on the link (e.g 10mbit, 20kbit, ...)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt; is the delay (in microseconds) to add to packets sent from the host. (So: to add a 5ms delay you need to specify 5000)&lt;br /&gt;
&lt;br /&gt;
As an example, the following command adds a 20% loss, a maximum data rate of 35mbit and a 7.5ms delay to link0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev link0 root netem loss random 20% rate 35mbit delay 7500&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The link impairment configured with the above command only affects packet that are &#039;&#039;sent&#039;&#039; from the host. Received packets are unaffected. Therefore it is imperative that you configure the same link impairment settings on both nodes connected to the GRE tunnel.&lt;br /&gt;
&lt;br /&gt;
Removing link impairment on a link is done by running the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the impairment settings on a link, you first need to remove the link impairment all together and then add it again with the new settings.&lt;br /&gt;
&lt;br /&gt;
More information on the &#039;netem&#039; traffic control queueing discipline can be found here: https://www.systutorials.com/docs/linux/man/8-tc-netem/&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=336</id>
		<title>GRE Tunnels</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=336"/>
		<updated>2021-08-11T10:33:52Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Creating a link between three or more nodes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At this point, the CityLab testbed only has limited support for &#039;&#039;automatically&#039;&#039; creating links between nodes using the JFed interface. Standard IP-in-IP GRE Tunnels and Ethernet-in-IP GRE Tunnels (&#039;&#039;gre-tunnel&#039;&#039; and &#039;&#039;egre-tunnel&#039;&#039; links in JFed) are supported. Adding support &#039;&#039;native&#039;&#039; Ethernet links (lan links in JFed) is on our TODO list. Since both &#039;gre&#039; and &#039;egre&#039; tunnels are point-to-point tunnels it is currently not (yet) possible to create a JFed-link with more than two connected nodes. As a workaround it &#039;&#039;is&#039;&#039; possible to bridge multiple &#039;egre&#039;-tunnels together into a single (tunneled) L2-network once the test has started.&lt;br /&gt;
&lt;br /&gt;
This page provides a quick How-To guide on how to create standard &#039;gre&#039; or &#039;egre-tunnels&#039; in JFed and then explains how to manually set up and bridge  egre-tunnels manually (after the test has started).&lt;br /&gt;
&lt;br /&gt;
== Creating Links between nodes through the JFed interface ==&lt;br /&gt;
&lt;br /&gt;
=== Setting up links ===&lt;br /&gt;
&lt;br /&gt;
Creating Links between nodes through the JFed interface is very straightforward and can be done as follows:&lt;br /&gt;
&lt;br /&gt;
* Start JFed, click on &#039;New&#039; and drag in two wireless nodes. For this tutorial we&#039;ll assume that these nodes are called &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;&lt;br /&gt;
* Edit the node properties so both nodes are sourced from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed. (By default Wilab2 is used).&amp;lt;p&amp;gt;[[File:Jfed_experiment_2_nodes.png|Drag in two nodes from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed and name them &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;|720px]]&amp;lt;/P&amp;gt;&lt;br /&gt;
* Drag a line from &#039;&#039;apu1&#039;&#039; to &#039;&#039;apu2&#039;&#039;. A &#039;&#039;link&#039;&#039; element connecting the two nodes is automatically created.&lt;br /&gt;
* If you are using JFed GUI 5.9 or above, link type of the link will already be set to &#039;gre&#039;. (This is shown between braces behind the name of the link). &amp;lt;p&amp;gt;[[File:Jfed_gre_link_2_nodes.png||300px]]&amp;lt;/p&amp;gt; If this is not the case, or you would like to create an &#039;egre&#039;-link instead, the link-type will need to be manually configured: &lt;br /&gt;
*# Right-click on the &#039;&#039;link&#039;&#039;-element, Click on &#039;&#039;Configure Link&#039;&#039; and select the &#039;&#039;Link Type&#039;&#039;-tab in the options window. &lt;br /&gt;
*# Change the link-type to &#039;gre-tunnel&#039; or &#039;egre-tunnel&#039; in the drop-down menu. If you select &#039;gre-tunnel&#039; an IP-in-IP tunnel will be created, if you select &#039;egre-tunnel&#039; an Ehternet-in-IP tunnel will be created. &amp;lt;p&amp;gt;[[File:JFed_link_options_type.png|Set the link-type to &#039;gre-tunnel&#039;|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
* JFed will automatically configure an IP-address on the tunnel interface for both nodes. optionally you can modify these IP-addresses in the &#039;&#039;General&#039;&#039; tab of the Link options-window &amp;lt;p&amp;gt;[[File:JFed_link_options_general.png|Changes the IP-addresses for the link if needed|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click &#039;Run&#039; to start your slice. When all nodes are green, your experiment has started and the GRE-tunnel between the two nodes has been configured. &amp;lt;p&amp;gt;[[File:JFed_gre_link_2_nodes_running.png|The running experiment|720px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*SSH into the &#039;&#039;apu1&#039;&#039; node. &lt;br /&gt;
*Run &amp;lt;code&amp;gt;ifconfig link02&amp;lt;/code&amp;gt; to verify that the GRE-tunnel has been created&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ifconfig link02&lt;br /&gt;
link02    Link encap:UNSPEC  HWaddr 8F-81-55-10-00-00-80-3F-00-00-00-00-00-00-00-00&lt;br /&gt;
          inet addr:192.168.0.1  P-t-P:192.168.0.1  Mask:255.255.255.0&lt;br /&gt;
          inet6 addr: fe80::200:5efe:8f81:5510/64 Scope:Link&lt;br /&gt;
          UP POINTOPOINT RUNNING NOARP  MTU:1434  Metric:1&lt;br /&gt;
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 txqueuelen:1&lt;br /&gt;
          RX bytes:112 (112.0 B)  TX bytes:168 (168.0 B)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Ping the &#039;&#039;apu2&#039;&#039;-tunnel enpoint by running &amp;lt;code&amp;gt;ping -c 4 &amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;&amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; is the IP-address configured for the tunnel endpoint on &#039;&#039;apu2&#039;&#039;. If you have not changed this, this is &amp;lt;code&amp;gt;192.168.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ping -c 4 192.168.0.2&lt;br /&gt;
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=2.21 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=1.60 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=1.46 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=4 ttl=64 time=1.51 ms&lt;br /&gt;
&lt;br /&gt;
--- 192.168.0.2 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3004ms&lt;br /&gt;
rtt min/avg/max/mdev = 1.464/1.699/2.218/0.303 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
==== No more than 2 nodes per link ====&lt;br /&gt;
&lt;br /&gt;
It is not possible to create (E)GRE-links with more than two nodes. The JFed GUI does allow additional nodes to be added to the link, but when the test is started the link will only exist on two nodes. This limitation is caused by the fact that the GRE-protocol only supports point-to-point tunnels. It is possible to [[#Manually setting up EGRE-tunnels|set up]] and [[#Creating a link between three or more nodes|bridge]] multiple egre-tunnels, but this cannot be done through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== EGRE-tunnels only work with &#039;CoT&#039; disk images ====&lt;br /&gt;
&lt;br /&gt;
To enable support for &#039;egre-tunnel&#039; links, a few tweaks had to be made to the &#039;client-side&#039; emulab-tools installed in the testbed disk images. Since these tweaks are not (yet) incorporated in the upstream emulab-code base, they are also not present in the many emulab-images used around the world. &lt;br /&gt;
&lt;br /&gt;
We have added these tweaks to the &#039;CoT&#039; disk-images of the CityLab testbed (see [[Disk Images]]), so if you want to use egre-links you must use a &#039;CoT&#039; disk image.&lt;br /&gt;
&lt;br /&gt;
==== (E)GRE-tunnels between nodes of different testbeds cannot be created via JFed ====&lt;br /&gt;
&lt;br /&gt;
Even at the best of times, creating links between nodes of different testbeds is an &#039;experimental feature&#039; at best. While it is perfectly possible to set up GRE and EGRE tunnels between nodes of different testbeds, it is currently not possible to do so through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== Link impairment on GRE Tunnels cannot be configured through the JFed GUI ====&lt;br /&gt;
&lt;br /&gt;
The way JFed normally adds impairment to a link is by adding a so-called &#039;impairment node&#039; in between the nodes of a link to change the properties of the traffic flowing over the link. This mechanism however only works with ethernet interfaces and not with GRE Tunnels. That being said: it is possible to add link impairment to GRE tunnels manually. How to do so is [[#Setting_up_Link_impairment_on_GRE_Tunnels|explained below]].&lt;br /&gt;
&lt;br /&gt;
== Manually setting up EGRE-tunnels ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; although it is possible to manually set up GRE-tunnels it is much easier to do so through the JFed-interface. The only reason for creating them manually is to create a &#039;link&#039; between more than two nodes or to create links with nodes of another testbed (both of which are currently not supported through JFed)&lt;br /&gt;
&lt;br /&gt;
A number of [[:File:Gre-utils.tar.gz | scripts]] are provided to make it as easy as possible to create and manage EGRE-tunnels.&lt;br /&gt;
Before any EGRE-tunnels can be created, these scripts first need to be installed on every node.&lt;br /&gt;
This can be done by running the following one-liner:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will&lt;br /&gt;
* Download the [[:File:Gre-utils.tar.gz | Gre-utils.tar.gz]] archive&lt;br /&gt;
* Install the scripts in &amp;lt;code&amp;gt;/usr/local&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
&lt;br /&gt;
[[File:Jfed-link-2-nodes.png|thumb|right|A simple link between two nodes.]]&lt;br /&gt;
&lt;br /&gt;
A simple GRE tunnel can be created by running the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.1/24 link0 apu2&amp;lt;/code&amp;gt;&lt;br /&gt;
* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above commands &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and &amp;lt;code&amp;gt;apuX&amp;lt;/code&amp;gt; is the host to create a tunnel to. The optional &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can be used to automatically configure an IPv4-address on the newly created interface.&lt;br /&gt;
&lt;br /&gt;
To allow the node names configured in JFed to be used to configure GRE tunnels, the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script tries to behave somewhat intelligently when resolving hostnames:&lt;br /&gt;
* If the specified host is a Fully Qualified Domain Name (i.e: it contains a &#039;.&#039;), a regular DNS query is performed&lt;br /&gt;
* If the specified host is a simple hostname (no &#039;.&#039; in the hostname), the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script &#039;&#039;first&#039;&#039; tries to resolve the specified host to a node name specified in JFed. If this fails, the IP-address of the host is resolved using a normal DNS query. &lt;br /&gt;
* If the specified host is a valid IPv4 address, no DNS-resolution is performed.&lt;br /&gt;
&lt;br /&gt;
Once the GRE tunnel is created, it can be used just like any other Ethernet interface, except that the MTU is a bit lower than normal.&lt;br /&gt;
&lt;br /&gt;
Removing the tunnel is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script. &lt;br /&gt;
To remove the tunnels created above for example, the following command would have to be run on each node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-link-3-nodes.png|thumb|right|A slightly more complicated link between more than two nodes.]]&lt;br /&gt;
&lt;br /&gt;
Creating a link between more than two nodes is (slightly) more complicated since GRE only allows Point-to-Point tunnels to be created. To work around this, GRE Tunnels are created from one &#039;central&#039; node to all other nodes on the link. These GRE Tunnels are then &#039;bridged&#039; together on the central node to form a shared subnet. Such a &#039;GRE Bridge&#039; can easily be created using the &amp;lt;code&amp;gt;gre_add_bridge&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
The 3-node setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_bridge -c 192.168.0.1/24 link0 apu2 apu3&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;As for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script, &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and the &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can optionally be used to configure an IPv4 address on the interface. The remaining parameters, in this case &amp;lt;code&amp;gt;apu2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apu3&amp;lt;/code&amp;gt; are the hosts to connect to. The resolution of these hostnames to IP-addresses is done in exactly the same way as for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script.&lt;br /&gt;
#&lt;br /&gt;
#* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;apu3&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.3/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case &#039;&#039;apu1&#039;&#039; is used as the central node and &#039;&#039;apu2&#039;&#039; and &#039;&#039;apu3&#039;&#039; connect to it in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario.&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been created it can be used just like any other linux bridge. Additional interfaces can be added/removed using the &amp;lt;code&amp;gt;brctl&amp;lt;/code&amp;gt; command. The bridge&#039;s stastus can be queried using the &amp;lt;code&amp;gt;brctl show&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  user@apu1:~$ brctl show link0&lt;br /&gt;
  bridge name	bridge id		STP enabled	interfaces&lt;br /&gt;
  link0		8000.a2b74a105a76	no		link0_gre_0&lt;br /&gt;
  							link0_gre_1&lt;br /&gt;
In the above output, the &amp;lt;code&amp;gt;link0_gre_x&amp;lt;/code&amp;gt; interfaces are the GRE tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
Removing the &#039;GRE Bridge&#039; is done using the &amp;lt;code&amp;gt;gre_del_bridge_script&amp;lt;/code&amp;gt;. It is highly recommended to use this script to remove the bridge (rather than the &#039;&#039;brctl&#039;&#039; command) as this script not only removes the bridge itself, but also cleans up the GRE-tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
To remove the bridge created in the above example the following command would have to be run &lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039;: &amp;lt;code&amp;gt;sudo gre_del_bridge link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been removed, the GRE-Tunnels on the other nodes also need to be cleaned up. This is done in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
==== Single tunnel between two nodes ====&lt;br /&gt;
&lt;br /&gt;
GRE Tunnels are identified &#039;&#039;solely&#039;&#039; on the source and destination IP-address of the encapsulating packet. That means that it is &#039;&#039;not&#039;&#039; possible to establish two independent tunnels between the same two nodes at the same time.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between two nodes| two node]] scenario, this means that only a &#039;&#039;single&#039;&#039; link can be created between two nodes.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between three or more nodes| mutliple nodes]] scenario, a node can participate in multiple links as long as:&lt;br /&gt;
* each link uses a different &#039;central node&#039;&lt;br /&gt;
* each &#039;central node&#039; is only part of &#039;&#039;one&#039;&#039; link at the same time&lt;br /&gt;
&lt;br /&gt;
It should be noted however, that GRE Tunnels can be used in combination with VLAN-tagging, so if you &#039;&#039;really&#039;&#039; need to create multiple links between two nodes, you can do so by defining multiple VLANs on the GRE tunnel interface. This however is not something that can be done using the scripts provided here.&lt;br /&gt;
&lt;br /&gt;
==== Reduced MTU ====&lt;br /&gt;
&lt;br /&gt;
Using a GRE Tunnel incurs an overhead of 38 bytes. This is because the original Ethernet packet needs to be prefixed with an additional IP- and Ethernet-header in order to send it to the other tunnel endpoint. To prevent fragmentation, the linux kernel automatically reduces the MTU of the GRE-interface. As a result, the MTU &#039;&#039;inside&#039;&#039; the tunnel is 38 bytes lower than the MTU &#039;&#039;outside&#039;&#039; the tunnel.&lt;br /&gt;
&lt;br /&gt;
Except for a small decrease in performance this usually is not that big of a problem, with one notable exception. When, for instance, a WiFi AP-interface is bridged to a GRE Tunnel, the MTU is set to the smallest MTU of the &#039;slave&#039; interfaces (in this case the GRE-tunnel). This lower MTU however is &#039;&#039;&#039;not&#039;&#039;&#039; automagically communicated to the connected WiFi clients and as a result these clients may still send packets that are larger than the MTU of the bridge. Since these packets are subsequently dropped by the linux bridge, this can lead to all sorts of nasty problems. The most common of which are dropped UDP packets and TCP sessions seem to work fine and then suddenly hang when more than a few bytes at a time are sent over them.&lt;br /&gt;
&lt;br /&gt;
To resolve this issue the MTU of the other WiFi clients should be reduced to the MTU of the linux bridge. When static IP-addresses are used, this can easily be done using the &amp;lt;code&amp;gt;ip link&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  ip link set mtu &amp;lt;mtu&amp;gt; dev &amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If DHCP is used, the lower MTU should be advertised by the DHCP server.&lt;br /&gt;
&lt;br /&gt;
== Setting up (E)GRE-Tunnels Citylab and the Virtual Wall ==&lt;br /&gt;
&lt;br /&gt;
At this point it is not possible to set up &#039;multi-site&#039; (e)GRE tunnels through the JFed interface, but it is possible to do so manually after the test has started. The process of doing so is very similar to manually creating EGRE-Tunnels within the citylab testbed itself, but the following caveats need to be taken into account:&lt;br /&gt;
&lt;br /&gt;
* Setting up GRE Tunnels between nodes of different testbeds requires both endpoints to have a &#039;&#039;routable&#039;&#039; (i.e. public) IPv4 or IPv6 address and for GRE-traffic to be allowed by the firewall/router through which the nodes are connected to the internet. While all nodes of the citylab testbed meet the above requirement, this may not necessarily be the case for nodes of other testbeds.&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;MTU&#039;&#039; of the created link needs to be set manually. Otherwise you will most likely encounter MTU-mismatch issues given that, by default, the MTU of the created tunnel is calculated from the MTU of the uplink interface, and that not all testbeds use the same MTU on their uplink interface.&lt;br /&gt;
&lt;br /&gt;
* GRE tunnels are &#039;&#039;&#039;not encrypted&#039;&#039;&#039;. Any data you send over them is sent plain-text over the internet so make sure not to send any sensitive data over them without adding encryption in some other way. If you need a tunnel which encrypts the traffic as well, OpenVPN is most likely a better solution.&lt;br /&gt;
&lt;br /&gt;
The remainder of this section explains how to set up &#039;multi-site&#039; (e)gre tunnels. We specifically focus on setting up GRE tunnels between Citylab and the [https://doc.ilabt.imec.be/ilabt/virtualwall/|Virtual Wall], but setting up GRE tunnels to other testbeds should be very similar.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
* Make sure that all nodes involved are running &#039;&#039;at least&#039;&#039; Ubuntu 16.04 (EGRE tunnels are not supported in Ubuntu 14.04 and before). For citylab nodes this is the case by default, but for the nodes on the virtual wall you will have to explicitly specify a different disk image when you set up the experiment as that testbed uses &#039;Ubuntu 14.04&#039; by default.&lt;br /&gt;
&lt;br /&gt;
* Setting up multi-site (e)gre tunnels is done with the same &#039;helper scripts&#039; as [[#Manually_setting_up_EGRE-tunnels|used before]]. Before setting up the tunnels themselves, these scripts need to be installed on every node. This can be done using the following one-liner: &lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-2-nodes.png|thumb|right|A &#039;simple&#039; multi-site link with two nodes. &#039;citynode1&#039; is a node of the Citylab testbed. &#039;vwallnode1&#039; is a node of the Virtual Wall testbed.]]&lt;br /&gt;
A point-to-point (E)GRE tunnel can be created using the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# Run the &amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt; command on both hosts to learn their fully qualified domain names (FQDNs). E.g: &lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@citynode1:~# hostname&amp;amp;#10;citynode1.gretest.wall2-ilabt-iminds-be.lab.cityofthings.eu&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@vwallnode1:~# hostname&amp;amp;#10;vwallnode1.gretest.wall2-ilabt-iminds-be.wall2.ilabt.iminds.be&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: As shown in the examples above the FQDNs of the nodes depends not only on the hostname configured in JFed but also on the name of the experiment, project and the testbed the node belongs to. Therefore yuo will almost certainly need to use different FQDNs than the ones listed above&lt;br /&gt;
# Create the EGRE tunnel itself:&lt;br /&gt;
#* On &#039;&#039;&#039;citynode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_vwallnode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;vwallnode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; commands shown above are very similar to the ones used to set up an EGRE-tunnel between citylab nodes, but there are a few important differences:&lt;br /&gt;
* Rather than only specifying the hostname of the other endpoint, the full FQDN needs to be specified&lt;br /&gt;
* The &amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt; flag is added to manually set the MTU on the link. As explained before, this is needed to prevent MTU-mismatch issues. In this specific example an MTU of &amp;lt;code&amp;gt;1400&amp;lt;/code&amp;gt; bytes is specified since it provides enough headroom for multiple encapsulation headers and is &#039;good enough&#039; for an initial test. For optimal performance however, the MTU should be set to &amp;lt;code&amp;gt;min(uplink MTU of all nodes involved) - &amp;lt;GRE Overhead&amp;gt;(38 bytes)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt; flag is added to instruct the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; to create a &#039;GRE-over-IPv6&#039; rather than a &#039;GRE-over-IPv4&#039; tunnel. The reason for using IPv6 in this case is that the nodes of the virtual wall testbed don&#039;t have a public IPv4 address.&lt;br /&gt;
&lt;br /&gt;
Instead of specifying the FQDNs of the nodes, it would also have been possible to specify the public IP address of the node directly but this is more cumbersome and error prone (especially when using IPv6). Once the tunnel has been created it can be used just like any regular Ethernet interface except that, once again, the MTU is somewhat lower.&lt;br /&gt;
&lt;br /&gt;
As before, removing the tunnels is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-3-nodes.png|right|thumb|A multi-site link with three nodes. &#039;citynode1&#039; and &#039;citynode2&#039; are Citylab nodes. &#039;vwallnode1&#039; is a node on the Virtual Wall testbed.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As with [[#Creating_a_link_between_three_or_more_nodes|GRE links between citylab nodes]], setting up a GRE-link with more than two nodes is done by:&lt;br /&gt;
#Creating GRE tunnels from all nodes to a &#039;central&#039; node&lt;br /&gt;
#Bridging all of these tunnels together to create a single shared subnet.&lt;br /&gt;
&lt;br /&gt;
When such an &#039;overlay subnet&#039; spans multiple testbeds however, it is important to select the &#039;central node&#039; very carefully. Consider for example the topology shown on the right. In this case a link is created to which two nodes of the citylab testbed and a single node of the virtual wall are connected. If, in this case, &amp;lt;code&amp;gt;vwallnode1&amp;lt;/code&amp;gt; were to be selected as the &#039;central&#039; node, then all traffic between &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; would be sent over the virtual wall testbed unnecessarily. If on the other hand &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; is used as a &#039;central&#039; node, then this problem is avoided.&lt;br /&gt;
&lt;br /&gt;
== Setting up Link impairment on GRE Tunnels ==&lt;br /&gt;
&lt;br /&gt;
While it is not possible to configure link-impairment on GRE tunnels via the JFed interface, it is possible to do so manually once the test has started. This not only works for links created by JFed but also for links created manually.&lt;br /&gt;
&lt;br /&gt;
Adding impairment to a link is done by running the following command on each node connected to the GRE-tunnel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem loss random &amp;lt;loss_percentage&amp;gt;% rate &amp;lt;data_rate&amp;gt; delay &amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this command:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;link&amp;gt;&amp;lt;/code&amp;gt; is the name of the gre tunnel interface&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;loss_percentage&amp;gt;&amp;lt;/code&amp;gt; is the percent of packets to be randomly dropped&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;data_rate&amp;gt;&amp;lt;/code&amp;gt; is the data rate limit to impose on the link (e.g 10mbit, 20kbit, ...)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt; is the delay (in microseconds) to add to packets sent from the host. (So: to add a 5ms delay you need to specify 5000)&lt;br /&gt;
&lt;br /&gt;
As an example, the following command adds a 20% loss, a maximum data rate of 35mbit and a 7.5ms delay to link0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev link0 root netem loss random 20% rate 35mbit delay 7500&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The link impairment configured with the above command only affects packet that are &#039;&#039;sent&#039;&#039; from the host. Received packets are unaffected. Therefore it is imperative that you configure the same link impairment settings on both nodes connected to the GRE tunnel.&lt;br /&gt;
&lt;br /&gt;
Removing link impairment on a link is done by running the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the impairment settings on a link, you first need to remove the link impairment all together and then add it again with the new settings.&lt;br /&gt;
&lt;br /&gt;
More information on the &#039;netem&#039; traffic control queueing discipline can be found here: https://www.systutorials.com/docs/linux/man/8-tc-netem/&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=335</id>
		<title>GRE Tunnels</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=335"/>
		<updated>2021-08-11T10:28:19Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Creating a link between two nodes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At this point, the CityLab testbed only has limited support for &#039;&#039;automatically&#039;&#039; creating links between nodes using the JFed interface. Standard IP-in-IP GRE Tunnels and Ethernet-in-IP GRE Tunnels (&#039;&#039;gre-tunnel&#039;&#039; and &#039;&#039;egre-tunnel&#039;&#039; links in JFed) are supported. Adding support &#039;&#039;native&#039;&#039; Ethernet links (lan links in JFed) is on our TODO list. Since both &#039;gre&#039; and &#039;egre&#039; tunnels are point-to-point tunnels it is currently not (yet) possible to create a JFed-link with more than two connected nodes. As a workaround it &#039;&#039;is&#039;&#039; possible to bridge multiple &#039;egre&#039;-tunnels together into a single (tunneled) L2-network once the test has started.&lt;br /&gt;
&lt;br /&gt;
This page provides a quick How-To guide on how to create standard &#039;gre&#039; or &#039;egre-tunnels&#039; in JFed and then explains how to manually set up and bridge  egre-tunnels manually (after the test has started).&lt;br /&gt;
&lt;br /&gt;
== Creating Links between nodes through the JFed interface ==&lt;br /&gt;
&lt;br /&gt;
=== Setting up links ===&lt;br /&gt;
&lt;br /&gt;
Creating Links between nodes through the JFed interface is very straightforward and can be done as follows:&lt;br /&gt;
&lt;br /&gt;
* Start JFed, click on &#039;New&#039; and drag in two wireless nodes. For this tutorial we&#039;ll assume that these nodes are called &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;&lt;br /&gt;
* Edit the node properties so both nodes are sourced from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed. (By default Wilab2 is used).&amp;lt;p&amp;gt;[[File:Jfed_experiment_2_nodes.png|Drag in two nodes from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed and name them &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;|720px]]&amp;lt;/P&amp;gt;&lt;br /&gt;
* Drag a line from &#039;&#039;apu1&#039;&#039; to &#039;&#039;apu2&#039;&#039;. A &#039;&#039;link&#039;&#039; element connecting the two nodes is automatically created.&lt;br /&gt;
* If you are using JFed GUI 5.9 or above, link type of the link will already be set to &#039;gre&#039;. (This is shown between braces behind the name of the link). &amp;lt;p&amp;gt;[[File:Jfed_gre_link_2_nodes.png||300px]]&amp;lt;/p&amp;gt; If this is not the case, or you would like to create an &#039;egre&#039;-link instead, the link-type will need to be manually configured: &lt;br /&gt;
*# Right-click on the &#039;&#039;link&#039;&#039;-element, Click on &#039;&#039;Configure Link&#039;&#039; and select the &#039;&#039;Link Type&#039;&#039;-tab in the options window. &lt;br /&gt;
*# Change the link-type to &#039;gre-tunnel&#039; or &#039;egre-tunnel&#039; in the drop-down menu. If you select &#039;gre-tunnel&#039; an IP-in-IP tunnel will be created, if you select &#039;egre-tunnel&#039; an Ehternet-in-IP tunnel will be created. &amp;lt;p&amp;gt;[[File:JFed_link_options_type.png|Set the link-type to &#039;gre-tunnel&#039;|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
* JFed will automatically configure an IP-address on the tunnel interface for both nodes. optionally you can modify these IP-addresses in the &#039;&#039;General&#039;&#039; tab of the Link options-window &amp;lt;p&amp;gt;[[File:JFed_link_options_general.png|Changes the IP-addresses for the link if needed|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click &#039;Run&#039; to start your slice. When all nodes are green, your experiment has started and the GRE-tunnel between the two nodes has been configured. &amp;lt;p&amp;gt;[[File:JFed_gre_link_2_nodes_running.png|The running experiment|720px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*SSH into the &#039;&#039;apu1&#039;&#039; node. &lt;br /&gt;
*Run &amp;lt;code&amp;gt;ifconfig link02&amp;lt;/code&amp;gt; to verify that the GRE-tunnel has been created&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ifconfig link02&lt;br /&gt;
link02    Link encap:UNSPEC  HWaddr 8F-81-55-10-00-00-80-3F-00-00-00-00-00-00-00-00&lt;br /&gt;
          inet addr:192.168.0.1  P-t-P:192.168.0.1  Mask:255.255.255.0&lt;br /&gt;
          inet6 addr: fe80::200:5efe:8f81:5510/64 Scope:Link&lt;br /&gt;
          UP POINTOPOINT RUNNING NOARP  MTU:1434  Metric:1&lt;br /&gt;
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 txqueuelen:1&lt;br /&gt;
          RX bytes:112 (112.0 B)  TX bytes:168 (168.0 B)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Ping the &#039;&#039;apu2&#039;&#039;-tunnel enpoint by running &amp;lt;code&amp;gt;ping -c 4 &amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;&amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; is the IP-address configured for the tunnel endpoint on &#039;&#039;apu2&#039;&#039;. If you have not changed this, this is &amp;lt;code&amp;gt;192.168.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ping -c 4 192.168.0.2&lt;br /&gt;
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=2.21 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=1.60 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=1.46 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=4 ttl=64 time=1.51 ms&lt;br /&gt;
&lt;br /&gt;
--- 192.168.0.2 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3004ms&lt;br /&gt;
rtt min/avg/max/mdev = 1.464/1.699/2.218/0.303 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
==== No more than 2 nodes per link ====&lt;br /&gt;
&lt;br /&gt;
It is not possible to create (E)GRE-links with more than two nodes. The JFed GUI does allow additional nodes to be added to the link, but when the test is started the link will only exist on two nodes. This limitation is caused by the fact that the GRE-protocol only supports point-to-point tunnels. It is possible to [[#Manually setting up EGRE-tunnels|set up]] and [[#Creating a link between three or more nodes|bridge]] multiple egre-tunnels, but this cannot be done through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== EGRE-tunnels only work with &#039;CoT&#039; disk images ====&lt;br /&gt;
&lt;br /&gt;
To enable support for &#039;egre-tunnel&#039; links, a few tweaks had to be made to the &#039;client-side&#039; emulab-tools installed in the testbed disk images. Since these tweaks are not (yet) incorporated in the upstream emulab-code base, they are also not present in the many emulab-images used around the world. &lt;br /&gt;
&lt;br /&gt;
We have added these tweaks to the &#039;CoT&#039; disk-images of the CityLab testbed (see [[Disk Images]]), so if you want to use egre-links you must use a &#039;CoT&#039; disk image.&lt;br /&gt;
&lt;br /&gt;
==== (E)GRE-tunnels between nodes of different testbeds cannot be created via JFed ====&lt;br /&gt;
&lt;br /&gt;
Even at the best of times, creating links between nodes of different testbeds is an &#039;experimental feature&#039; at best. While it is perfectly possible to set up GRE and EGRE tunnels between nodes of different testbeds, it is currently not possible to do so through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== Link impairment on GRE Tunnels cannot be configured through the JFed GUI ====&lt;br /&gt;
&lt;br /&gt;
The way JFed normally adds impairment to a link is by adding a so-called &#039;impairment node&#039; in between the nodes of a link to change the properties of the traffic flowing over the link. This mechanism however only works with ethernet interfaces and not with GRE Tunnels. That being said: it is possible to add link impairment to GRE tunnels manually. How to do so is [[#Setting_up_Link_impairment_on_GRE_Tunnels|explained below]].&lt;br /&gt;
&lt;br /&gt;
== Manually setting up EGRE-tunnels ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; although it is possible to manually set up GRE-tunnels it is much easier to do so through the JFed-interface. The only reason for creating them manually is to create a &#039;link&#039; between more than two nodes or to create links with nodes of another testbed (both of which are currently not supported through JFed)&lt;br /&gt;
&lt;br /&gt;
A number of [[:File:Gre-utils.tar.gz | scripts]] are provided to make it as easy as possible to create and manage EGRE-tunnels.&lt;br /&gt;
Before any EGRE-tunnels can be created, these scripts first need to be installed on every node.&lt;br /&gt;
This can be done by running the following one-liner:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will&lt;br /&gt;
* Download the [[:File:Gre-utils.tar.gz | Gre-utils.tar.gz]] archive&lt;br /&gt;
* Install the scripts in &amp;lt;code&amp;gt;/usr/local&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
&lt;br /&gt;
[[File:Jfed-link-2-nodes.png|thumb|right|A simple link between two nodes.]]&lt;br /&gt;
&lt;br /&gt;
A simple GRE tunnel can be created by running the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.1/24 link0 apu2&amp;lt;/code&amp;gt;&lt;br /&gt;
* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above commands &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and &amp;lt;code&amp;gt;apuX&amp;lt;/code&amp;gt; is the host to create a tunnel to. The optional &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can be used to automatically configure an IPv4-address on the newly created interface.&lt;br /&gt;
&lt;br /&gt;
To allow the node names configured in JFed to be used to configure GRE tunnels, the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script tries to behave somewhat intelligently when resolving hostnames:&lt;br /&gt;
* If the specified host is a Fully Qualified Domain Name (i.e: it contains a &#039;.&#039;), a regular DNS query is performed&lt;br /&gt;
* If the specified host is a simple hostname (no &#039;.&#039; in the hostname), the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script &#039;&#039;first&#039;&#039; tries to resolve the specified host to a node name specified in JFed. If this fails, the IP-address of the host is resolved using a normal DNS query. &lt;br /&gt;
* If the specified host is a valid IPv4 address, no DNS-resolution is performed.&lt;br /&gt;
&lt;br /&gt;
Once the GRE tunnel is created, it can be used just like any other Ethernet interface, except that the MTU is a bit lower than normal.&lt;br /&gt;
&lt;br /&gt;
Removing the tunnel is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script. &lt;br /&gt;
To remove the tunnels created above for example, the following command would have to be run on each node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-link-3-nodes.png|thumb|right|A slightly more complicated link between more than two nodes.]]&lt;br /&gt;
&lt;br /&gt;
Creating a link between more than two nodes is (slightly) more complicated since GRE only allows Point-to-Point tunnels to be created. To work around this, GRE Tunnels are created from one &#039;central&#039; node to all other nodes on the link. These GRE Tunnels are then &#039;bridged&#039; together on the central node to form a shared subnet. Such a &#039;GRE Bridge&#039; can easily be created using the &amp;lt;code&amp;gt;gre_add_bridge&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
The 3-node setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_bridge -c 192.168.0.1/24 link0 apu2 apu3&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;As for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script, &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and the &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can optionally be used to configure an IPv4 address on the interface. The remaining parameters, in this case &amp;lt;code&amp;gt;apu2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apu3&amp;lt;/code&amp;gt; are the hosts to connect to. The resolution of these hostnames to IP-addresses is done in exactly the same way as for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
#* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;apu3&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.3/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case &#039;&#039;apu1&#039;&#039; is used as the central node and &#039;&#039;apu2&#039;&#039; and &#039;&#039;apu3&#039;&#039; connect to it in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario.&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been created it can be used just like any other linux bridge. Additional interfaces can be added/removed using the &amp;lt;code&amp;gt;brctl&amp;lt;/code&amp;gt; command. The bridge&#039;s stastus can be queried using the &amp;lt;code&amp;gt;brctl show&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  user@apu1:~$ brctl show link0&lt;br /&gt;
  bridge name	bridge id		STP enabled	interfaces&lt;br /&gt;
  link0		8000.a2b74a105a76	no		link0_gre_0&lt;br /&gt;
  							link0_gre_1&lt;br /&gt;
In the above output, the &amp;lt;code&amp;gt;link0_gre_x&amp;lt;/code&amp;gt; interfaces are the GRE tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
Removing the &#039;GRE Bridge&#039; is done using the &amp;lt;code&amp;gt;gre_del_bridge_script&amp;lt;/code&amp;gt;. It is highly recommended to use this script to remove the bridge (rather than the &#039;&#039;brctl&#039;&#039; command) as this script not only removes the bridge itself, but also cleans up the GRE-tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
To remove the bridge created in the above example the following command would have to be run &lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039;: &amp;lt;code&amp;gt;sudo gre_del_bridge link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been removed, the GRE-Tunnels on the other nodes also need to be cleaned up. This is done in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
==== Single tunnel between two nodes ====&lt;br /&gt;
&lt;br /&gt;
GRE Tunnels are identified &#039;&#039;solely&#039;&#039; on the source and destination IP-address of the encapsulating packet. That means that it is &#039;&#039;not&#039;&#039; possible to establish two independent tunnels between the same two nodes at the same time.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between two nodes| two node]] scenario, this means that only a &#039;&#039;single&#039;&#039; link can be created between two nodes.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between three or more nodes| mutliple nodes]] scenario, a node can participate in multiple links as long as:&lt;br /&gt;
* each link uses a different &#039;central node&#039;&lt;br /&gt;
* each &#039;central node&#039; is only part of &#039;&#039;one&#039;&#039; link at the same time&lt;br /&gt;
&lt;br /&gt;
It should be noted however, that GRE Tunnels can be used in combination with VLAN-tagging, so if you &#039;&#039;really&#039;&#039; need to create multiple links between two nodes, you can do so by defining multiple VLANs on the GRE tunnel interface. This however is not something that can be done using the scripts provided here.&lt;br /&gt;
&lt;br /&gt;
==== Reduced MTU ====&lt;br /&gt;
&lt;br /&gt;
Using a GRE Tunnel incurs an overhead of 38 bytes. This is because the original Ethernet packet needs to be prefixed with an additional IP- and Ethernet-header in order to send it to the other tunnel endpoint. To prevent fragmentation, the linux kernel automatically reduces the MTU of the GRE-interface. As a result, the MTU &#039;&#039;inside&#039;&#039; the tunnel is 38 bytes lower than the MTU &#039;&#039;outside&#039;&#039; the tunnel.&lt;br /&gt;
&lt;br /&gt;
Except for a small decrease in performance this usually is not that big of a problem, with one notable exception. When, for instance, a WiFi AP-interface is bridged to a GRE Tunnel, the MTU is set to the smallest MTU of the &#039;slave&#039; interfaces (in this case the GRE-tunnel). This lower MTU however is &#039;&#039;&#039;not&#039;&#039;&#039; automagically communicated to the connected WiFi clients and as a result these clients may still send packets that are larger than the MTU of the bridge. Since these packets are subsequently dropped by the linux bridge, this can lead to all sorts of nasty problems. The most common of which are dropped UDP packets and TCP sessions seem to work fine and then suddenly hang when more than a few bytes at a time are sent over them.&lt;br /&gt;
&lt;br /&gt;
To resolve this issue the MTU of the other WiFi clients should be reduced to the MTU of the linux bridge. When static IP-addresses are used, this can easily be done using the &amp;lt;code&amp;gt;ip link&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  ip link set mtu &amp;lt;mtu&amp;gt; dev &amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If DHCP is used, the lower MTU should be advertised by the DHCP server.&lt;br /&gt;
&lt;br /&gt;
== Setting up (E)GRE-Tunnels Citylab and the Virtual Wall ==&lt;br /&gt;
&lt;br /&gt;
At this point it is not possible to set up &#039;multi-site&#039; (e)GRE tunnels through the JFed interface, but it is possible to do so manually after the test has started. The process of doing so is very similar to manually creating EGRE-Tunnels within the citylab testbed itself, but the following caveats need to be taken into account:&lt;br /&gt;
&lt;br /&gt;
* Setting up GRE Tunnels between nodes of different testbeds requires both endpoints to have a &#039;&#039;routable&#039;&#039; (i.e. public) IPv4 or IPv6 address and for GRE-traffic to be allowed by the firewall/router through which the nodes are connected to the internet. While all nodes of the citylab testbed meet the above requirement, this may not necessarily be the case for nodes of other testbeds.&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;MTU&#039;&#039; of the created link needs to be set manually. Otherwise you will most likely encounter MTU-mismatch issues given that, by default, the MTU of the created tunnel is calculated from the MTU of the uplink interface, and that not all testbeds use the same MTU on their uplink interface.&lt;br /&gt;
&lt;br /&gt;
* GRE tunnels are &#039;&#039;&#039;not encrypted&#039;&#039;&#039;. Any data you send over them is sent plain-text over the internet so make sure not to send any sensitive data over them without adding encryption in some other way. If you need a tunnel which encrypts the traffic as well, OpenVPN is most likely a better solution.&lt;br /&gt;
&lt;br /&gt;
The remainder of this section explains how to set up &#039;multi-site&#039; (e)gre tunnels. We specifically focus on setting up GRE tunnels between Citylab and the [https://doc.ilabt.imec.be/ilabt/virtualwall/|Virtual Wall], but setting up GRE tunnels to other testbeds should be very similar.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
* Make sure that all nodes involved are running &#039;&#039;at least&#039;&#039; Ubuntu 16.04 (EGRE tunnels are not supported in Ubuntu 14.04 and before). For citylab nodes this is the case by default, but for the nodes on the virtual wall you will have to explicitly specify a different disk image when you set up the experiment as that testbed uses &#039;Ubuntu 14.04&#039; by default.&lt;br /&gt;
&lt;br /&gt;
* Setting up multi-site (e)gre tunnels is done with the same &#039;helper scripts&#039; as [[#Manually_setting_up_EGRE-tunnels|used before]]. Before setting up the tunnels themselves, these scripts need to be installed on every node. This can be done using the following one-liner: &lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-2-nodes.png|thumb|right|A &#039;simple&#039; multi-site link with two nodes. &#039;citynode1&#039; is a node of the Citylab testbed. &#039;vwallnode1&#039; is a node of the Virtual Wall testbed.]]&lt;br /&gt;
A point-to-point (E)GRE tunnel can be created using the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# Run the &amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt; command on both hosts to learn their fully qualified domain names (FQDNs). E.g: &lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@citynode1:~# hostname&amp;amp;#10;citynode1.gretest.wall2-ilabt-iminds-be.lab.cityofthings.eu&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@vwallnode1:~# hostname&amp;amp;#10;vwallnode1.gretest.wall2-ilabt-iminds-be.wall2.ilabt.iminds.be&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: As shown in the examples above the FQDNs of the nodes depends not only on the hostname configured in JFed but also on the name of the experiment, project and the testbed the node belongs to. Therefore yuo will almost certainly need to use different FQDNs than the ones listed above&lt;br /&gt;
# Create the EGRE tunnel itself:&lt;br /&gt;
#* On &#039;&#039;&#039;citynode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_vwallnode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;vwallnode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; commands shown above are very similar to the ones used to set up an EGRE-tunnel between citylab nodes, but there are a few important differences:&lt;br /&gt;
* Rather than only specifying the hostname of the other endpoint, the full FQDN needs to be specified&lt;br /&gt;
* The &amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt; flag is added to manually set the MTU on the link. As explained before, this is needed to prevent MTU-mismatch issues. In this specific example an MTU of &amp;lt;code&amp;gt;1400&amp;lt;/code&amp;gt; bytes is specified since it provides enough headroom for multiple encapsulation headers and is &#039;good enough&#039; for an initial test. For optimal performance however, the MTU should be set to &amp;lt;code&amp;gt;min(uplink MTU of all nodes involved) - &amp;lt;GRE Overhead&amp;gt;(38 bytes)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt; flag is added to instruct the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; to create a &#039;GRE-over-IPv6&#039; rather than a &#039;GRE-over-IPv4&#039; tunnel. The reason for using IPv6 in this case is that the nodes of the virtual wall testbed don&#039;t have a public IPv4 address.&lt;br /&gt;
&lt;br /&gt;
Instead of specifying the FQDNs of the nodes, it would also have been possible to specify the public IP address of the node directly but this is more cumbersome and error prone (especially when using IPv6). Once the tunnel has been created it can be used just like any regular Ethernet interface except that, once again, the MTU is somewhat lower.&lt;br /&gt;
&lt;br /&gt;
As before, removing the tunnels is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-3-nodes.png|right|thumb|A multi-site link with three nodes. &#039;citynode1&#039; and &#039;citynode2&#039; are Citylab nodes. &#039;vwallnode1&#039; is a node on the Virtual Wall testbed.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As with [[#Creating_a_link_between_three_or_more_nodes|GRE links between citylab nodes]], setting up a GRE-link with more than two nodes is done by:&lt;br /&gt;
#Creating GRE tunnels from all nodes to a &#039;central&#039; node&lt;br /&gt;
#Bridging all of these tunnels together to create a single shared subnet.&lt;br /&gt;
&lt;br /&gt;
When such an &#039;overlay subnet&#039; spans multiple testbeds however, it is important to select the &#039;central node&#039; very carefully. Consider for example the topology shown on the right. In this case a link is created to which two nodes of the citylab testbed and a single node of the virtual wall are connected. If, in this case, &amp;lt;code&amp;gt;vwallnode1&amp;lt;/code&amp;gt; were to be selected as the &#039;central&#039; node, then all traffic between &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; would be sent over the virtual wall testbed unnecessarily. If on the other hand &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; is used as a &#039;central&#039; node, then this problem is avoided.&lt;br /&gt;
&lt;br /&gt;
== Setting up Link impairment on GRE Tunnels ==&lt;br /&gt;
&lt;br /&gt;
While it is not possible to configure link-impairment on GRE tunnels via the JFed interface, it is possible to do so manually once the test has started. This not only works for links created by JFed but also for links created manually.&lt;br /&gt;
&lt;br /&gt;
Adding impairment to a link is done by running the following command on each node connected to the GRE-tunnel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem loss random &amp;lt;loss_percentage&amp;gt;% rate &amp;lt;data_rate&amp;gt; delay &amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this command:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;link&amp;gt;&amp;lt;/code&amp;gt; is the name of the gre tunnel interface&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;loss_percentage&amp;gt;&amp;lt;/code&amp;gt; is the percent of packets to be randomly dropped&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;data_rate&amp;gt;&amp;lt;/code&amp;gt; is the data rate limit to impose on the link (e.g 10mbit, 20kbit, ...)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt; is the delay (in microseconds) to add to packets sent from the host. (So: to add a 5ms delay you need to specify 5000)&lt;br /&gt;
&lt;br /&gt;
As an example, the following command adds a 20% loss, a maximum data rate of 35mbit and a 7.5ms delay to link0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev link0 root netem loss random 20% rate 35mbit delay 7500&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The link impairment configured with the above command only affects packet that are &#039;&#039;sent&#039;&#039; from the host. Received packets are unaffected. Therefore it is imperative that you configure the same link impairment settings on both nodes connected to the GRE tunnel.&lt;br /&gt;
&lt;br /&gt;
Removing link impairment on a link is done by running the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the impairment settings on a link, you first need to remove the link impairment all together and then add it again with the new settings.&lt;br /&gt;
&lt;br /&gt;
More information on the &#039;netem&#039; traffic control queueing discipline can be found here: https://www.systutorials.com/docs/linux/man/8-tc-netem/&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=334</id>
		<title>GRE Tunnels</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=GRE_Tunnels&amp;diff=334"/>
		<updated>2021-08-11T10:27:33Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: /* Creating a link between three or more nodes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;At this point, the CityLab testbed only has limited support for &#039;&#039;automatically&#039;&#039; creating links between nodes using the JFed interface. Standard IP-in-IP GRE Tunnels and Ethernet-in-IP GRE Tunnels (&#039;&#039;gre-tunnel&#039;&#039; and &#039;&#039;egre-tunnel&#039;&#039; links in JFed) are supported. Adding support &#039;&#039;native&#039;&#039; Ethernet links (lan links in JFed) is on our TODO list. Since both &#039;gre&#039; and &#039;egre&#039; tunnels are point-to-point tunnels it is currently not (yet) possible to create a JFed-link with more than two connected nodes. As a workaround it &#039;&#039;is&#039;&#039; possible to bridge multiple &#039;egre&#039;-tunnels together into a single (tunneled) L2-network once the test has started.&lt;br /&gt;
&lt;br /&gt;
This page provides a quick How-To guide on how to create standard &#039;gre&#039; or &#039;egre-tunnels&#039; in JFed and then explains how to manually set up and bridge  egre-tunnels manually (after the test has started).&lt;br /&gt;
&lt;br /&gt;
== Creating Links between nodes through the JFed interface ==&lt;br /&gt;
&lt;br /&gt;
=== Setting up links ===&lt;br /&gt;
&lt;br /&gt;
Creating Links between nodes through the JFed interface is very straightforward and can be done as follows:&lt;br /&gt;
&lt;br /&gt;
* Start JFed, click on &#039;New&#039; and drag in two wireless nodes. For this tutorial we&#039;ll assume that these nodes are called &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;&lt;br /&gt;
* Edit the node properties so both nodes are sourced from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed. (By default Wilab2 is used).&amp;lt;p&amp;gt;[[File:Jfed_experiment_2_nodes.png|Drag in two nodes from the &#039;&#039;City of Things Antwerp&#039;&#039; testbed and name them &#039;&#039;apu1&#039;&#039; and &#039;&#039;apu2&#039;&#039;|720px]]&amp;lt;/P&amp;gt;&lt;br /&gt;
* Drag a line from &#039;&#039;apu1&#039;&#039; to &#039;&#039;apu2&#039;&#039;. A &#039;&#039;link&#039;&#039; element connecting the two nodes is automatically created.&lt;br /&gt;
* If you are using JFed GUI 5.9 or above, link type of the link will already be set to &#039;gre&#039;. (This is shown between braces behind the name of the link). &amp;lt;p&amp;gt;[[File:Jfed_gre_link_2_nodes.png||300px]]&amp;lt;/p&amp;gt; If this is not the case, or you would like to create an &#039;egre&#039;-link instead, the link-type will need to be manually configured: &lt;br /&gt;
*# Right-click on the &#039;&#039;link&#039;&#039;-element, Click on &#039;&#039;Configure Link&#039;&#039; and select the &#039;&#039;Link Type&#039;&#039;-tab in the options window. &lt;br /&gt;
*# Change the link-type to &#039;gre-tunnel&#039; or &#039;egre-tunnel&#039; in the drop-down menu. If you select &#039;gre-tunnel&#039; an IP-in-IP tunnel will be created, if you select &#039;egre-tunnel&#039; an Ehternet-in-IP tunnel will be created. &amp;lt;p&amp;gt;[[File:JFed_link_options_type.png|Set the link-type to &#039;gre-tunnel&#039;|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
* JFed will automatically configure an IP-address on the tunnel interface for both nodes. optionally you can modify these IP-addresses in the &#039;&#039;General&#039;&#039; tab of the Link options-window &amp;lt;p&amp;gt;[[File:JFed_link_options_general.png|Changes the IP-addresses for the link if needed|480px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click &#039;Run&#039; to start your slice. When all nodes are green, your experiment has started and the GRE-tunnel between the two nodes has been configured. &amp;lt;p&amp;gt;[[File:JFed_gre_link_2_nodes_running.png|The running experiment|720px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*SSH into the &#039;&#039;apu1&#039;&#039; node. &lt;br /&gt;
*Run &amp;lt;code&amp;gt;ifconfig link02&amp;lt;/code&amp;gt; to verify that the GRE-tunnel has been created&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ifconfig link02&lt;br /&gt;
link02    Link encap:UNSPEC  HWaddr 8F-81-55-10-00-00-80-3F-00-00-00-00-00-00-00-00&lt;br /&gt;
          inet addr:192.168.0.1  P-t-P:192.168.0.1  Mask:255.255.255.0&lt;br /&gt;
          inet6 addr: fe80::200:5efe:8f81:5510/64 Scope:Link&lt;br /&gt;
          UP POINTOPOINT RUNNING NOARP  MTU:1434  Metric:1&lt;br /&gt;
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;
          collisions:0 txqueuelen:1&lt;br /&gt;
          RX bytes:112 (112.0 B)  TX bytes:168 (168.0 B)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Ping the &#039;&#039;apu2&#039;&#039;-tunnel enpoint by running &amp;lt;code&amp;gt;ping -c 4 &amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;&amp;lt;ip&amp;gt;&amp;lt;/code&amp;gt; is the IP-address configured for the tunnel endpoint on &#039;&#039;apu2&#039;&#039;. If you have not changed this, this is &amp;lt;code&amp;gt;192.168.0.2&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
user@apu1:~$ ping -c 4 192.168.0.2&lt;br /&gt;
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=2.21 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=1.60 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=1.46 ms&lt;br /&gt;
64 bytes from 192.168.0.2: icmp_seq=4 ttl=64 time=1.51 ms&lt;br /&gt;
&lt;br /&gt;
--- 192.168.0.2 ping statistics ---&lt;br /&gt;
4 packets transmitted, 4 received, 0% packet loss, time 3004ms&lt;br /&gt;
rtt min/avg/max/mdev = 1.464/1.699/2.218/0.303 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
==== No more than 2 nodes per link ====&lt;br /&gt;
&lt;br /&gt;
It is not possible to create (E)GRE-links with more than two nodes. The JFed GUI does allow additional nodes to be added to the link, but when the test is started the link will only exist on two nodes. This limitation is caused by the fact that the GRE-protocol only supports point-to-point tunnels. It is possible to [[#Manually setting up EGRE-tunnels|set up]] and [[#Creating a link between three or more nodes|bridge]] multiple egre-tunnels, but this cannot be done through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== EGRE-tunnels only work with &#039;CoT&#039; disk images ====&lt;br /&gt;
&lt;br /&gt;
To enable support for &#039;egre-tunnel&#039; links, a few tweaks had to be made to the &#039;client-side&#039; emulab-tools installed in the testbed disk images. Since these tweaks are not (yet) incorporated in the upstream emulab-code base, they are also not present in the many emulab-images used around the world. &lt;br /&gt;
&lt;br /&gt;
We have added these tweaks to the &#039;CoT&#039; disk-images of the CityLab testbed (see [[Disk Images]]), so if you want to use egre-links you must use a &#039;CoT&#039; disk image.&lt;br /&gt;
&lt;br /&gt;
==== (E)GRE-tunnels between nodes of different testbeds cannot be created via JFed ====&lt;br /&gt;
&lt;br /&gt;
Even at the best of times, creating links between nodes of different testbeds is an &#039;experimental feature&#039; at best. While it is perfectly possible to set up GRE and EGRE tunnels between nodes of different testbeds, it is currently not possible to do so through the JFed interface.&lt;br /&gt;
&lt;br /&gt;
==== Link impairment on GRE Tunnels cannot be configured through the JFed GUI ====&lt;br /&gt;
&lt;br /&gt;
The way JFed normally adds impairment to a link is by adding a so-called &#039;impairment node&#039; in between the nodes of a link to change the properties of the traffic flowing over the link. This mechanism however only works with ethernet interfaces and not with GRE Tunnels. That being said: it is possible to add link impairment to GRE tunnels manually. How to do so is [[#Setting_up_Link_impairment_on_GRE_Tunnels|explained below]].&lt;br /&gt;
&lt;br /&gt;
== Manually setting up EGRE-tunnels ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important:&#039;&#039;&#039; although it is possible to manually set up GRE-tunnels it is much easier to do so through the JFed-interface. The only reason for creating them manually is to create a &#039;link&#039; between more than two nodes or to create links with nodes of another testbed (both of which are currently not supported through JFed)&lt;br /&gt;
&lt;br /&gt;
A number of [[:File:Gre-utils.tar.gz | scripts]] are provided to make it as easy as possible to create and manage EGRE-tunnels.&lt;br /&gt;
Before any EGRE-tunnels can be created, these scripts first need to be installed on every node.&lt;br /&gt;
This can be done by running the following one-liner:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will&lt;br /&gt;
* Download the [[:File:Gre-utils.tar.gz | Gre-utils.tar.gz]] archive&lt;br /&gt;
* Install the scripts in &amp;lt;code&amp;gt;/usr/local&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
&lt;br /&gt;
[[File:Jfed-link-2-nodes.png|thumb|right|A simple link between two nodes.]]&lt;br /&gt;
&lt;br /&gt;
A simple GRE tunnel can be created by running the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.1/24 link0 apu2&amp;lt;/code&amp;gt;&lt;br /&gt;
* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above commands &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and &amp;lt;code&amp;gt;apuX&amp;lt;/code&amp;gt; is the host to create a tunnel to. The optional &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can be used to automatically configure an IPv4-address on the newly created interface.&lt;br /&gt;
&lt;br /&gt;
To allow the node names configured in JFed to be used to configure GRE tunnels, the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script tries to behave somewhat intelligently when resolving hostnames:&lt;br /&gt;
* If the specified host is a Fully Qualified Domain Name (i.e: it contains a &#039;.&#039;), a regular DNS query is performed&lt;br /&gt;
* If the specified host is a simple hostname (no &#039;.&#039; in the hostname), the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script &#039;&#039;first&#039;&#039; tries to resolve the specified host to a node name specified in JFed. If this fails, the IP-address of the host is resolved using a normal DNS query. &lt;br /&gt;
* If the specified host is a valid IPv4 address, no DNS-resolution is performed.&lt;br /&gt;
&lt;br /&gt;
Once the GRE tunnel is created, it can be used just like any other Ethernet interface, except that the MTU is a bit lower than normal.&lt;br /&gt;
&lt;br /&gt;
Removing the tunnel is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script. &lt;br /&gt;
To remove the tunnels created above for example, the following command would have to be run on each node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-link-3-nodes.png|thumb|right|A slightly more complicated link between more than two nodes.]]&lt;br /&gt;
&lt;br /&gt;
Creating a link between more than two nodes is (slightly) more complicated since GRE only allows Point-to-Point tunnels to be created. To work around this, GRE Tunnels are created from one &#039;central&#039; node to all other nodes on the link. These GRE Tunnels are then &#039;bridged&#039; together on the central node to form a shared subnet. Such a &#039;GRE Bridge&#039; can easily be created using the &amp;lt;code&amp;gt;gre_add_bridge&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
The 3-node setup shown in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# On &#039;&#039;&#039;apu1&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_bridge -c 192.168.0.1/24 link0 apu2 apu3&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;As for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script, &amp;lt;code&amp;gt;link0&amp;lt;/code&amp;gt; is the name of the interface to create and the &amp;lt;code&amp;gt;-c&amp;lt;/code&amp;gt; flag can optionally be used to configure an IPv4 address on the interface. The remaining parameters, in this case &amp;lt;code&amp;gt;apu2&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;apu3&amp;lt;/code&amp;gt; are the hosts to connect to. The resolution of these hostnames to IP-addresses is done in exactly the same way as for the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
#* On &#039;&#039;&#039;apu2&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.2/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;apu3&#039;&#039;&#039; run: &amp;lt;code&amp;gt;sudo gre_add_tunnel -c 192.168.0.3/24 link0 apu1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case &#039;&#039;apu1&#039;&#039; is used as the central node and &#039;&#039;apu2&#039;&#039; and &#039;&#039;apu3&#039;&#039; connect to it in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario.&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been created it can be used just like any other linux bridge. Additional interfaces can be added/removed using the &amp;lt;code&amp;gt;brctl&amp;lt;/code&amp;gt; command. The bridge&#039;s stastus can be queried using the &amp;lt;code&amp;gt;brctl show&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  user@apu1:~$ brctl show link0&lt;br /&gt;
  bridge name	bridge id		STP enabled	interfaces&lt;br /&gt;
  link0		8000.a2b74a105a76	no		link0_gre_0&lt;br /&gt;
  							link0_gre_1&lt;br /&gt;
In the above output, the &amp;lt;code&amp;gt;link0_gre_x&amp;lt;/code&amp;gt; interfaces are the GRE tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
Removing the &#039;GRE Bridge&#039; is done using the &amp;lt;code&amp;gt;gre_del_bridge_script&amp;lt;/code&amp;gt;. It is highly recommended to use this script to remove the bridge (rather than the &#039;&#039;brctl&#039;&#039; command) as this script not only removes the bridge itself, but also cleans up the GRE-tunnels to the individual nodes.&lt;br /&gt;
&lt;br /&gt;
To remove the bridge created in the above example the following command would have to be run &lt;br /&gt;
&lt;br /&gt;
* On &#039;&#039;&#039;apu1&#039;&#039;&#039;: &amp;lt;code&amp;gt;sudo gre_del_bridge link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the &#039;GRE Bridge&#039; has been removed, the GRE-Tunnels on the other nodes also need to be cleaned up. This is done in exactly the same way as in the [[#Creating a link between two nodes| two node]] scenario:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Limitations===&lt;br /&gt;
&lt;br /&gt;
==== Single tunnel between two nodes ====&lt;br /&gt;
&lt;br /&gt;
GRE Tunnels are identified &#039;&#039;solely&#039;&#039; on the source and destination IP-address of the encapsulating packet. That means that it is &#039;&#039;not&#039;&#039; possible to establish two independent tunnels between the same two nodes at the same time.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between two nodes| two node]] scenario, this means that only a &#039;&#039;single&#039;&#039; link can be created between two nodes.&lt;br /&gt;
&lt;br /&gt;
For the [[#Creating a link between three or more nodes| mutliple nodes]] scenario, a node can participate in multiple links as long as:&lt;br /&gt;
* each link uses a different &#039;central node&#039;&lt;br /&gt;
* each &#039;central node&#039; is only part of &#039;&#039;one&#039;&#039; link at the same time&lt;br /&gt;
&lt;br /&gt;
It should be noted however, that GRE Tunnels can be used in combination with VLAN-tagging, so if you &#039;&#039;really&#039;&#039; need to create multiple links between two nodes, you can do so by defining multiple VLANs on the GRE tunnel interface. This however is not something that can be done using the scripts provided here.&lt;br /&gt;
&lt;br /&gt;
==== Reduced MTU ====&lt;br /&gt;
&lt;br /&gt;
Using a GRE Tunnel incurs an overhead of 38 bytes. This is because the original Ethernet packet needs to be prefixed with an additional IP- and Ethernet-header in order to send it to the other tunnel endpoint. To prevent fragmentation, the linux kernel automatically reduces the MTU of the GRE-interface. As a result, the MTU &#039;&#039;inside&#039;&#039; the tunnel is 38 bytes lower than the MTU &#039;&#039;outside&#039;&#039; the tunnel.&lt;br /&gt;
&lt;br /&gt;
Except for a small decrease in performance this usually is not that big of a problem, with one notable exception. When, for instance, a WiFi AP-interface is bridged to a GRE Tunnel, the MTU is set to the smallest MTU of the &#039;slave&#039; interfaces (in this case the GRE-tunnel). This lower MTU however is &#039;&#039;&#039;not&#039;&#039;&#039; automagically communicated to the connected WiFi clients and as a result these clients may still send packets that are larger than the MTU of the bridge. Since these packets are subsequently dropped by the linux bridge, this can lead to all sorts of nasty problems. The most common of which are dropped UDP packets and TCP sessions seem to work fine and then suddenly hang when more than a few bytes at a time are sent over them.&lt;br /&gt;
&lt;br /&gt;
To resolve this issue the MTU of the other WiFi clients should be reduced to the MTU of the linux bridge. When static IP-addresses are used, this can easily be done using the &amp;lt;code&amp;gt;ip link&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  ip link set mtu &amp;lt;mtu&amp;gt; dev &amp;lt;device&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If DHCP is used, the lower MTU should be advertised by the DHCP server.&lt;br /&gt;
&lt;br /&gt;
== Setting up (E)GRE-Tunnels Citylab and the Virtual Wall ==&lt;br /&gt;
&lt;br /&gt;
At this point it is not possible to set up &#039;multi-site&#039; (e)GRE tunnels through the JFed interface, but it is possible to do so manually after the test has started. The process of doing so is very similar to manually creating EGRE-Tunnels within the citylab testbed itself, but the following caveats need to be taken into account:&lt;br /&gt;
&lt;br /&gt;
* Setting up GRE Tunnels between nodes of different testbeds requires both endpoints to have a &#039;&#039;routable&#039;&#039; (i.e. public) IPv4 or IPv6 address and for GRE-traffic to be allowed by the firewall/router through which the nodes are connected to the internet. While all nodes of the citylab testbed meet the above requirement, this may not necessarily be the case for nodes of other testbeds.&lt;br /&gt;
&lt;br /&gt;
* The &#039;&#039;MTU&#039;&#039; of the created link needs to be set manually. Otherwise you will most likely encounter MTU-mismatch issues given that, by default, the MTU of the created tunnel is calculated from the MTU of the uplink interface, and that not all testbeds use the same MTU on their uplink interface.&lt;br /&gt;
&lt;br /&gt;
* GRE tunnels are &#039;&#039;&#039;not encrypted&#039;&#039;&#039;. Any data you send over them is sent plain-text over the internet so make sure not to send any sensitive data over them without adding encryption in some other way. If you need a tunnel which encrypts the traffic as well, OpenVPN is most likely a better solution.&lt;br /&gt;
&lt;br /&gt;
The remainder of this section explains how to set up &#039;multi-site&#039; (e)gre tunnels. We specifically focus on setting up GRE tunnels between Citylab and the [https://doc.ilabt.imec.be/ilabt/virtualwall/|Virtual Wall], but setting up GRE tunnels to other testbeds should be very similar.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
* Make sure that all nodes involved are running &#039;&#039;at least&#039;&#039; Ubuntu 16.04 (EGRE tunnels are not supported in Ubuntu 14.04 and before). For citylab nodes this is the case by default, but for the nodes on the virtual wall you will have to explicitly specify a different disk image when you set up the experiment as that testbed uses &#039;Ubuntu 14.04&#039; by default.&lt;br /&gt;
&lt;br /&gt;
* Setting up multi-site (e)gre tunnels is done with the same &#039;helper scripts&#039; as [[#Manually_setting_up_EGRE-tunnels|used before]]. Before setting up the tunnels themselves, these scripts need to be installed on every node. This can be done using the following one-liner: &lt;br /&gt;
&amp;lt;code&amp;gt;wget -O- https://doc.lab.cityofthings.eu/w/images/9/93/Gre-utils.tar.gz | sudo tar -C /usr/local/ -zxvf -&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between two nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-2-nodes.png|thumb|right|A &#039;simple&#039; multi-site link with two nodes.]]&lt;br /&gt;
A point-to-point (E)GRE tunnel can be created using the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; script on both nodes.&lt;br /&gt;
&lt;br /&gt;
The setup in the example on the right can be created as follows:&lt;br /&gt;
&lt;br /&gt;
# Run the &amp;lt;code&amp;gt;hostname&amp;lt;/code&amp;gt; command on both hosts to learn their fully qualified domain names (FQDNs). E.g: &lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@citynode1:~# hostname&amp;amp;#10;citynode1.gretest.wall2-ilabt-iminds-be.lab.cityofthings.eu&amp;lt;/pre&amp;gt;&lt;br /&gt;
#:&amp;lt;pre&amp;gt;root@vwallnode1:~# hostname&amp;amp;#10;vwallnode1.gretest.wall2-ilabt-iminds-be.wall2.ilabt.iminds.be&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: As shown in the examples above the FQDNs of the nodes depends not only on the hostname configured in JFed but also on the name of the experiment, project and the testbed the node belongs to. Therefore yuo will almost certainly need to use different FQDNs than the ones listed above&lt;br /&gt;
# Create the EGRE tunnel itself:&lt;br /&gt;
#* On &#039;&#039;&#039;citynode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_vwallnode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
#* On &#039;&#039;&#039;vwallnode1&#039;&#039;&#039; run: &amp;lt;code&amp;gt; sudo gre_add_tunnel -c 192.168.0.1/24 -m 1400 -6 link0 &amp;lt;fqdn_of_citynode1&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; commands shown above are very similar to the ones used to set up an EGRE-tunnel between citylab nodes, but there are a few important differences:&lt;br /&gt;
* Rather than only specifying the hostname of the other endpoint, the full FQDN needs to be specified&lt;br /&gt;
* The &amp;lt;code&amp;gt;-m&amp;lt;/code&amp;gt; flag is added to manually set the MTU on the link. As explained before, this is needed to prevent MTU-mismatch issues. In this specific example an MTU of &amp;lt;code&amp;gt;1400&amp;lt;/code&amp;gt; bytes is specified since it provides enough headroom for multiple encapsulation headers and is &#039;good enough&#039; for an initial test. For optimal performance however, the MTU should be set to &amp;lt;code&amp;gt;min(uplink MTU of all nodes involved) - &amp;lt;GRE Overhead&amp;gt;(38 bytes)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt; flag is added to instruct the &amp;lt;code&amp;gt;gre_add_tunnel&amp;lt;/code&amp;gt; to create a &#039;GRE-over-IPv6&#039; rather than a &#039;GRE-over-IPv4&#039; tunnel. The reason for using IPv6 in this case is that the nodes of the virtual wall testbed don&#039;t have a public IPv4 address.&lt;br /&gt;
&lt;br /&gt;
Instead of specifying the FQDNs of the nodes, it would also have been possible to specify the public IP address of the node directly but this is more cumbersome and error prone (especially when using IPv6). Once the tunnel has been created it can be used just like any regular Ethernet interface except that, once again, the MTU is somewhat lower.&lt;br /&gt;
&lt;br /&gt;
As before, removing the tunnels is done using the &amp;lt;code&amp;gt;gre_del_tunnel&amp;lt;/code&amp;gt; script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo gre_del_tunnel link0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a link between three or more nodes ===&lt;br /&gt;
[[File:Jfed-multisite-link-3-nodes.png|right|thumb|A multi-site link with three nodes. &#039;citynode1&#039; and &#039;citynode2&#039; are Citylab nodes. &#039;vwallnode1&#039; is a node on the Virtual Wall testbed.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As with [[#Creating_a_link_between_three_or_more_nodes|GRE links between citylab nodes]], setting up a GRE-link with more than two nodes is done by:&lt;br /&gt;
#Creating GRE tunnels from all nodes to a &#039;central&#039; node&lt;br /&gt;
#Bridging all of these tunnels together to create a single shared subnet.&lt;br /&gt;
&lt;br /&gt;
When such an &#039;overlay subnet&#039; spans multiple testbeds however, it is important to select the &#039;central node&#039; very carefully. Consider for example the topology shown on the right. In this case a link is created to which two nodes of the citylab testbed and a single node of the virtual wall are connected. If, in this case, &amp;lt;code&amp;gt;vwallnode1&amp;lt;/code&amp;gt; were to be selected as the &#039;central&#039; node, then all traffic between &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; would be sent over the virtual wall testbed unnecessarily. If on the other hand &amp;lt;code&amp;gt;citynode1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;citynode2&amp;lt;/code&amp;gt; is used as a &#039;central&#039; node, then this problem is avoided.&lt;br /&gt;
&lt;br /&gt;
== Setting up Link impairment on GRE Tunnels ==&lt;br /&gt;
&lt;br /&gt;
While it is not possible to configure link-impairment on GRE tunnels via the JFed interface, it is possible to do so manually once the test has started. This not only works for links created by JFed but also for links created manually.&lt;br /&gt;
&lt;br /&gt;
Adding impairment to a link is done by running the following command on each node connected to the GRE-tunnel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem loss random &amp;lt;loss_percentage&amp;gt;% rate &amp;lt;data_rate&amp;gt; delay &amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this command:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;link&amp;gt;&amp;lt;/code&amp;gt; is the name of the gre tunnel interface&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;loss_percentage&amp;gt;&amp;lt;/code&amp;gt; is the percent of packets to be randomly dropped&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;data_rate&amp;gt;&amp;lt;/code&amp;gt; is the data rate limit to impose on the link (e.g 10mbit, 20kbit, ...)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;delay_in_micro_seconds&amp;gt;&amp;lt;/code&amp;gt; is the delay (in microseconds) to add to packets sent from the host. (So: to add a 5ms delay you need to specify 5000)&lt;br /&gt;
&lt;br /&gt;
As an example, the following command adds a 20% loss, a maximum data rate of 35mbit and a 7.5ms delay to link0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev link0 root netem loss random 20% rate 35mbit delay 7500&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important&#039;&#039;&#039;: The link impairment configured with the above command only affects packet that are &#039;&#039;sent&#039;&#039; from the host. Received packets are unaffected. Therefore it is imperative that you configure the same link impairment settings on both nodes connected to the GRE tunnel.&lt;br /&gt;
&lt;br /&gt;
Removing link impairment on a link is done by running the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo tc qdisc add dev &amp;lt;link&amp;gt; root netem&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the impairment settings on a link, you first need to remove the link impairment all together and then add it again with the new settings.&lt;br /&gt;
&lt;br /&gt;
More information on the &#039;netem&#039; traffic control queueing discipline can be found here: https://www.systutorials.com/docs/linux/man/8-tc-netem/&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
	<entry>
		<id>https://doc.lab.cityofthings.eu/w/index.php?title=File:Jfed-multisite-link-3-nodes.png&amp;diff=333</id>
		<title>File:Jfed-multisite-link-3-nodes.png</title>
		<link rel="alternate" type="text/html" href="https://doc.lab.cityofthings.eu/w/index.php?title=File:Jfed-multisite-link-3-nodes.png&amp;diff=333"/>
		<updated>2021-08-11T10:26:02Z</updated>

		<summary type="html">&lt;p&gt;Dvdakker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dvdakker</name></author>
	</entry>
</feed>