Git Product home page Git Product logo

onenet's Introduction

OneNET

中文页 | English

1. Introduction

OneNET The platform is an ecological platform built by China Mobile based on the Internet of Things industry. It has high concurrency, multi-protocol access, rich API support, secure data storage, and fast application Incubation and other features. At the same time, OneNET platform also provides all-round support to accelerate the development of user products.

The OneNET software package is an adaptation of RT-Thread to the OneNET platform connection. Through this software package, devices can be easily connected to the OneNet platform on RT-Thread to complete data transmission, reception, device registration and control, etc. Features.

The software package has the following advantages:

  • Reconnect after disconnection
  • Automatic registration
  • Custom response function
  • Customize the callback function corresponding to topic and topic
  • Upload binary data

For more introduction, please see Detailed introduction

1.1 Directory structure

OneNETREADME.md // Software package instructionsSConscript // RT-Thread default build script
├───docs
│ └───figures // Documents use pictures
│ │ api.md // API instructions
│ │ introduction.md // Detailed introduction of the software package
│ │ principle.md // Implementation principle
│ │ README.md // Document structure description
│ │ samples.md // package sample
│ │ user-guide.md // Instructions
│ │ port.md // Porting instruction document
│ └───version.md // version
├───ports // transplant files
│ └───onenet_port.c // Porting file template
├───samples // sample code
│ └───onenet_sample.c // Software package application sample code
├───inc // header file
└───src // source file

1.2 License

OneNET package complies with GUN GPL license, please refer to LICENSE file for details.

1.3 Dependency

2. How to obtain

To use OneNET package, you need to select it in the package management of RT-Thread. The specific path is as follows:

RT-Thread online packages
    IoT-internet of things --->
        IoT Cloud --->
            [*] OneNET: China Mobile OneNet cloud SDK for RT-Thread

Enter the configuration menu of the onenet software package to configure as shown in the figure below, and fill in the information according to the actual situation of your product and equipment

--- OneNET: China Mobile OneNet cloud SDK for RT-Thread
    [] Enable OneNET sample
    [*] Enable support MQTT protocol
    [] Enable OneNET automatic register device (NEW)
    (35936966) device id
    (201807171718) auth info
    (H3ak5Bbl0NxpW3QVVe33InnPxOg=) api key
    (156418) product id
    (dVZ=ZjVJvGjXIUDsbropzg1a8Dw=) master/product apikey (NEW)
        version (latest) --->

Enable OneNET sample: Open OneNET sample code

Enable support MQTT protocol: Enable MQTT protocol to connect to OneNET support

Enable OneNET automatic register device: Enable OneNET automatic register device function

device id: Configure the device ID obtained when creating a device in the cloud

auth info: Configure user-defined authentication information when creating products in the cloud (unique per device for each product)

api key: Configure the APIkey obtained when creating a device in the cloud

product id: Configure the product ID obtained when creating a product in the cloud

master/product apikey: Configure the product APIKey obtained when creating a product in the cloud

After the configuration is complete, let the RT-Thread package manager automatically update, or use the pkgs --update command to update the package to the BSP.

3. Use OneNET software package

  • For detailed sample introduction, please refer to Sample Document.

  • How to use it from scratch, please refer to User Manual.

  • For complete API documentation, please refer to API Manual.

  • For the working principle of OneNET software package, please refer to Working Principle.

  • OneNET software package migration, please refer to Porting Manual.

  • More detailed introduction documents are located in the /docs folder, Please check before using the package for development.

4. Matters needing attention

  • The auto-registration function is not enabled, and the information such as device id, api key, product id, and auth info configured in the menuconfig option needs to be consistent with the information obtained when creating a new product and new device in the OneNET cloud.
  • After enabling the automatic registration function, you need to read the migration manual and complete the migration work.
  • The device must be connected successfully before initializing the OneNET package.

5. Contact & Thanks

onenet's People

Contributors

armink avatar cndabai avatar guozhanxin avatar lawlieta avatar liangyongxiang avatar loogg avatar misonyo avatar xiangxistu avatar yangjie11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

onenet's Issues

内存边界不为0,使用strlen读取长度不正确

onenet_mqtt.c - L: 404

   *out_buff = ONENET_MALLOC(strlen(msg_str) + 3);
    if (!(*out_buff))
    {
        LOG_E("ONENET mqtt upload string data failed! No memory for send buffer!");
        return -RT_ENOMEM;
    }

    strncpy(&(*out_buff)[3], msg_str, strlen(msg_str));
    *length = strlen(&(*out_buff)[3]);

*length 如此使用strlen存在很大隐藏风险

关于ota

onenet平台现支持OTA,是否有意向添加OTA

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.