Skip to content

RT-Thread-packages/onenet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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