GAgent is Gizwits’s hardware connectivity with the embedded system firmware that can operate in Wi-Fi modules, GPRS modules and PCs etc. Devices access Gizwits IoT Cloud through the GAgent. GAgent provides the communication protocol between cloud and MCU, so that, according to the protocol, developers can realize the communication between MCU and GAgent.
GAgent plays the role of a data interaction bridge, which is of data forwarding between devices and Gizwits IoT Cloud. At present, the Wi-Fi modules that support GAgent ported by Gizwits are High-Flying LPB100/LPB120/LPT120/LPT220, Espressif 8266, Qualcomm 4004, RealTek 8711AM, WinnerMicro TLN13SP01, Ralinwi TinyCon3350-M26 and MXCHIP EMW3162 etc.; the GPRS modules that support GAgent ported by Gizwits are Fibocom G510 and so on.
Connect the device to the router. Currently, there are three types of network access configuration, such as AirKiss, AirLink and SoftAP.
A device must be bound before it can be controlled. Generally, WLAN is adopted by Wi-Fi modules to discover and bind devices while QR code is used by GPRS modules to scan and bind devices because WLAN is not available.
Sending commands: Generally refers to controlling devices by App and Gizwits IoT Cloud. The App in the WLAN can choose to send commands through Gizwits IoT Cloud or directly to the GAgent without passing through the cloud.
Reporting device data: Generally refers to actively reporting the current status by device. When the device MCU receives the status changes induced by executing commands, it should immediately report the current status actively, and the sending frequency is not limited. However, if the status changes are due to user operations or environmental changes, the send frequency cannot be more than 6 times per second. It is recommended to report device data on demand. If you have special reporting requirements, please contact Gizwits.
GAgent OTA refers to notifying modules of the new version of the GAgent firmware to upgrade after the remote push rule for GAgent is created in Gizwits IoT Cloud. The GAgent OTA has two types of trigger actions: Gizwits IoT Cloud actively notifies modules of the OTA action; the GAgent connects to Gizwits IoT Cloud to check whether the OTA is required.
MCU OTA refers to notifying the MCU of the new version of the MCU firmware to upgrade after the remote push rule for MCU is created in Gizwits IoT Cloud. The MCU OTA process is that GAgen performs the large file transmission to MCU.
When the data collected by the device is too large, the MCU can upload those large files to Gizwits IoT Cloud through GAgent. After uploaded to Gizwits IoT Cloud, they can be obtained through the corresponding APIs. At present, App does not support obtaining large files uploaded by MCU.
End-of-line test is mainly applied in the process of device production and testing, which is a method of device testing. At present, the End-of-line test is applicable to Wi-Fi modules, but not to GPRS modules.
When GAgent is unable to connect to Gizwits IoT Cloud for a long time due to some reasons during normal operation, the Wi-Fi module needs to be restarted. The device user can manually restart the device, or send the restart command from MCU to restart the Wi-Fi module. In addition, GAgent has an exception handling policy of restarting itself automatically when an exception occurs.
Reset means to erase the DID, SSID, password and other information saved by GAgent. After sending the reset command, the Wi-Fi module will restart itself. The reset command is mainly used when a device ownership is transferred from A user to B user, B user does not want A user to control the device.
Gizwits binding expiry policy: When the App and device are in the same LAN and the binding expiry of GAgent is not set, any user with the relevant App can bind the device at any time, which has certain security risks. After the binding expiry is set, the user can only bind the device before the binding expiry, which improves security.
Heartbeat between App and GAgent: the heartbeat interval is 4s, when the response timeout happens 3 times, it will cause offline.
Heartbeat between App and Gizwits IoT Cloud: the heartbeat interval is 55s, when the response timeout happens 3 times, it will cause offline.
Heartbeat between GAgent and Gizwits IoT Cloud: the heartbeat interval is 55s, when the response timeout happens 3 times, it will cause offline.
Note: The current SSID and the SSID of the most recent connection may be the same.
Note: The device restart policy for disconnection to Gizwits IoT Cloud can be customized considering the Micro Cycle priority. If the priority of the Micro Cycle is high, the device will restart immediately when disconnected to Gizwits IoT Cloud. If the priority is medium, the device will restart only when there is no connection in Micro Cycle for consecutive 10 minutes. If the priority is low, the device can restart immediately when disconnected to Gizwits IoT Cloud.
GAgent OTA includes 4 steps: download, store, verify, and upgrade.
MCU OTA includes 4 steps: download, store, verify, and transfer.
Gizwits IoT Cloud only notifies online devices of the OTA. For the devices that are not online at the time or have not upgraded successfully, the cloud will send OTA push notification once a day.
The data interaction between devices and Gizwits IoT Cloud mainly adopts MQTT protocol. The heartbeat data between the device and Gizwits IoT Cloud actually counts for a significant majority of the GRPS module traffic. The MQTT heartbeat consists of 2 bytes and the TCP protocol header size is 40 bytes. The heartbeat request and response happen once every 50 seconds. So the amount of data usage every 50 seconds is: (40 + 2) * 2 = 84 Bytes and the amount of monthly data usage is 4252K (calculated by 30 days a month). Therefore, the GPRS module needs at least 4252K data plan per month to ensure that it can access the Internet normally.