Author: Ma Zhi
IoT Think Tank Compilation and Release
Please indicate the source and origin when reprinting
—— [Introduction] ——
The IoT Think Tank will push out a series of articles written by Mr. Ma Zhi every Friday afternoon in the second article——“Exploring IoT Platforms”.
The IoT Think Tank will push out a series of articles written by Mr. Ma Zhi every Friday afternoon in the second article—— “Exploring IoT Platforms”
—— Domestic ——
(1) Baidu IoT Hub Access
(2) Alibaba Cloud IoT Suite
(3) QQ IoT · Intelligent Hardware Open Platform
(4) JD Micro Link
(5) Gizwits Cloud IoT Cloud Service Platform and Intelligent Hardware Self-Development Platform
(6) Qingke Cloud FogCloud
(7) Ablecloud IoT Self-Development and Big Data Cloud Platform
(8) China Mobile IoT Open Platform OneNet
—— Foreign ——
(1) Amazon AWS IoT
(2) Microsoft Azure IoT
(3) IBM Watson IoT
Today is the fourth part of this series, introducing Gizwits Cloud IoT Cloud Service Platform and Intelligent Hardware Self-Development Platform.
Platform Positioning
The Gizwits Cloud Platform is an open platform dedicated to IoT and intelligent hardware cloud services. The platform provides capabilities covering the entire lifecycle of intelligent hardware access, from product definition, device-side development and debugging, application development, product testing, to operational management.
The Gizwits Cloud Platform provides developers with self-service intelligent hardware development tools and open cloud services. Through user-friendly tools, continuously enhanced SDKs, and API service capabilities, it minimizes the technical barriers to IoT hardware development, reduces R&D costs, enhances developers’ product launch speed, and helps developers upgrade hardware intelligence, better connecting and serving end consumers.
Product Features
Tool Services
Architecture
-
Gizwits Cloud
The Gizwits Cloud provides functions such as product definition, product data point definition, virtual device debugging, M2M services, and API services. It provides cloud services for device and application access.
-
GAgent
The device-side module system GAgent allows developers to quickly connect devices using the protocol provided by Gizwits Cloud. It is currently compatible with mainstream domestic Wi-Fi modules and mobile network modules.
-
IOT SDK
Gizwits Cloud provides IOT SDKs based on iOS and Android systems, allowing developers to quickly implement APP development and seamlessly connect to Gizwits Cloud, and gradually obtain new services launched by the Gizwits Cloud platform according to the SDK.
R&D Process
Technical Solutions
Concept Explanation
-
GAgent: Full name Gizwits Agent, runs on Wi-Fi modules, and devices access the Gizwits Cloud server through GAgent. It is currently compatible with mainstream domestic Wi-Fi modules, and developers can also obtain the GAgent secondary development package to implement custom module access to Gizwits Cloud.
-
Small Loop: Communication within the local area network between smart devices and mobile phones, or between smart devices, achieved by connecting to the same router (checking status or controlling), referred to as a small loop.
-
Large Loop: Smart devices connect to the internet through routers or directly to achieve remote monitoring and control by users, referred to as a large loop.
-
ProductKey: Product identification code, a 32-bit string automatically generated after developers create a new product in the Gizwits Cloud background. It is a unique number in the Gizwits Cloud database, allowing the Gizwits Cloud to identify and automatically register the device.
-
DID: Device number, when a device first accesses Gizwits Cloud, it automatically registers a did based on the ProductKey and the device’s Wi-Fi module MAC address. This did is unique across the network and is used for binding with users and subsequent operations.
-
PassCode: Device passcode, used to verify the user’s binding/control permissions. When a user initiates device binding, as long as it is a legitimate operation, this passcode can be obtained to bind the device and perform operations such as viewing and controlling within the validity period. A random number is generated as the device passcode when GAgent first runs, which is then saved in non-volatile storage. The device must report it to the server when it goes online.
-
AppID: Application identification code, automatically generated when developers need to develop applications (including iOS, Android, Web applications, etc.) for a smart product, and associated with this device. This AppID needs to be filled in during application development.
-
Onboarding: Also known as network configuration, the process of configuring a Wi-Fi-based IoT device to connect to the router is called onboarding. When a new device is first used, it needs to know the router’s account and password to connect to the internet through the router. Since most IoT devices do not have built-in screens and keyboards, it is necessary to send the router’s SSID and password to the device via a smartphone, a process referred to as onboarding by Gizwits Cloud. The Wi-Fi device access SDK provided by Gizwits Cloud has already built-in this configuration function.
-
AirLink: Gizwits Cloud refers to various SmartConfig, SmartLink UDP broadcast methods for device configuration as AirLink technology, which is compatible with configuration protocols from multiple Wi-Fi module manufacturers and summarizes a standard onboarding operation process with a good user experience. Gizwits Cloud’s Wi-Fi device access SDK has built-in AirLink technology.
-
SoftAP: Since the Smart Config protocols of various Wi-Fi module manufacturers are not yet fully mature and do not support 5G router signals, Gizwits Cloud supports SoftAP mode for configuring devices to connect to routers while providing AirLink configuration mode. When the device enters SoftAP configuration mode, it becomes an AP, allowing smartphones to connect directly to the device and input the router’s SSID and password on the phone interface. The device will automatically attempt to connect to the router when it receives the information, switching to normal use mode upon successful connection.
Key Concept – Data Points
-
The Gizwits Cloud and APP analyze and process the data reported by the device, or analyze and process the data sent from the Gizwits Cloud and APP to the device, provided both parties clearly understand the meaning of the data. The Gizwits Cloud background provides a data point definition interface, allowing the meaning of data communication between devices and the cloud, and APP to be clarified through data point definitions.
-
Benefits of data point definitions:
1. Clarifies the meaning of data communication between devices and the cloud, and APP.
2. The cloud parses device data based on data point definitions, allowing users to use functions such as “device operating status,” “statistical analysis,” etc.
3. Gizwits Cloud has big data statistical interfaces, allowing for rapid analysis of device data through the interface.
4. Facilitates APP developers, as the APP SDK can parse sent/received device data.
5. Facilitates MCU development, as Gizwits Cloud generates detailed serial communication protocols for MCU communication with GAgent based on data point definitions.
Cloud Management – Product Definition
1. Create Product
2. New Device Access Wizard
Cloud Management – Edit Data Points
3. Create and generate product data points through template schemes
4. Create and generate product data points through template schemes
5. Manually edit product data points
6. Create new data points
Cloud Management – Generate MCU Development Documentation
7. Based on the previously added product data points, the page automatically generates the “XX-Gizwits Cloud Access Serial Communication Protocol Document” and “XX-Gizwits Cloud Access JSON Document” (where XX represents the product name). Click on the document name to download it, and hardware developers can easily complete hardware development according to the document instructions.
Cloud Management – Device Debugging
Native APP: Product development resources provide Android and iOS SDK, integration documents, and Demo APP downloads.
After completing the product data point editing and the hardware device has been developed, you can download the corresponding SDK to integrate it into the mobile application with completed interface design to control the device. You can also directly download and install the Demo App, log in, and connect to view and control the device. If the device has not been developed, you can use the virtual device provided by Gizwits Cloud for functional debugging.
Light APP: Using the Open APIs (Http / WebSocket) provided by Gizwits Cloud, you can quickly develop web pages or WeChat applications and other HTML-based light applications for managing and controlling smart devices.
Cloud Management – Create Products through Template Schemes
Template Scheme List
Application Scheme Template
Cloud Management – Product Management
Product Information View
Product Information Edit
Device Data Point Management
Virtual Device Management
Device Operating Status
Cloud Management – APP Application Management
APP Application List
Create Application
Device Access Applications:
Binding applications means associating devices with applications so that applications can bind and control devices.
Configure Message Push:
The Gizwits Cloud Android/iOS application supports integration with “Baidu Cloud Push” and “Aurora Push.” Before integration, message push needs to be configured, binding the application with Baidu Push or Aurora Push.
Device-Side Development – Principles
Device-side development includes GAgent and MCU development. Devices must connect to the cloud to enable remote viewing and control by APPs and other clients; MCU data interacts with Gizwits Cloud through GAgent.
GAgent: An application that runs on network-accessible modules (Wi-Fi, GPRS), allowing modules to access Gizwits Cloud servers and upload/receive data.
MCU: Microcontroller unit, the manufacturer’s device controller, such as a microcontroller.
Device-Side Development – Cooperative Modules
Device-Side Development – MCU Programming Steps
-
Download the MCU and GAgent serial communication protocol
-
Create a project, complete the definition of product data points, and Gizwits Cloud automatically forms the MCU and GAgent serial communication protocol based on data points.
-
Refer to the MCU program of the GoKit development kit based on the MCU and GAgent serial communication protocol to complete communication between MCU and GAgent.
-
Gizwits Cloud provides device-side debugging tools
-
Gizwits Cloud provides device factory testing mode for manufacturers to inspect devices
-
Gizwits Cloud can manage MCU firmware and perform OTA upgrades
-
Gizwits Cloud conducts statistical analysis of data exchanged between MCU and the cloud
Device-Side Development – GAgent
For Wi-Fi devices, Gizwits Cloud has adapted mainstream Wi-Fi modules. After burning the firmware provided by Gizwits Cloud into the Wi-Fi module, the device can connect to the cloud.
For cellular network devices (GPRS), GAgent has been ported by GPRS module manufacturers cooperating with Gizwits Cloud, allowing connection to the cloud using the cooperating manufacturers’ GPRS modules.
For Android and other systems, Ethernet devices, etc., Gizwits Cloud provides SDK (i.e., GAgent), allowing developers to connect devices to the cloud after porting the SDK’s underlying drivers.
Application Development – Principles
Gizwits Cloud currently provides three sets of SDKs:
-
Native SDK for iOS platform
-
Native SDK for Android platform
-
APICloud cross-platform SDK
Developers can choose according to project needs. The APICloud version SDK can be developed once using H5 technology while adapting to both iOS and Android platforms.
Application Development – APP Solutions
Native SDK:
Mainly helps developers maintain the user system through SDK interface calls, manage the binding relationship between users and devices, configure devices for online use, and obtain and send control commands for device status. Developers using the SDK do not need to redevelop the interaction between the APP and devices and the cloud, allowing for rapid product APP development based on product prototype definitions. Gizwits Cloud has also launched ten open-source projects, allowing for quick application of Gizwits Cloud SDK in APP development by downloading and studying the open-source project APP source code.
Cross-Platform Development:
To allow more enterprises, maker teams, and individual developers to enjoy the quality services and conveniences brought by Gizwits Cloud, partnerships with various excellent platforms have been established. The launch of the Gizwits Cloud mobile development module on the APICloud platform enables developers to write perfect cross-platform mobile applications using JavaScript + HTML.
Application Development – WeChat Solutions
Gizwits Cloud provides a WebSocket communication solution. Basic content of WebSocket communication: user login, receiving device online/offline messages, sending and receiving device business logic data, and heartbeat.
Manufacturers need to call the “User Management API” in an independently deployed WEB system to obtain identity qualifications, and then bind devices to control them. Manufacturers need to call the “Web Socket API” in the Javascript of the independently deployed WEB system to control devices and display device data in real time, allowing WeChat (web) applications to obtain device status data in real time, providing a better experience for end consumers.
Application Development – Device Manufacturer Business Cloud Development
The Noti interface receives device events, including fault and alarm events, data point editing events, device online/offline events, and device status events. Using the Noti interface allows real-time reception of the latest product data.
Application Development – Android APP Open Source Framework
-
Android open-source framework project source code link:
https://git.oschina.net/dantang/GizOpenSource_AppKit_Android
-
Android Gokit App is an example using the open-source framework project source code, source code link:
https://git.oschina.net/dantang/GoKit_Demo_Android
Application Development – Android Device Access SDK
-
The device access SDK (hereinafter referred to as SDK) encapsulates the communication process between mobile devices (including PADs) and Gizwits Cloud intelligent hardware, as well as the communication process between mobile devices and the cloud.
-
These processes include network configuration, discovery, connection, control, heartbeat, status reporting, alarm notifications, etc.
-
Using the SDK allows developers to quickly complete APP development, focusing only on the UI and UE design of the APP, while relatively complex protocols and error handling can be ignored.
Application Development – Device Access Process
The SDK has encapsulated all user, configuration, discovery, connection, and control processes, allowing developers to complete functional development in the above processes using these APIs without having to implement the communication protocol themselves.
The SDK operates in a callback manner, so necessary listeners must be set, such as general listeners and device listeners; please refer to the detailed process for specifics. The SDK callbacks to the APP in the main thread.
Android SDK supports passing objects between APPs in Activity and between Activity and Service.
Application Development – WeChat
Gizwits Cloud
As shown in Figure ①, in the WeChat access business scenario, the device functions are defined through the graphical interface of the developer center (site.gizwits.com), and Gizwits Cloud automatically generates the serial communication protocol between the device MCU and the communication module, allowing developers to implement device networking capabilities according to the protocol document.
As shown in Figure ②, after the device accesses Gizwits Cloud, Gizwits Cloud provides APIs for WeChat applications, enabling the transmission of device data to applications and control information initiated by applications to devices.
Manufacturer Server
The manufacturer server is an independently deployed WEB system by the manufacturer to meet the needs of its WeChat applications. This system communicates in real-time with device data and control through APIs provided by the Gizwits Cloud platform, addressing the requirements for intelligent hardware access; it also meets the needs of end consumers through the WeChat public account platform API.
First, developers can design personalized HTML interactive interfaces and functions for their applications. (As shown in Figures ③ and ④)
WeChat Server
The WeChat server provides a series of interfaces for communication between devices and manufacturer servers, mainly including binding/unbinding WeChat user accounts with devices, receiving/sending device messages, etc. For specific interfaces and usage methods, please refer to the official WeChat documentation. WeChat has recently launched the WeChat hardware platform, and it is essential to understand the functions provided by the WeChat public account and WeChat hardware platform before accessing WeChat.
WeChat Client
The WeChat client provides the interface for the final interaction with users, which can be understood as a browser running on a mobile phone, but operating within the WeChat public account system. Developers can configure custom menus through the management backend of their public accounts.
Application Development – Data Access SDK Functions
Module Development – Test Set
WiFi Test Minimum Set
-
SoftAP
-
AirLink
-
Configuration Success Verification
-
Power-On Declaration Verification
-
Small Loop Control
-
Switching between Small and Large Loops
-
Large Loop Control
-
GAgent_OTA
-
Fault Recovery
GPRS Test Minimum Set
-
Cloud Registration
-
Large Loop Control
-
GAgent_OTA
Module Development – Product Functional Specification
Product Name: Gizwits Cloud Wi-Fi Communication Module (GAgent)
Product Function:
It can connect to the Gizwits Cloud universal communication module solution, hardware platform-independent, currently suitable for Wi-Fi communication modules, and some functional specifications apply to Bluetooth communication modules. It provides the ability to connect to the Gizwits Cloud for various intelligent hardware and reliable data communication capabilities with hardware.
Supported Protocols:
Gizwits Cloud platform standard access protocol for App and device communication v4.0.1
Gizwits Cloud platform standard access protocol for universal data point protocol v4.0.0
Gizwits Cloud platform standard access protocol for device and cloud communication v4.0.2
Gizwits Cloud platform standard access protocol for MCU and Wi-Fi module communication v4.0.3
Mode Definition:
Production Mode: Used for testing during large-scale product production
Configuration Mode: The scenario when a user first uses or changes network configuration
Working Mode: The scenario when the product is functioning normally
Production Operations – Production Testing Tools
Production Testing Tool Introduction
The Gizwits Cloud production testing tool is used for batch testing of products after they go online. In large-scale production, it effectively monitors the quality of batch products, ensuring product functionality.
In the Gizwits Cloud developer center (site.gizwits.com), only users with administrator and developer permissions for the product can conduct production testing.
Production Testing Steps
-
Add production testing configuration files
-
Edit and delete production testing files
-
Download the production testing APP
-
Scan and download the production testing configuration file
-
Start production testing
-
View production testing result logs
-
View historical reports
Production Operations – Statistical Analysis
-
Connection Records: Large loop device and server connection
-
New Online Devices: The number of independent devices with connection records for the first time
-
Active Devices: Independent devices with one or more command reporting records within a specified period
-
Active Period: The time length from the first online device to the last online time
-
Connection Duration: The single duration from establishing a connection between the device and the mobile phone to disconnecting
-
Connection Times: The actual number of connections that occurred within each online duration interval
Production Operations – OTA Upgrades
OTA, standing for Over-the-Air Technology, refers to the technology of downloading over the air. When a device connects to the cloud, it will receive OTA upgrade notifications and complete firmware upgrades via HTTP. The OTA service provided by Gizwits Cloud mainly offers the following functions:
-
OTA notification service, i.e., offline upgrades. When a new version of the device’s firmware program is released, the OTA notification service will push upgrade notifications to the device.
-
OTA transparent transmission service, i.e., online upgrades. The device firmware program is transmitted to the device through M2M messaging service.
-
Supports multiple pushes for a single product
-
Supports Wi-Fi/MCU upgrades
-
Supports targeted upgrades. Pushes can be specified by device MAC address, region, and old firmware version.
-
Supports scheduled pushes. Customizable push cycles and time periods can be set.
-
OTA progress statistical analysis
Previous Popular Articles (Click the article title to read directly):
-
“[Heavyweight] IoT Industry Panorama Report, First to Open the Domestic IoT Industry Two-Dimensional Perspective Panorama”
-
“Exclusive Interview with Academician Wu Hequan: Four Good News Indicate that IoT Development is on Track”
-
“China’s First Low-Power Wide Area Network LPWAN Market Report Released: Where is the Next IoT Opportunity? [Text Version]”
-
“A Cartoon Explains: What is LoRa, which Everyone is Talking About Behind NB-IoT?”
-
“A Cartoon Explains: Besides Wi-Fi and Bluetooth, What Can the Recently Popular NB-IoT Do?”“
-
“McKinsey’s Heavyweight Report: How Enterprises Can Tap into the Value of ‘Industry 4.0’? (Collection Version)”