Coder Social home page Coder Social logo

palmaitem / 6lochar Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 30 KB

Kernel module to create a fake 6LoWPAN interface that connects to a character device for sending a receiving frames. Includes a user-space connector example for a serial radio.

License: GNU General Public License v3.0

C 93.00% Makefile 2.39% Shell 4.61%

6lochar's Introduction

6lochar

Kernel module to create a fake 6LoWPAN interface that connects to a character device for sending a receiving frames.

Tested with 4.x.y Linux Kernel releases.

Why?

Even though 6LoWPAN is mostly used for IEEE 802.15.4 devices, other devices/radios can also benefit from the defined compression mechanisms.

The goal of this project was to demonstrate 6LoWPAN over a resource-constrained VHF link under the scope of the H2020 MSCA IF SINet project

How?

This kernel module registers a character device that can be read or written into, which in turn reads and writes 802.15.4 frames from and to the created wpan interface.

More details on why and how available on https://sinet.item.ntnu.no

Getting started

Load Module

Simply compile the kernel module with make and run ./load_module.

This should create a new lowpan interface with a random short address in the pan_id 0xbeef.

The load_module script loads the compiled kernel module and searches the last 5 lines for the path of the registered character device that will used for communication with the 802.15.4 stack. After creating the character device a new lowpan interface is added to wpan0.

Caveats

  1. The script "assumes" that no other wpan0 device already exists and should be adapted otherwise.

  2. Sometimes the Kernel never creates an initial address to the lowpan interface and the cause is unknown. In this event an error will be returned by iproute when running ./load_module. In this case, the only solution is to unload and load the module again.

  3. Caveat number 2 is only relevant when full IPHC is desired, otherwise it works fine despite the error.

Connect 6lochar to a radio/application

To connect the newly created interface to a radio or even an application reading and writing IEEE 802.15.4 frames, in the folder utils a connector example can be found and used as inspiration.

Specifically, this example provides the option to connect to the OWL radio, using the NGHAM-SPP protocol in the serial port /dev/ttyUSB0, if completed with a parser for NGHAM-SPP frames.

To-do list

Apart from a better organisation of some structures, the character device creation follows an outdated method, and should be changed.

6lochar's People

Contributors

palmaitem avatar

Watchers

 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.