Source Code

License

/* 
 * Copyright (c) 2010-2014, Regents of the University of California.
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *  - Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 *  - Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 *  - Neither the name of the Regents of the University of California nor the
 *    names of its contributors may be used to endorse or promote products
 *    derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

Source Code

All the source code of the OpenWSN project lives at https://github.com/openwsn-berkeley.

homepageGit URLdescription
https://github.com/openwsn-berkeley/openwsn-fwgit@github.com:openwsn-berkeley/openwsn-fw.gitfirmware: stuff that runs on a mote
https://github.com/openwsn-berkeley/openwsn-swgit@github.com:openwsn-berkeley/openwsn-sw.git software: stuff that runs on a computer
https://github.com/openwsn-berkeley/openwsn-hwgit@github.com:openwsn-berkeley/openwsn-hw.git hardware: boards and other designs
https://github.com/openwsn-berkeley/openwsn-utilsgit@github.com:openwsn-berkeley/openwsn-utils.git utilities: stuff that doesn't fit anywhere else

GitHub Interface

If you don't want to install Git, you can use the web interface to:

  • download the full source code as a single zip file
     
  • explore the source code directly on the web interface
     

Download Using Git

Using Git, you will be able to update your copy of the code easily. You need to use Git if you plan on contributing to the project.

Prepare GitHub

For authentication, GitHub requires you to create a public/private key pair on your computer, and upload your public key.

 Create a public/private key pair on Windows.

We recommend using PuTTYgen, a utility of the popular PuTTY SSH client.

  1. Download puttygen.exe from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.

  2. Follow the steps highlighted in the following pictures. You should end up with a public and private key.

 Create a public/private key pair on Linux.

Linux typically comes with the tools to manage (and create) public/private keys.

 

  1. Open a terminal
  2. Create a public/private pair of ssh keys:

    $ssh-keygen -t rsa
  3. Go to the folder ~/.ssh:

    $cd ~/.ssh
  4. Make sure that this folder contains the two following files:
    • id_rsa: your private key.
    • id_rsa.pub: your public key.

Once you have you public/private key pair:

  1. Create an account on https://github.com/.
  2. Log into that account.
  3. Navigate to Account SettingsSSH Keys.
  4. Add your public key to your GitHub account. You may need to add "ssh-rsa" in front of you public key file.
    That is, if your public key file contains:

    AAAAB3NzaC1yc2EAAAABJQAAAIBooijVwz//9T9irhiaJ7+/x8TXH/wcG1M329N7
    T1SGeb58RQvOfJK5CbT9w6FpqRboYOA4YKg2FlZX7ZHkV8c8cl5DDZQWu0GG7rC4
    A0MAreWYV7G/6pedLfMisEwUNfWj270Kz+a7mh+8h2qAYkJmjrl13xIn6wZabH43
    Oa9Rmw==

    Enter the following into your GitHub account:

    ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIBooijVwz//9T9irhiaJ7+/x8TXH/wcG1M329N7
    T1SGeb58RQvOfJK5CbT9w6FpqRboYOA4YKg2FlZX7ZHkV8c8cl5DDZQWu0GG7rC4
    A0MAreWYV7G/6pedLfMisEwUNfWj270Kz+a7mh+8h2qAYkJmjrl13xIn6wZabH43
    Oa9Rmw==

Install Git

Git is a standard protocol for accessing source code. Any Git client will work, below are a few suggestions.

On Windows

 Using TortoiseGit.
  1. Download and Install msysgit. This is the core Git client developed at http://git-scm.com/.
     
  2. Download and Install TortoiseGit. This is a graphical interface to msysgit which integrates nicely into Windows Explorer.
     
  3. Create a folder where OpenWSN repositories will be cloned, e.g. C:\Users\my_username\Documents\openwsn.
  4. Open that folder and right-click in the empty contant, select Git Clone.
  5. In the Git Clone window:
    • Enter the Git URLs of the repository you want to clone (see list in table above).
    • Check Load Putty Key and browse to your private key.
 Using GitHub's client.
  1. TODO
 Using (command-line) Git.
  1. TODO

On Linux

 Using the command line.
  1. Install Git. In Ubuntu, type:

    $sudo apt-get install git-core
  2. On your computer, create a folder where OpenWSN will be cloned, e.g. /home/my_user/openwsn.

  3. Navigate to this directory:

    $cd /home/my_user/openwsn
  4. Clone the repositories you want to download by entering their Git URLs (see list in table above). For example, to download the OpenWSN firmware:

    $git clone git@github.com:openwsn-berkeley/openwsn-fw.git