# Arch Rock IP/6LoWPAN Software Distribution (ASD)

### 1.0.0

## Introduction

This distribution provides kernel library APIs for developers to create applications using Arch Rock embedded IPv6/6LoWPAN technology. Wherever applicable, the interfaces are designed to be as close to the well-known Unix socket interfaces as possible.

The kernel library goes beyond 6LoWPAN and supports some common set of protocols above IPv6 as well as some common embedded operating systems functionality that are useful for simplifying application development.

The kernel provides a single-thread event or callback driven concurrency model. It does not support dynamic memory allocation. Please refer to Concurrency Model and Memory Handling and Allocation sections for details.

The following shows the overview diagram of the kernel library, which includes the following major API components.

- Kernel Services and interrupts: reboot and power management control, or other kinds of network or processor notifications via svcs.h, async.h, and platform.h.
- EEProm Management: provide access to the internal/on-chip eeprom storage, which is shared with the kernel. This is platform dependent and is supported via flash.h
- Timers and Time Services: provide interval timer abstractions, get time of day services if synchronized with Arch Rock gateways via time.h.
- Ping6: ability to initiate ICMP ping request via icmp.h
- TCP/IPv6: supports Transmission Control Protocol (TCP) over IPv6 via socket.h.
- UDP/IPv6: supports User Datagram Protocol (UDP) over IPv6 via socket.h.
- Route Table Management: ability to set static routes and access the routing table via route.h.
- Wireless 15.4 Radio Configuration: abstract the 15.4 radio with a familiar network interface card abstraction via iwconfig.h.

Overview Diagram

The kernel also supports a set of features not directly exposed through the APIs.

- Power Management: the kernel automatically manages the power of the processor and the 15.4 radio.
- ICMPv6 Server: respond to different ICMPv6 requests.
- AR Network Management: network-level management services with Arch Rock gateways.
- Triply Redundant Meshing: self-configure IPv6 meshing over 6LoWPAN.
- Over-the-Air Software Update: this depends on the platform such as the existence of an external flash to store programs.

For driver development, we try not to provide a hardware abstraction layer for the on-chip I/O peripherals. This gives developers maximum flexibility in configuring the I/Os for their desire purposes. They can either service the corresponding interrupts that they have setup to interface with the sensors or busy wait inside a callback handler from the kernel library.

A driver is usually written in two parts. One is within the interrupt context, where fast actions are required to be serviced. Heavy processing will continue in the application level context by scheduling a callback through the scheduler, as indicated in the diagram above. See Interrupt Context for details.

Interface Design Overview

Function overview

ASD Tutorials