{"id":68,"date":"2017-11-14T12:02:04","date_gmt":"2017-11-14T11:02:04","guid":{"rendered":"http:\/\/people.unipi.it\/giacomo_tanganelli\/?page_id=68"},"modified":"2017-12-19T11:31:49","modified_gmt":"2017-12-19T10:31:49","slug":"material","status":"publish","type":"page","link":"https:\/\/people.unipi.it\/giacomo_tanganelli\/teaching\/material\/","title":{"rendered":"Material"},"content":{"rendered":"<h2 id=\"contiki\">Contiki<\/h2>\n<ul>\n<li>Complete contiki documentation can be found\u00a0<a href=\"https:\/\/github.com\/contiki-os\/contiki\/wiki\">here<\/a>.<\/li>\n<li>Contiki code documentation\u00a0<a href=\"http:\/\/contiki.sourceforge.net\/docs\/2.6\/\">v2.6<\/a><\/li>\n<li>Sics class notes for Contiki basic programming\u00a0<a href=\"https:\/\/www.sics.se\/~thiemo\/seniot09cccc-notes.pdf\">here<\/a><\/li>\n<li>A tutorial on the usage of cooja can be found\u00a0<a href=\"http:\/\/cnds.eecs.jacobs-university.de\/courses\/iotlab-2013\/cooja.pdf\">here<\/a><\/li>\n<li>An updated version of the contiki documentation [v3.0]\u00a0<a href=\"http:\/\/www.eistec.se\/docs\/contiki\/index.html\">here<\/a><\/li>\n<\/ul>\n<h2 id=\"zolertia-z1-motes\">Zolertia Z1 Motes<\/h2>\n<ul>\n<li>Information, specs and tutorials on the Zolertia Z1 motes can be found\u00a0<a href=\"http:\/\/zolertia.sourceforge.net\/wiki\/index.php\/Main_Page\">here<\/a><\/li>\n<\/ul>\n<h2 id=\"sky-motes\">Sensortag\u00a0Motes<\/h2>\n<ul>\n<li>Information and specs on the Sensortags\u00a0motes can be found\u00a0<a href=\"http:\/\/www.ti.com\/ww\/en\/wireless_connectivity\/sensortag\/\">here<\/a><\/li>\n<\/ul>\n<h2>Maven<\/h2>\n<p id=\"create-the-main-class\">Maven is the de-facto standard to manage Java projects. To install it:<\/p>\n<pre class=\"highlight\"><code><span class=\"gp\">$ <\/span>sudo apt-get install maven<\/code><\/pre>\n<p>More information on Maven are <a href=\"https:\/\/maven.apache.org\/\">here<\/a>.<\/p>\n<p>To create an executable jar with all dependencies modify the\u00a0<code class=\"highlighter-rouge\">pom.xml<\/code>\u00a0adding the following before the\u00a0<code class=\"highlighter-rouge\">&lt;\/project&gt;<\/code>\u00a0closing tag:<\/p>\n<div class=\"language-xml highlighter-rouge\">\n<pre class=\"highlight\"><code>&lt;build&gt;\r\n\r\n  &lt;plugins&gt;\r\n    &lt;!-- download source code in Eclipse, best practice --&gt;\r\n    &lt;plugin&gt;\r\n      &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;\r\n      &lt;artifactId&gt;maven-eclipse-plugin&lt;\/artifactId&gt;\r\n      &lt;version&gt;2.9&lt;\/version&gt;\r\n      &lt;configuration&gt;\r\n        &lt;downloadSources&gt;true&lt;\/downloadSources&gt;\r\n        &lt;downloadJavadocs&gt;false&lt;\/downloadJavadocs&gt;\r\n      &lt;\/configuration&gt;\r\n    &lt;\/plugin&gt;\r\n\r\n    &lt;!-- Set a compiler level --&gt;\r\n    &lt;plugin&gt;\r\n      &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;\r\n      &lt;artifactId&gt;maven-compiler-plugin&lt;\/artifactId&gt;\r\n      &lt;version&gt;2.3.2&lt;\/version&gt;  \r\n    &lt;\/plugin&gt;\r\n\r\n    &lt;!-- Maven Assembly Plugin --&gt;\r\n    &lt;plugin&gt;\r\n      &lt;groupId&gt;org.apache.maven.plugins&lt;\/groupId&gt;\r\n      &lt;artifactId&gt;maven-assembly-plugin&lt;\/artifactId&gt;\r\n      &lt;version&gt;2.4.1&lt;\/version&gt;\r\n      &lt;configuration&gt;\r\n        &lt;!-- get all project dependencies --&gt;\r\n        &lt;descriptorRefs&gt;\r\n          &lt;descriptorRef&gt;jar-with-dependencies&lt;\/descriptorRef&gt;\r\n        &lt;\/descriptorRefs&gt;\r\n        &lt;!-- MainClass in mainfest make a executable jar --&gt;\r\n        &lt;archive&gt;\r\n          &lt;manifest&gt;\r\n            &lt;mainClass&gt;$PACKAGE.$MAINCLASS&lt;\/mainClass&gt;\r\n          &lt;\/manifest&gt;\r\n        &lt;\/archive&gt;\r\n      &lt;\/configuration&gt;\r\n      &lt;executions&gt;\r\n        &lt;execution&gt;\r\n          &lt;id&gt;make-assembly&lt;\/id&gt;\r\n          &lt;!-- bind to the packaging phase --&gt;\r\n          &lt;phase&gt;package&lt;\/phase&gt;\r\n          &lt;goals&gt;\r\n            &lt;goal&gt;single&lt;\/goal&gt;\r\n          &lt;\/goals&gt;\r\n        &lt;\/execution&gt;\r\n      &lt;\/executions&gt;\r\n    &lt;\/plugin&gt;\r\n  &lt;\/plugins&gt;\r\n&lt;\/build&gt;\r\n<\/code><\/pre>\n<\/div>\n<p>Run your application<\/p>\n<ul>\n<li>Go inside your project root folder.<\/li>\n<li>Type\u00a0<code class=\"highlighter-rouge\">mvn package<\/code>. It will generate the jar file inside the target folder.<\/li>\n<li>Execute your application by issuing:<\/li>\n<\/ul>\n<div class=\"language-bash highlighter-rouge\">\n<pre class=\"highlight\"><code><span class=\"gp\">$ <\/span>java -jar target\/<span class=\"nv\">$ARTIFACTID<\/span>-0.0.1-SNAPSHOT-jar-with-dependencies.jar\u00a0<\/code><\/pre>\n<\/div>\n<h2>Californium<\/h2>\n<ul>\n<li>Californium\u00a0<a href=\"http:\/\/www.eclipse.org\/californium\/\">home page<\/a><\/li>\n<li>A more detailed presentation on Californium can be found here\u00a0<a href=\"https:\/\/www.eclipsecon.org\/france2014\/sites\/default\/files\/slides\/Hands-on%20with%20CoAP.pdf\">here<\/a><\/li>\n<\/ul>\n<p>In order to create a Maven project that uses Californium add the following to the <code class=\"highlighter-rouge\">pom.xml<\/code>:<\/p>\n<div class=\"language-xml highlighter-rouge\">\n<pre class=\"highlight\"><code><span class=\"nt\">&lt;dependencies&gt;<\/span>\r\n...\r\n    <span class=\"nt\">&lt;dependency&gt;<\/span>\r\n            <span class=\"nt\">&lt;groupId&gt;<\/span>org.eclipse.californium<span class=\"nt\">&lt;\/groupId&gt;<\/span>\r\n            <span class=\"nt\">&lt;artifactId&gt;<\/span>californium-core<span class=\"nt\">&lt;\/artifactId&gt;<\/span>\r\n            <span class=\"nt\">&lt;version&gt;<\/span>1.1.0-SNAPSHOT<span class=\"nt\">&lt;\/version&gt;<\/span>\r\n    <span class=\"nt\">&lt;\/dependency&gt;<\/span>\r\n...\r\n<span class=\"nt\">&lt;\/dependencies&gt;<\/span>\r\n...\r\n<span class=\"nt\">&lt;repositories&gt;<\/span>\r\n...\r\n    <span class=\"nt\">&lt;repository&gt;<\/span>\r\n      <span class=\"nt\">&lt;id&gt;<\/span>repo.eclipse.org<span class=\"nt\">&lt;\/id&gt;<\/span>\r\n      <span class=\"nt\">&lt;name&gt;<\/span>Californium Repository<span class=\"nt\">&lt;\/name&gt;<\/span>\r\n      <span class=\"nt\">&lt;url&gt;<\/span>https:\/\/repo.eclipse.org\/content\/repositories\/californium\/<span class=\"nt\">&lt;\/url&gt;<\/span>\r\n    <span class=\"nt\">&lt;\/repository&gt;<\/span>\r\n    ...\r\n<span class=\"nt\">&lt;\/repositories&gt;<\/span>\r\n<\/code><\/pre>\n<\/div>\n<h3 id=\"create-the-main-class\">OM2M<\/h3>\n<ul>\n<li>OM2M\u00a0<a href=\"http:\/\/www.eclipse.org\/om2m\/\">homepage<\/a><\/li>\n<li>OM2M\u00a0<a href=\"http:\/\/wiki.eclipse.org\/OM2M\/one\/Clone\">Configuration<\/a><\/li>\n<\/ul>\n<h2>Virtual Machine<\/h2>\n<ul>\n<li>The VMware VM used in the lab is available <a href=\"https:\/\/drive.google.com\/open?id=1KdIH6KERZuLzbYeRiGUwGmhP3I9R5SbO\">here<\/a>. Download the file, unzip it and open the ovf with WMWare. If an error occurs, click on Retry and the VM should be imported correctly.<\/li>\n<\/ul>\n<p><a name=\"multiple\"><\/a><\/p>\n<h2>Multiple 6LoWPAN networks<\/h2>\n<p>In order to deploy multiple 6LoWPAN networks, one emulated through\u00a0cooja and one based on physical devices, a further step is needed.<\/p>\n<ul>\n<li>Open a shell to interact with the Z1 border router<\/li>\n<li>Issue the command\u00a0<code class=\"highlighter-rouge\">export PREFIX=fa00::1\/64<\/code><\/li>\n<li>Type the command <code class=\"highlighter-rouge\">make TARGET=z1 connect-router<\/code><\/li>\n<li>Open cooja and create a simulation with a border router as the first node<\/li>\n<li>Create a Socket Server on the node 1<\/li>\n<li>In another shell type\u00a0\u00a0<code class=\"highlighter-rouge\">make connect-router-cooja<\/code><\/li>\n<\/ul>\n<p>The emulated network will have <code class=\"highlighter-rouge\">fd00::1\/64<\/code> as prefix, while the real network will have the prefix set to <code class=\"highlighter-rouge\">fa00::1\/64<\/code>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Contiki Complete contiki documentation can be found\u00a0here. Contiki code documentation\u00a0v2.6 Sics class notes for Contiki basic programming\u00a0here A tutorial on&hellip;<\/p>\n<p><a class=\"btn btn-dark btn-sm unipi-read-more-link\" href=\"https:\/\/people.unipi.it\/giacomo_tanganelli\/teaching\/material\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":450,"featured_media":0,"parent":39,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-68","page","type-page","status-publish","hentry"],"acf":[],"featured_image_src":null,"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Material - Giacomo Tanganelli<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/people.unipi.it\/giacomo_tanganelli\/teaching\/material\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Material - Giacomo Tanganelli\" \/>\n<meta property=\"og:description\" content=\"Contiki Complete contiki documentation can be found\u00a0here. Contiki code documentation\u00a0v2.6 Sics class notes for Contiki basic programming\u00a0here A tutorial on&hellip;Read More...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/people.unipi.it\/giacomo_tanganelli\/teaching\/material\/\" \/>\n<meta property=\"og:site_name\" content=\"Giacomo Tanganelli\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-19T10:31:49+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/people.unipi.it\\\/giacomo_tanganelli\\\/teaching\\\/material\\\/\",\"url\":\"https:\\\/\\\/people.unipi.it\\\/giacomo_tanganelli\\\/teaching\\\/material\\\/\",\"name\":\"Material - Giacomo Tanganelli\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/people.unipi.it\\\/giacomo_tanganelli\\\/#website\"},\"datePublished\":\"2017-11-14T11:02:04+00:00\",\"dateModified\":\"2017-12-19T10:31:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/people.unipi.it\\\/giacomo_tanganelli\\\/teaching\\\/material\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/people.unipi.it\\\/giacomo_tanganelli\\\/teaching\\\/material\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/people.unipi.it\\\/giacomo_tanganelli\\\/teaching\\\/material\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/people.unipi.it\\\/giacomo_tanganelli\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Teaching\",\"item\":\"https:\\\/\\\/people.unipi.it\\\/giacomo_tanganelli\\\/teaching\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Material\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/people.unipi.it\\\/giacomo_tanganelli\\\/#website\",\"url\":\"https:\\\/\\\/people.unipi.it\\\/giacomo_tanganelli\\\/\",\"name\":\"Giacomo Tanganelli\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/people.unipi.it\\\/giacomo_tanganelli\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Material - Giacomo Tanganelli","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/people.unipi.it\/giacomo_tanganelli\/teaching\/material\/","og_locale":"en_US","og_type":"article","og_title":"Material - Giacomo Tanganelli","og_description":"Contiki Complete contiki documentation can be found\u00a0here. Contiki code documentation\u00a0v2.6 Sics class notes for Contiki basic programming\u00a0here A tutorial on&hellip;Read More...","og_url":"https:\/\/people.unipi.it\/giacomo_tanganelli\/teaching\/material\/","og_site_name":"Giacomo Tanganelli","article_modified_time":"2017-12-19T10:31:49+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/people.unipi.it\/giacomo_tanganelli\/teaching\/material\/","url":"https:\/\/people.unipi.it\/giacomo_tanganelli\/teaching\/material\/","name":"Material - Giacomo Tanganelli","isPartOf":{"@id":"https:\/\/people.unipi.it\/giacomo_tanganelli\/#website"},"datePublished":"2017-11-14T11:02:04+00:00","dateModified":"2017-12-19T10:31:49+00:00","breadcrumb":{"@id":"https:\/\/people.unipi.it\/giacomo_tanganelli\/teaching\/material\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/people.unipi.it\/giacomo_tanganelli\/teaching\/material\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/people.unipi.it\/giacomo_tanganelli\/teaching\/material\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/people.unipi.it\/giacomo_tanganelli\/"},{"@type":"ListItem","position":2,"name":"Teaching","item":"https:\/\/people.unipi.it\/giacomo_tanganelli\/teaching\/"},{"@type":"ListItem","position":3,"name":"Material"}]},{"@type":"WebSite","@id":"https:\/\/people.unipi.it\/giacomo_tanganelli\/#website","url":"https:\/\/people.unipi.it\/giacomo_tanganelli\/","name":"Giacomo Tanganelli","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/people.unipi.it\/giacomo_tanganelli\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/people.unipi.it\/giacomo_tanganelli\/wp-json\/wp\/v2\/pages\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/people.unipi.it\/giacomo_tanganelli\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/people.unipi.it\/giacomo_tanganelli\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/people.unipi.it\/giacomo_tanganelli\/wp-json\/wp\/v2\/users\/450"}],"replies":[{"embeddable":true,"href":"https:\/\/people.unipi.it\/giacomo_tanganelli\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":7,"href":"https:\/\/people.unipi.it\/giacomo_tanganelli\/wp-json\/wp\/v2\/pages\/68\/revisions"}],"predecessor-version":[{"id":142,"href":"https:\/\/people.unipi.it\/giacomo_tanganelli\/wp-json\/wp\/v2\/pages\/68\/revisions\/142"}],"up":[{"embeddable":true,"href":"https:\/\/people.unipi.it\/giacomo_tanganelli\/wp-json\/wp\/v2\/pages\/39"}],"wp:attachment":[{"href":"https:\/\/people.unipi.it\/giacomo_tanganelli\/wp-json\/wp\/v2\/media?parent=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}