Code Monkey home page Code Monkey logo

workshop-6lowpan's Introduction

Decentralized architectures & sensor networks in IoT: 6LoWPAN, border routers and gateways

Introduction

This repository contains the code used for the 6LoWPAN workshop by relayr.

Requirements

The requirements willvary depending if you are in Linux, Mac or Windows.

Linux setup

For Debian based systems (Debian, Ubuntu, Mint, etc.) these are the steps.

  1. Get the basic tools for C based development:
apt-get install build-essential automake gettext
  1. Get the compiler and supporting libraries:
apt-get install gcc-arm-none-eabi libnewlib-arm-none-eabi
  1. Get git:
apt-get git
  1. See if have permissions to access serial devices:
groups | grep dialout
if the `dialout` groups appears then you are already in the group,
if nothing is printed, this means that you need to add yourself to
the group.
sudo adduser <your username> dialout
where `<username>` is your username. You have to **logout** and
**login** again for the change to take effect.
  1. Done.

Mac Os X Setup

  1. The first thing you'll need is the gcc-arm-embedded compiler. There are two possibilities for getting the compiler:

    1. Add the brew repository for the gcc-arm-embedded compiler.

      brew tap PX4/homebrew-px4
      brew update
    2. Install the gcc-arm-embedded` compiler.

      brew install gcc-arm-none-eabi
      
    • Installing the compiler without brew.
    1. Go to https://launchpad.net/gcc-arm-embedded and download the Mac installation tarball.

    2. Make a directory to install it. Is up to you to decide how to organize your filesystem. Our suggestion is to put it under /usr/local:

      mkdir /usr/local/gcc_arm
    3. Unzip the tarball downloaded in 1. and move it to the above created directory.

    4. Add the path to the compiler to your PATH shell variable so that you are able to compile code using the ARM GCC in any directory.

      export PATH="$PATH:/usr/local/gcc_arm/gcc-arm-none-eabi-<version>/bin"
      

      where <version> is the version of ARM GCC you downloaded in 1.

  2. Now you should be able to from any directory do:

    arm-none-eabi-gcc --version
    

    and get the version of the ARM GCC.

  3. Note that depending on your particular setup you might have already an ARM GCC, it might work with the workshop code or not, so we advise to always update ARM GCC to the latest available version.

  4. Get the driver for the USB to TTL adapter.

  5. In Mac you should already have Python available, to make it easier to get new packages we'll use `pip. We need the pySerial module.

    sudo pip install pyserial 
    
  6. As a final step get XCode so that we have a properly setup development environment (git, make, other gcc, etc).

  7. Done.

Windows setup

To make things work in Windows you'll need to install the Minimal Gnu Windows environment (MinGW). If you already have it in your system then you don't need to set it up.

  1. Go to mingw.org and download the installer.

  2. Follow the instructions to install MinGW.

  3. Get the Windows version of the gcc-arm-embedded` compiler at https://launchpad.net/gcc-arm-embedded.

  4. If you don't have Python you need to get it from the Python site.

  5. We need the pySerial module. shell pip install pyserial

  6. Install the Git for Windows SDK.

  7. Done.

Getting the code on to the board

The repository uses git submodules in order to include the Contiki repository inside.

  1. Clone the repository:

    git clone --recursive [email protected]:relayr/workshop-6lowpan.git
    
  2. Go to the workshop directory:

    cd workshop
    
  3. Build the executable:

    make TARGET=zoul BOARD=firefly
    
  4. Connect the board to the USB of your computer.

  5. Upload the code to the board:

    make TARGET=zoul BOARD=firefly er-server.upload

Using the code examples

All the code examples are in the workshop directory. The instructions on how to use them are on the README.

workshop-6lowpan's People

Contributors

perusio avatar christoszac avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.