Code Monkey home page Code Monkey logo

deviceserver's Introduction

Imagination Technologies Limited logo


License (3-Clause BSD)

LWM2M device management server


The Creator device server is a LWM2M management server designed to be implemented alongside third party cloud services to integrate M2M capability into an IoT application. The device server exposes two secure interfaces; REST API/HTTPs and LWM2M/CoAP, and implements DTLS and provides the application interface portion of the Creator IoT framework. A top level view of the Creator IoT framework is available on our docs site.

The device server interfaces securely with LWM2M device networks via the Constrained Application Protocol (CoAP) and aids device and application interoperability by supporting both IPSO registered smart object definitions and custom object definitions.

Device management is enabled through the implementation of the Open Mobile Alliance LWM2M standard. The CoAP interface and all LWM2M functionality is abstracted by the device server libraries, so intimate knowledge of LWM2M and CoAP is not required.

Web and mobile applications interface with the device server via an authenticated REST API with a single entry point URL.

Since LWM2M relies on CoAP for communications, the device server acts as a bridge between the CoAP and HTTP protocols, allowing devices and applications which are outside the LWM2M device network to query resource and connectivity data using HTTP via the device server's REST API. No resource states are cached by the server, so all resource queries are propagated via CoAP directly to the targeted device/s. The device server does cache client connectivity status however, so this data is returned directly.

The CoAP Observe verb is supported by registering (subscribing to) an observation with the device server which will POST a notification to a specified web hook when the value or state of the observed resource meets the desired criteria.


Getting started

A publicly available instance of the Creator device server is online at deviceserver.creatordev.io, you'll find a management console at console.creatordev.io and examples that combine the use of the Creator device server with the AwaLWM2M client libraries at docs.creatordev.io.

User guide

For an introduction to the device server, stand-alone installation details, use of the REST API, client/device authentication and examples of common operations, see our user guide.


Contributing

We welcome all contributions to this project and we give credit where it's due. Anything from enhancing functionality to improving documentation and bug reporting - it's all good.

Find out more in the contributor guide.

Credits

We would like to thank all of our current contributors.

Special thanks to the DTLS.Net team.

Development tasks

A list of ongoing development tasks can be seen here.

Creator IoT framework


License information.




deviceserver's People

Contributors

boyvinall avatar cheekyhalf avatar delmet avatar haydenb-img avatar mtusnio avatar tonywalsworthimg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deviceserver's Issues

observation webhooks are triggered too often

Observation webhooks are triggered every time Awa client is doing registration update even though observed resource hasn't change. This happens even when "Pmax" attribute is set to large value.

Is this project currently being supported?

Hi,

I see your website is down. I am interested in using your platform for connecting openthread devices. openssl verify always fails while following the doc.

error 24 at 1 depth lookup: invalid CA certificate
error LWM2MBootstrap.pem: verification failed
error 24 at 1 depth lookup: invalid CA certificate
error LWM2MServer.pem: verification failed

Also, any plans on open sourcing management console?

Cannot verify certificates

Following https://github.com/CreatorDev/DeviceServer/blob/master/doc/devServerInstallation.md I cannot generate proper certificates. Error I'm getting:

mkmk88@mkmk88-VirtualBox:~/devel/creator/DeviceServer/docker/ds$ openssl verify -verbose -CAfile <(cat Root.pem CA.pem) LWM2MBootstrap.pem
C = PL, ST = Wroclaw, O = img_img, OU = img_img, CN = localhost, emailAddress = [email protected]
error 24 at 1 depth lookup: invalid CA certificate
error LWM2MBootstrap.pem: verification failed

i'm using Ubuntu Xenial.

BTW, some time ago when I tried this I got following error:

$ openssl verify -verbose -CAfile <(cat Root.pem CA.pem) LWM2MServer.pem

C = PL, ST = Some-State, O = Internet Widgits Pty Ltd, CN = lwm2m
error 7 at 0 depth lookup: certificate signature failure
error LWM2MServer.pem: verification failed
139723596171008:error:0D0C5006:asn1 encoding routines:ASN1_item_verify:EVP lib:crypto/asn1/a_verify.c:174:

What am I missing?

Consul health check breaks webservice-deviceserver?

Maybe I missed something obvious in configuration but the Device Server doesn't work for me. I use Ubuntu 16.04 and configured everything as described in Readme file of this project (running docker-composer). I've then tried to run tests from https://github.com/CreatorDev/creator-js-client and both have failed.

Here's my investigation:
Firstly, the assumption: Fabio can only route to services that are "passing" Consul's health check.
Now, accessing Webservice sometimes results with error 404 and sometimes with error 502. If the status of webservice-deviceserver in consul is "not passing" then Fabio reports "no route to host" and I'm getting 404. When the route is found (webserivce-deviceserver passes health check) I'm getting error 502 and Fabio reports http request error "EOF". Note, if the Consul's health check fails then Fabio's route to it is simply removed.
Consul checks webservice-deviceserver every 2 seconds by issuing GET request to "/". When sniffing with Wireshark I could observe that some requests are accepted by webservice and then proper JSON with "links" is returned, but sometimes the connection itself is refused (webservice responds with tcp RST packet). In that case, the "EOF" (which is not EOF but simply connection refused error) is seen in logs of Consul and Fabio.
When issuing POST request from creator-js-client tests similar problem is observed. If the route in Fabio is present then connection to webservice is closed just after establishing it (FIN packet just after ACK-SYN-ACK packets is sent). If the route is not present at all I'm getting error 404.
I did a little hack to verify the behavior. I've modified Registrar env variables in docker-composer.yml that way so it doesn't use request to "/" as a health check but instead a dummy script that always succeeds. When webservice is not spammed with health check requests suddenly the creator-js-client tests are passing. However, the first try of tests still fails (FIN packet sent from webservice just after connection) all other requests are handled properly.
I have no idea how the ASP Net works internally, so please have a look/comment. From my observation the conclusion is that the webservice-deviceserver refuses TCP connections some times, especially when it is spammed with Consul health checks.

Looking for documentation etc.

Hi, I know this repo is old and hasn't been updated in a long time.
Still I'm trying to use this for a PoC.

I have the resources in the docker compose running and I'm able to register clients.
Also I can access and use the API.

Questions I have at the moment:

For anyone visiting this issue and wondering why you get 4.06 Not Acceptable when requesting objects from the device; the CONTENT_TYPE_TLV is out of date, it should be 11542.

That's it for now, thanks in advance to anyone caring to help.

PageInfo uses strings under object instances

Requesting https://deviceserver.creatordev.io/clients/_client_/objecttypes/_object_/instances gives a PageInfo which has strings, not integers:

{
    "Links": [
        {
            "rel": "add",
            "href": "https://deviceserver.creatordev.io/clients/mxYicHnSuEKsjJ3H2bHkxw/objecttypes/vOhduQKdtUyHbUHOzGbt9Q/instances"
        }
    ],
    "PageInfo": {
        "TotalCount": "1",
        "ItemsCount": "1",
        "StartIndex": "0"
    },
    "Items": [
        {
...

elsewhere, the TotalCount, ItemsCount and StartIndex are integer values.

Missing docker images

I cannot find the dockerfiles to build flowops/dockerconsul and flowops/dockerfabio as I do not have access to the Hemel docker registry. Are these available?

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.