Coder Social home page Coder Social logo

ismagom / lwm2m-galileo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from intel/liblwm2m

3.0 1.0 1.0 347 KB

galileom2m uses the LWM2M protocol to provide OTA and device management for the Intel Galileo Board.

License: BSD 3-Clause "New" or "Revised" License

C 99.26% CMake 0.74%

lwm2m-galileo's Introduction

This is a fork of liblwm2m by David Navarro (https://github.com/01org/liblwm2m). 

Galileom2m
----------

galileom2m uses the LWM2M protocol to provide OTA and device management for the Intel Galileo Board.

Summary of changes:
 * Fixed some warnings in the original code. 
 * Defined an object API for easy setup of objects and its resources. 
 * Added applications object, aimed at providing OTA software reconfiguration. 
 * Added a timer that runs functions to update the status of objects. 
 * Uses GPIO interface to obtain values of solar panel and VBAT voltage from the Solar Panel shield v2.0. 
 VBAT pin and Solar panel should be connected to A0 and A1 pins respectively.
 
OTA
====

To perform an OTA, need to WRITE to the applications object instance
1) WRITE application name
2) WRITE application URL
3) EXEC application Download
4) WRITE application args
5) EXEC application Run

Application status is obtained by reading application Status or Error code resources. 

It requires tftp and start-stop-daemon commands. 


Follow the instructions below for compiling and usage. 


liblwm2m
=========

liblwm2m is an implementation of the LWM2M protocol from the Open Mobile Alliance.

Source Layout
-------------

-+- core                (the LWM2M engine)
 |
 +- externals
 |    |
 |    +- er-coap-13     (Erbium's CoAP engine from http://people.inf.ethz.ch/mkovatsc/erbium.php,
 |                       modified to run on linux)
 |
 +- tests               (example and test application)
      |
      +- client         (a command-line LWM2M client with two test objects)
      |
      +- server         (a command-line LWM2M server)
      |
      +- TLV            (application decoding two hard-coded TLV buffers)
      |
      +- utils          (utility functions for command-line interface)


Compiling
---------

Despite its name, liblwm2m is not a library but files to be built with an application. liblwm2m
uses CMake. Look at tests/server/CMakeLists.txt for an example of how to include it. 
Two compilation switches are used: LWM2M_CLIENT_MODE and LWM2M_SERVER_MODE.

Define LWM2M_CLIENT_MODE to enable LWM2M Client interfaces. Define LWM2M_SERVER_MODE to enable
LWM2M Server interfaces. Both can be defined at the same time.


Testing
-------

To compile the test server
 - - - - - - - - - - - - -

In the any directory, run the following commands:
    cmake [liblwm2m directory]/tests/server
    make
    ./lwm2mserver

The lwm2mserver listens on UDP port 5684. It features a basic command line interface. Type 'help' for
a list of supported commands.


To compile the test client
 - - - - - - - - - - - - -
  
In the any directory, run the following commands:
    cmake [liblwm2m directory]/tests/client
    make
    ./lwm2mclient


The lwm2mclient opens udp port 5683. You can connect to it by installing the firefox plugin Copper
(http://people.inf.ethz.ch/mkovatsc/copper.php) and opening a new Firefox tab to: coap://[::1]:5683
At launch, lwm2mclient tries to register to a LWM2M Server at [::1]:5684. It features a basic command
line interface. Type 'help' for a list of supported commands.

lwm2m-galileo's People

Contributors

ismagom avatar jvermillard avatar

Stargazers

Jingfei Chen avatar Niall McCormack avatar Huaqi Fang avatar

Watchers

 avatar

Forkers

ericchen2013

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.