Contiki
- Complete contiki documentation can be found here.
- Contiki code documentation v2.6
- Sics class notes for Contiki basic programming here
- A tutorial on the usage of cooja can be found here
- An updated version of the contiki documentation [v3.0] here
Zolertia Z1 Motes
- Information, specs and tutorials on the Zolertia Z1 motes can be found here
Sensortag Motes
- Information and specs on the Sensortags motes can be found here
Maven
Maven is the de-facto standard to manage Java projects. To install it:
$ sudo apt-get install maven
More information on Maven are here.
To create an executable jar with all dependencies modify the pom.xml adding the following before the </project> closing tag:
<build>
<plugins>
<!-- download source code in Eclipse, best practice -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>false</downloadJavadocs>
</configuration>
</plugin>
<!-- Set a compiler level -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<!-- Maven Assembly Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<!-- get all project dependencies -->
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<!-- MainClass in mainfest make a executable jar -->
<archive>
<manifest>
<mainClass>$PACKAGE.$MAINCLASS</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<!-- bind to the packaging phase -->
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Run your application
- Go inside your project root folder.
- Type
mvn package. It will generate the jar file inside the target folder. - Execute your application by issuing:
$ java -jar target/$ARTIFACTID-0.0.1-SNAPSHOT-jar-with-dependencies.jar
Californium
In order to create a Maven project that uses Californium add the following to the pom.xml:
<dependencies>
...
<dependency>
<groupId>org.eclipse.californium</groupId>
<artifactId>californium-core</artifactId>
<version>1.1.0-SNAPSHOT</version>
</dependency>
...
</dependencies>
...
<repositories>
...
<repository>
<id>repo.eclipse.org</id>
<name>Californium Repository</name>
<url>https://repo.eclipse.org/content/repositories/californium/</url>
</repository>
...
</repositories>
OM2M
- OM2M homepage
- OM2M Configuration
Virtual Machine
- The VMware VM used in the lab is available here. 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.
Multiple 6LoWPAN networks
In order to deploy multiple 6LoWPAN networks, one emulated through cooja and one based on physical devices, a further step is needed.
- Open a shell to interact with the Z1 border router
- Issue the command
export PREFIX=fa00::1/64 - Type the command
make TARGET=z1 connect-router - Open cooja and create a simulation with a border router as the first node
- Create a Socket Server on the node 1
- In another shell type
make connect-router-cooja
The emulated network will have fd00::1/64 as prefix, while the real network will have the prefix set to fa00::1/64.