Arch Rock IP/6LoWPAN Software Distribution (ASD)

1.0.1 (Build 18045)

Atmel RZ Raven

May 21st, 2008

(Please go to http://support.archrock.com/asd for the latest update)

# 1 Overview

The release contains an evaluation copy of the Arch Rock IP/6LoWPAN software distribution (ASD) for the Atmega1284p processor and Atmel RF230 802.15.4 radio chip. The distribution contains a set of APIs that allows developers to create software to enable connectivity between embedded devices and a PC over an IP mesh network when used in conjunction with the Arch Rock 6LoWPAN Windows service.

To fully demonstrate the power of IP based protocols, this release also contains sample applications built with the Arch Rock 6LoWPAN kernel library for the AVRRAVEN boards; it also contains an evaluation copy of the Arch Rock 6LoWPAN Windows Service and an image for the AVRRZUSBSTICK.

To expedite the learning process, a complete tutorial of the ASD is also included with this release. The tutorial consists of a series of programming examples of increasing complexity and HTML documentation.

Users can use the evaluation version of the Arch Rock 6LoWPAN Windows Service and the AVRRZUSBSTICK together with embedded applications developed with the ASD to build fully functional 6LoWPAN applications.

This document is organized into the following sections:

- Arch Rock IP/6LoWPAN Software Distribution
- ASD 6LoWPAN demo binaries
- Arch Rock 6LoWPAN Windows Service
- List of files and directories

Note: Users can jump directly to section 3 and begin running the pre-built sample applications without any setup in section 2.

Note: Users who are interested in the tutorial documentation can look at projects\doc\doc_main.html

Note: Arch Rock encourages you to check out support site at: http://support.archrock.com/asd immediately for updates, bug fixes, and additional sample applications

# 2 Arch Rock IP/6LoWPAN Software Distribution

6LoWPAN Kernel Library footprint:

Program Flash memory: 36.7kB

Data memory (System + Network): 3.8kB

Network memory buffer: 2.4kB (tunable)

## 2.1 Prerequisites

The following software packages are required:

- Get AVR Studio 4.13 and SP2 or greater for IDE development environment.
- Get WinAVR for the C-compiler and corresponding tool chains. The latest version as of this release of ASD is WinAVR 4.2.2 20071221.

Depending on your version of WinAVR, there may be bugs in its 1284p header file. If you encounter compilation errors while building sample 1284p applications out of the box, please try using 1284patch\iom1284p.h

## 2.2 Building an ASD project

The following sections assume that the prerequisite software described in section 2.1 has been met.

### 2.2.1 Building an existing AVR Studio Project

We have provided the source code and project file for the sample application "shell". As an example we will guide you through building the shell project.

#### 2.2.1.1 Configuring AVR studio

Launch AVR studio. If prompted, select your programmer under Debug platform. The shell project is build for the Atmega1284P; consequently we select Atmega1284P under Device.

#### 2.2.1.2 Open the sample project

In AVR Studio Project Wizard, or in the Project menu select open project and browse to projects\shell, select shell.aps and click Open

When you try to load the shell project file in AVR studio for the first time, AVR studio may notify you of an error in locating a particular source file. If that is the case, simply deleted the source file in the project browser and add it again (see example below)

Expand the Source Files explorer to see the missing file.

Delete the missing source file from the project and add it again from project\libc

#### 2.2.1.3 Project Configuration

When all the source files are found, go to Project->Configuration Options

Under General tab,

- make sure the device is specified correctly as atmega1284p
- use -Os for optimization (use -O0 for debug mode)

Under Include Directories,

- add ASD's include directory
- add ASD's include\platform\avr directory

For example, if you copy the CD to c:\, then add "c:\Arch Rock\include" and "c:\Arch Rock\projects\include\"

Under Libraries,

- add ASD's lib directory to library path in your ASD directory (e.g. c:\Arch Rock\lib\raven\ and c:\Arch Rock\projects\lib\)
- select libkernel.a and libeeprom.a. Press Add Library

Press OK.

#### 2.2.1.4 Build

Build the project by pressing Build -> Build or F7

The output file is located at the Output File Directory, as specified under the General tab in Project->Configuration Options

The output file, shell.ihex, can be loaded onto an Atmega1284P. For details on flashing and running the shell demo, see docs\QuickStart\QUICKSTART.htm

### 2.2.2 Building a new AVR project

#### 2.2.2.1 Selecting the correct debug platform and device

#### 2.2.2.2 Project Configuration

Go to Project->Configuration Options

Under General tab,

- make sure the device is specified correctly as atmega1284p
- use -Os for optimization (use -O0 for debug mode)

Under Include Directories,

- add projects\include
- add include\

For example, if you copy the CD to c:\, then add "c:\Arch Rock \include" and "c:\Arch Rock\projects\include"

Under Libraries,

- add ASD's lib directory to library path in your ASD directory (e.g. c:\Arch Rock\lib\raven and c:\Arch Rock\projects\lib)
- select libkernel.a and libpeerom.a. Press Add Library

Press OK.

#### 2.2.2.3 Adding files to the project

Add source or header files by right clicking on source/header files in the project explorer and choose the appropriate action.

#### 2.2.2.4 Build

Build the project by pressing Build -> Build or F7

The output file is located at the Output File Directory, as specified under the General tab in Project->Configuration Options

# 3 6LoWPAN demo binaries

We have included sample binaries for the AVRRAVEN boards that demonstrate the capabilities of the Arch Rock 6LoWPAN Kernel. The sample binaries are meant to be used in conjunction with the Arch Rock 6LoWPAN Windows Service and the AVRRZUSBSTICK (see section 4 below).

Currently we provide one sample application:

- Shell: allows a user to telnet to an AVRRAVEN and execute commands on a shell-like environment. (TCP/IP over 6LoWPAN)

For details on flashing and running the sample applications, see docs\QuickStart\QUICKSTART.htm

# 4 Arch Rock 6LoWPAN Windows Service

An evaluation version of the Arch Rock 6LoWPAN Windows Service is included. It allows users to manage an Arch Rock 6LoWPAN network via a simple Web GUI. It also allows PC applications to communicate with embedded ASD applications in the 6LoWPAN network using standard network protocols such as TCP and UDP.

Users can use the evaluation version of the Arch Rock 6LoWPAN Windows Service and the AVRRZUSBSTICK together with embedded applications developed with the ASD to build functional 6LoWPAN applications.

For a guide on how to setup and run the Arch Rock 6LoWPAN Windows Service, go to docs\UsbStick\AVRRZUSBSTICK_SETUP_GUIDE.htm

# 5 Files and Directories

The distribution contains the following files:

LICENSE.txt

- License agreement

RELEASE_NOTES.txt

- Release notes about this distribution

1284patch\iom1284p.h

- A patch for a header in WinAVR of the same name; if you encounter compilation errors with your iom1284p.h, you should use this file instead

binaries\

- Arch Rock 6LoWPAN Windows Service installer
- Raven_telnet_shell

- Demo image for Atmega1284p
- Demo image for Atmega3290p

- UsbStick image for use in conjunction with Arch Rock 6LoWPAN Windows Service
- UDP server for listening in on a user-specified UDP port; useful for debugging

docs\6LoWPAN

- Whitepapers related to 6LoWPAN

docs\Company

- Information about Arch Rock Corporation.

docs\Kernel\DATASHEET.pdf

· a 1-page technical datasheet for the Arch Rock software distribution

docs\Kernel\Reference_Manual\html\index.html

- HTML version of the ASD API documentation

docs\Kernel\Reference_Manual\refman.pdf

- PDF version of the ASD API documentation

docs\QuickStart\QUICKSTART.htm

- A walkthrough on flashing the demo binaries and getting the Arch Rock 6LoWPAN Windows Service to work

docs\UsbStick\AVRRZUSBSTICK_SETUP_GUIDE.htm

- Setup guide for the AVRRZUSBSTICK dongle and Arch Rock 6LoWPAN Windows Service

include\

- Arch Rock 6LoWPAN kernel library header files

lib\raven\

- Arch Rock 6LoWPAN kernel library

projects\doc\doc_main.html

- HTML documentation for the tutorials of the ASD API

projects\include

- C header files common to all tutorial sample code

projects\lib

- Pre-built libraries common to all tutorial sample code

projects\libc

- Source code common to all tutorial sample code

projects\lcd

- Source code and project file for the LCD tutorial lesson

projects\ping

- Source code and project file for the ping tutorial lesson

projects\tcpEcho

- Source code and project file for the TCP Echo server tutorial lesson

projects\shell

- Source code and project file for the shell tutorial lesson

# 6 Support and update

Please visit http://support.archrock.com/asd for technical support and updates.