Table of Contents Introduction ............................5 Overview .............................. 5 Getting Started ............................. 6 Connecting the Power ..........................6 Connecting Serial Devices ........................6 Connecting to a Network ........................6 Access to the Web Console ........................7 Web Console ............................8 Dashboard ............................
Page 4
Audit Log ..........................104 Protocol Status .......................... 105 Appendix A ............................107 Publish Mode ............................. 107 Appendix B ............................108 Useful Links and Upgrade Information ....................108 Appendix C ............................109...
This series seamlessly integrates Modbus RTU/TCP master/client protocols, streamlining the collection of data from Modbus devices. Additionally, the AIG-302 Series comes preloaded with Azure IoT Edge, Azure IoT device, and MQTT, ensuring a seamless integration process and providing a secure sensor-to-cloud connectivity solution for efficient data acquisition.
Connect one end of the Ethernet cable to the AIG’s 10/100/1000M Ethernet port and the other end of the cable to the Ethernet network. The AIG will show a valid connection to the Ethernet by LAN1/LAN2 maintaining solid green/yellow color. For details on the behavior of the LEDs, refer to the AIG-302 Series Quick Installation Guide.
You will see the following homepage after logging in successfully. NOTE After the first login, we force a password change to comply with general security policies and practices and to increase the security of your device. AIG-302 Series User Manual...
No., firmware version, system usage, storage usage, and audit log are displayed. Network Dashboard This dashboard displays information on the WAN and LAN interfaces and the network traffic passing through the interfaces. Network Status shows whether the gateway can connect to the Internet. AIG-302 Series User Manual...
Page 9
The information is refreshed every 10 seconds. Information on the LAN interfaces is organized under the LAN tab and includes information on the usage of the interfaces and the traffic passing through them. AIG-302 Series User Manual...
In this page, you can create and monitor the real-time tag value for troubleshooting purposes. To see the tag’s real-time value, do the following steps: Click + Edit Tags. (Optional) use Search to find the tags quickly. Select the tags to monitor in the list. Click Save. AIG-302 Series User Manual...
Page 11
(Optional) press the icon to deactivate the monitoring tags. (Optional) press the icon to write value for test purposes. AIG-302 Series User Manual...
To grant permissions to the IoT Edges, go to Cloud Connectivity > Azure IoT Edge > IoT Edge modules should not be Module Permission, and create a service directly granted privileges. account and grant the required permissions to the IoT Edge module. AIG-302 Series User Manual...
Server/Host Name You can enter a name to identify the unit, such as the function, etc. string Description - Alphanumeric You can enter a description to help identify the unit location such as optional string “Cabinet A001.” AIG-302 Series User Manual...
Page 14
This field is required to specify your time server's IP or domain Time Sever (e.g., 192.168.1.1 or name if you choose the NTP server as the source time.cloudflare.com) NOTE When using GPS as a time-synchronization source, set the GPS mode to Auto before entering the configuration page. AIG-302 Series User Manual...
Go to System Settings > Serial to view and configure serial parameters. To configure serial setting, do the following: Choose the COM port to configure. Set the baudrate, parity, data bits, and stop bits. NOTE Incorrect settings will cause communication failures. AIG-302 Series User Manual...
Once you attach a storage, you will find it in the Device List. NOTE LIMITATION • AIG does not allow the connection of multiple USB devices through a USB hub. The external USB format supported for AIG is FAT. • AIG-302 Series User Manual...
To configure the network, do the following: Choose LAN1 or LAN2 for configuration. Select the WAN (Wide Area Networks) or LAN (Local Area Networks). Select DHCP or Static mode. Configure IP address, Subnet mask, Gateway, and DNS. AIG-302 Series User Manual...
Page 18
If the LAN option is selected, the AIG can be configured to operate as a DHCP server, offering the additional benefit of dynamically assigning IP addresses to devices on the network. To configure DHCP server settings, do the following: Check Enable DHCP Server. Input IP Address Range parameters. Specify Lease Time. Click Save. AIG-302 Series User Manual...
Check-alive function to optimize the cellular connection. You can create customized cellular profiles in the Profile Settings section. A list of all the profiles in the system is displayed. Create, Edit, or Delete cellular profiles here. AIG-302 Series User Manual...
Page 20
The Check-alive function will help you maintain the connection between your device and the carrier service by pinging a specific host on the Internet at periodic intervals. AIG-302 Series User Manual...
To configure Wi-Fi settings, check Enable Wi-Fi and do the following: Click +create to manually Create by SSID or be Created by Scan Results. Select DHCP or Static mode. Check Check-alive function which can be used to ensure Internet connectivity. Click Save. AIG-302 Series User Manual...
DNS servers. Routing The Routing priority feature allows the IIoT Gateway to prioritize different network interfaces (such as cellular, LAN, and Wi-Fi) as needed to optimize network performance. AIG-302 Series User Manual...
Enable the Azure IoT Edge service and click on Select DPS. Select TPM, Symmetric encryption, or X.509 certificate based on your gateway registered with the Azure IoT Hub. NOTE TPM attestation is only available for devices with a built-in TPM module. AIG-302 Series User Manual...
Page 24
When executing an Azure IoT Edge module, for the sake of gateway security, it is necessary to generate the access key first and then import the environment variables for that module from Azure IoT Hub. To generate the access key for a module, do the following: Click the Module Permission tab and click Create. AIG-302 Series User Manual...
Page 25
Specify a module name and grant permissions to the module. (NOTE: the module name must be the same as the one created in Azure IoT Hub). Click Save. Click Download Key to save the secret access key or click to copy the key and paste it in the Azure IoT Hub. AIG-302 Series User Manual...
Page 26
To install the ThingsPro Agent, do the following: Create an IoT Edge device. Add a module from the Azure IoT Hub based on the following information Docker Image: moxa2019/thingspro-agent:3.0.1-armhf Container Create Option: "HostConfig": { "Binds": [ "/var/thingspro/data/azureiotedge/:/var/thingspro/cloud/setting/", "/run/tpe/azureiotedge/:/run/tpe/azureiotedge/", "/var/thingspro/data/:/var/thingspro/data/" AIG-302 Series User Manual...
Page 34
Required by the application/JSON payload requestBody Used to post data required by the API endpoint Response: "status": 200, "payload": { "data": { "httpEnable": true, "httpsEnable": true, "ipv6Enable": true, "httpPort": 80, "httpsPort": 8443, "certFileName": "ThingsPro Web", "keyFileName": "ThingsPro Web" AIG-302 Series User Manual...
Page 35
NOTE We recommend changing the timeout parameters to 30 seconds to prevent system exceptions. system-reboot Method Name: system--reboot Request Payload: Response "status": 200, "payload": { "data": "rebooting" AIG-302 Series User Manual...
Page 36
"status": 200, "payload": { "checktime": "2023-04-27T08:08:38Z", "count": 0, "data": [] NOTE AIG-302 allows only one active software upgrade job at a time. We recommend changing the response timeout parameters to 1 minute to prevent system exceptions. AIG-302 Series User Manual...
Page 37
"status": 200, "payload": { "data": [ "moxa-aig-302-tpe" "message": "Successfully trigger" NOTE AIG-302 allows only one active software upgrade job at a time. We recommend changing the response timeout parameters to 1 minute to prevent system exceptions. AIG-302 Series User Manual...
Page 39
Description: Enable will use the pollingInterval that user input. Type: integer Description: The interval at which to poll tag data. For example, pollingInterval value 10: Every 10 second value 0: when the data is pushed into the tag (almost real time) AIG-302 Series User Manual...
Page 40
For additional details, refer to the jq website (jq Manual <development version>). The AIG Web GUI offers an easy way to apply the jq filter and test the transformed result as shown in the following examples. AIG-302 Series User Manual...
Page 41
Select the tags that you want using the tag-selector panel on the left. The default result for the selected tags will show in the right panel. Custom payload after transforming the default payload. Enable custom payload and input the jq Filter to display the custom payload for your selection. AIG-302 Series User Manual...
Page 43
"DefaultEndpointsProtocol=https;AccountName=thingsproedge;AccountKey=hgnYe/08sWqlcGK d7VR8XNRvjydebzzSeVZxFvRCmepUqA69LTtNY13UZ5fejgZgcys+jC5B+qf3+AStsEkNzg==;End pointSuffix=core.windows.net", "containerName": "aig302" Variable Description The connection string is the access key or shared access signature of the Azure connectionString blob storage. containerName Upload to the container which belongs to the Azure blob storage. AIG-302 Series User Manual...
Page 44
The simplest message type for sending IoT device data to your IIoT applications is a telemetry message. To create a telemetry message, do the following: Click + Create to create a new message group. Specify a name for the Message Group. AIG-302 Series User Manual...
Page 45
Select a Publish Mode. For details, see Publish Mode. Input corresponding parameters such as publish interval, sampling mode, and publish. Click Next. Select tags (e.g., Modbus Master). AIG-302 Series User Manual...
Page 46
To prevent your device from connecting to potentially malicious gateways (Azure IoT Edge inside), you can upload X.509 certificate, Private Key, or Trusted CA Certificate. You can generate the certificates and the private key using ThingsPro Edge. For additional information, see Downstream Certificate. AIG-302 Series User Manual...
Page 47
Using the API to Restart the Defender Service curl "http://127.0.0.1:59000/api/v1/azure-iotedge/defender/reload" -X PUT \ "Content-Type:application/json" "Authorization:Bearer $(cat ./token)" Monitoring the Log of the Defender Service sudo journalctl -u defender-iot-micro-agent -f Testing the Defender Service by Triggering a Baseline Violation touch /tmp/DefenderForIoTOSBaselineTrigger.txt AIG-302 Series User Manual...
To create the Azure IoT Device connectivity, follow the steps below: Click to set connection. Enter Connection String. Select a Connection Protocol. Select an Authentication Type. (Optional) Upload X.509 Certificate and Private Key. Click Save. AIG-302 Series User Manual...
Page 49
Click + Create to create a new message group. Specify a name for the Message Group. Select a Publish Mode. For details, see Publish Mode. Input corresponding parameters such as publish interval, sampling mode, and publish. Click Next. Select tags (e.g., Modbus Master). AIG-302 Series User Manual...
Page 50
The device-to-cloud (D2C) message policy allows you to transform default payload to your desired payload schema via the jq filter. For additional information, refer to the jq website (https://stedolan.github.io/jq/manual/). Click Next. Select Output Target Type. 10. (Optional) Enter Property Key and Value. 11. Click Done and Save. AIG-302 Series User Manual...
Page 51
Store and Forward and select Enable Store and Forward. Select a target disk and a maximum storage cache, a retention policy, and a TTL (Time to Live) value for the messages. Device Management Allows this AIG to be managed from Azure IoT Hub via Device Twin and Direct Methods. AIG-302 Series User Manual...
Click Add Connection. Specify a Server (default port: 8883). Select an MQTT Version. (Optional) If the broker requires, enter Client ID, Username, and Password. (Optional) Enable persistent session. Select a type of QoS and retain function on/off. AIG-302 Series User Manual...
Page 53
The simplest message type for sending IoT device data to your IIoT applications is a telemetry message. To create a telemetry message, do the following: Click + Create to create a new message group. Specify a name for the Message Group. AIG-302 Series User Manual...
Page 54
Select a Publish Mode. For details, see Publish Mode. Input corresponding parameters such as publish interval, sampling mode, and publish. Click Next. Select tags (e.g., Modbus Master). (Optional) Enable custom payload by using the jq filter. AIG-302 Series User Manual...
Page 55
The device-to-cloud (D2C) message policy allows you to transform default payload to your desired payload schema via the jq filter. For additional information, refer to the jq website (https://stedolan.github.io/jq/manual/). Click Next. 10. Select Output Target Type. 11. (Optional) Enter Property Key and Value. 12. Click Done and Save. AIG-302 Series User Manual...
Page 56
This function allows you to invoke this device's RESTful APIs from the MQTT broker and receive responses using the MQTT topics listed here. NOTE if you want to use the direct method to write tags from the cloud, refer to https://docs.moxa.online/tpe/openapi/taghub/#tag/access AIG-302 Series User Manual...
The data logger function saves data when communication is lost. It stores data on a chosen disk with a set maximum size. Whether data is logged internally or sent to a cloud application depends on the behavior of Message Group. AIG-302 Series User Manual...
Click + Create to create a new message group. Specify a name for the Message Group. Select a Publish Mode. For details, see Publish Mode. Input corresponding parameters such as publish interval, sampling mode, and publish. Click Next. AIG-302 Series User Manual...
Page 59
(Optional) Enable custom payload by using the jq filter. The device-to-cloud (D2C) message policy allows you to transform default payload to your desired payload schema via the jq filter. For additional information, refer to the jq website (https://stedolan.github.io/jq/manual/). Click Next. Select Output Target Type. AIG-302 Series User Manual...
You can configure a Modbus master to wait a certain amount of time for a Response 10 to 1000 slave’s response. If no response is received within the configured time, Timeout (ms) 120000 the AIG will disregard the request and continue operation. AIG-302 Series User Manual...
Page 61
The IP address of a remote slave device. Slave Port 1 to 65535 The TCP port number of a remote slave device. Slave ID 1 to 255 – The slave ID of a remote slave device. AIG-302 Series User Manual...
Page 62
Registers: 1 to Read Specifying how much data to read quantity Read Holding Registers: 1 to Read/Write Multiple Registers: 1 to 125 Write start 0 to 65535 Modbus registers the address for the written data address AIG-302 Series User Manual...
Page 63
Tag Type – uint32 tag type and stored in tag hub. uint64 float double string If you already have a Modbus command file, select Import Configuration. Importing a configuration file will help you reduce configuration time. AIG-302 Series User Manual...
Page 64
Then, you will see the setting results. The product provides an easier way for installation and maintenance. You can Export all the Modbus commands into a file for backup purposes, or you can Import a file (golden sample) to reduce configuration time. AIG-302 Series User Manual...
Page 65
You can configure a Modbus master to wait a certain amount of Response Timeout 10 to time for a slave’s response. If no response is received within the 1000 (ms) 120000 configured time, the AIG will disregard the request and continue operation. AIG-302 Series User Manual...
Page 66
After basic settings, you must configure related parameters to retrieve data from the Modbus device. In the beginning, press Add Device and go to the wizard that guides step-by-step through the configuration process. Step 1. Basic Settings Fill in the basic parameters for the Modbus RTU/ASCII device. AIG-302 Series User Manual...
Page 67
How to collect data from the Modbus device 06 – Write Single Registers Register 15 – Write Multiple Coils 16 – Write Multiple Registers 23 – Read/Write Multiple Registers Read Starting 0 to 65535 Modbus registers the address for the collected data Address AIG-302 Series User Manual...
Page 68
Proceed - Set to User-defined value boolean int16 int32 int64 uint16 The command will be generated into a meaningful tag by tag Tag Type – uint32 type and stored in the tag hub. uint64 float double string AIG-302 Series User Manual...
Page 69
If you already have a Modbus command file on hand, select the Import Configuration mode. Importing a configuration file will help you reduce configuration time. Step 3. Confirm Review whether the information of the settings is correct. AIG-302 Series User Manual...
Page 70
Modbus commands into a file for backup purposes; or you can Import a file (golden sample) to reduce configuration time. After finishing all the settings, press Go to apply settings and click Apply for the settings to take effect. AIG-302 Series User Manual...
Page 71
Check: If the Modbus command fails, e.g., Modbus exception code is Enable Check received or Modbus response times out, the value of the status tag in command Check uncheck the tag hub will change to 1. event Uncheck: Disable the function. AIG-302 Series User Manual...
Page 72
Import/Export Configuration You can Import/Export the Modbus Master settings, which will be stored in XML format. An example of an exported file that can be viewed/edited by EXCEL. AIG-302 Series User Manual...
Modbus TCP connection might get disconnected, you can enable the fail event function. To create a Modbus TCP server (slave), following the steps below: Click TCP under Modbus TCP. 2. Click Manage > General Settings. AIG-302 Series User Manual...
Page 74
Coil Boolean Read/Write Discrete Input Boolean Read Holding Register Non-boolean Read/Write Input Register Non-boolean Read If you want to rearrange the Modbus table, click Auto Arrange. You can select different sorting priorities and sort order types. AIG-302 Series User Manual...
This feature helps eliminate the programming effort in data processing. To process data and calculate data values, do the following: Click + Create. Specify Rule Name, select Create virtual tag under Action and configure Tag Name and following parameters, then click Next. AIG-302 Series User Manual...
Page 76
Select a sampling setting and click Next. Select the tags from system or Modbus that you want to process and click Next. AIG-302 Series User Manual...
Page 77
Drag and drop the formula and tags from Math and Tag and click Save. After the rule is created successfully, you can find the virtual tag on the Tag Dashboard. NOTE The Status column indicates if the rule contains any errors or not. AIG-302 Series User Manual...
Page 78
The following Math formulas are supported: addition(+), subtraction(-), multiplication(x), division(/), and power(^) • round, round up, round down • sum, minimum, maximum, average, median, modes, standard deviation, random • items AIG-302 Series User Manual...
Page 79
To create a logic control rule, do the following: Click + Create. Input the Rule Name, configure Overwrite Tag under Action, and select the Overwrite Target, then click Next. AIG-302 Series User Manual...
Page 80
Configure the Sampling Mode and click Next. Select the tags from system or Modbus that you want to process, then click Next. AIG-302 Series User Manual...
Page 81
Drag and drop the formula and tags from Logic, Math, and Tag, then click Save. You will see the rule has been created successfully. The following logic sets are supported: If, else if, else • AIG-302 Series User Manual...
Page 82
When a Tag Type is boolean, the following restrictions apply: When used as a condition, it needs to be evaluated using True (1) or False (0). When used in execution, it needs to be operated with numerical values 1 or 0. Correct Usage Example: AIG-302 Series User Manual...
Incorrect Usage Example: Function Management AIG-302 Series provides a functionality to trigger actions based on specific data or time frame. For example, you can create a function that implements a defined action such as a device reboot or a cron job triggered by a specified change in a tag value or newly generated tags/events.
Page 84
Retrying a failed function every 5 seconds (unlimited tries) The function failed during a retry. Failure The correspondent error message will be displayed in the table. You can click Export Log to check the logs. Inactive The function is disabled. AIG-302 Series User Manual...
The AIG disables all ports by default excluding the reserved ports mentioned above. To enhance the security of your device, we recommend configuring a rule that includes the source IP and source port, thereby granting access only to specific individuals. AIG-302 Series User Manual...
Page 86
To create firewall rules, do the following: Click + Create Rule. Specify the protocol, gateway port, and rule name. Specify a source IP or a subnet. Specify a source port or a range of ports. Click Save. AIG-302 Series User Manual...
Page 87
Click + Create Rule. Specify the protocol, gateway port, and rule name. Specify a source IP. Specify a destination IP and port. Click Save. NAT Service Enable the NAT service to allow child devices to connect to external networks. AIG-302 Series User Manual...
“ThingsPro Edge Root CA for HTTPS” certificate instead. Login Lockout To avoid hackers repeatedly logging into the account to crack the passwords, you may choose to enable the login failure lockout and configure related settings. AIG-302 Series User Manual...
Session Management You can review session statuses for all accounts and manage sessions for individual accounts. In the event of detecting unusual connections, you can enhance the security of your device by deleting the respective session. AIG-302 Series User Manual...
If the connection is successful, you will be connected to the VPN network, and your internet traffic will be encrypted and routed through the VPN server. NOTE OpenVPN cannot be used when the Moxa DLM Service is running. AIG-302 Series User Manual...
Click on + Create to create a new user account. In the dialogue box that is displayed, fill up the fields and click SAVE. NOTE To comply with security policy and best practices, specify a strong password that is at least eight characters long, consisting of at least one number and at least one special character. AIG-302 Series User Manual...
Page 92
You cannot Deactivate or Delete the last remaining account with an Administrator role. This is to prevent an unauthorized account from fully managing this system. When the system detects only one active account when the Administrator role is selected, all items in the pop-up menu will be grayed out. AIG-302 Series User Manual...
When you are done, click Save to create the role in the system. You can edit the settings or delete an existing role by clicking on the pop-up menu icon next to the role. When the Role has been setup, it is available for selection under the Account. AIG-302 Series User Manual...
Description Min. Password Length 8 to 256 The minimum password length. Password Strength Policy To define how the AIG checks the password’s strength. Password Change Reminders 10 to 360 days Notify user to change the password. AIG-302 Series User Manual...
Once you have access to the service, go the Moxa DLM Service to register the product online as follows. Input DLM email and password, and press Verify. If the input information is correct, you will see the connection has been verified. AIG-302 Series User Manual...
Page 96
Once the enrollment is successful, you will see the following information: NOTE Ensure the Moxa DLM service is enabled at the top left corner. Log in to the Moxa DLM Service. You will see your AIG device online and you can manage it. AIG-302 Series User Manual...
For security reasons, disable all unused services. Go to Maintenance > Service to disable or enable the system services by just toggling the buttons. Reboot If you want to reboot the device, go to Maintenance > Reboot and click Reboot Now. AIG-302 Series User Manual...
The backup function backs up the data on AIG device to a file (only one back up file can be created at a time). Backup files are encrypted and stored in a designated location on the device. You can restore the data from the backups when needed. AIG-302 Series User Manual...
You can press Check for Upgrade to get the latest upgrade information, then select the patches to install. (Patches leverage the Debian APT mechanism, ensuring compatibility and identity. Additionally, all available patches are signed by Moxa, and the communication between AIG-302 and the repository is encrypted for system security.) AIG-302 Series User Manual...
Page 100
A pack that integrates all patches between two versions (e.g., from version 1.0 to version 1.1.) This scenario is applicable when the AIG cannot access the Internet. The upgrade pack can also be downloaded from the Moxa SRS: https://moxa-srs.thingsprocloud.com/home Upgrade Settings AIG-302 Series User Manual...
Page 101
Checked checking this option in case of unexpected situations. Check for upgrades automatically Specify a regular time to check for upgrades Unchecked (repeat every 1 week) every week. Upgrade History The installed patches are listed here. AIG-302 Series User Manual...
Utilize this function when the device is being retired and you wish to securely delete all files and logs for security purposes to ensure the data cannot be recovered. Due to the low-level formatting of the memory that is required to erase data, it may take approximately 1.5 hours. AIG-302 Series User Manual...
Click Storage Settings to specify the location to store the event logs. To optimize the use of storage space on your AIG, you can check the Enable Time to Live option and specify the maximum storage space for the system logs. Click Save to confirm your settings. AIG-302 Series User Manual...
Page 104
The audit logs can be exported and downloaded onto your computer. In the Log Settings, you can specify the storage size to store the logs and notification threshold. Also, you also can enable time to live for maximum stored days. AIG-302 Series User Manual...
Page 105
For troubleshooting issues related to Azure and MQTT Client, do the following: Click Check. 2. Click Start. The example below selects Azure IoT Device. The steps may vary depending on the protocol you choose. View the logs to identify the issue. (Optional) Export the logs. AIG-302 Series User Manual...
Page 106
For Modbus troubleshooting, do the following: Click CHECK. Choose TCP or COMx. View the diagnostic information. Click the Traffic Monitoring tab to capture the traffic logs. (Optional) Export the traffic logs to send to experienced engineer for further analysis. AIG-302 Series User Manual...
Page 107
To avoid situations where the data takes a long time Idle Timer to reach the desired size, a threshold value can be 1 to 86400 (sec) set to ensure that the data is sent out as soon as it reaches the specified timer setting. AIG-302 Series User Manual...
Page 108
Method 3. Upgrade from the Moxa DLM tool If you are interested in using the Moxa DLM tool on a trial basis, get in touch with a Moxa sales representative to set up a trial account. AIG-302 Series User Manual...
Page 109
être utilisé de manière à minimiser le potentiel de contact humain pendant le fonctionnement normal. Cet appareil a également été évalué et montré conforme aux limites d'exposition RF ISED dans des conditions d'exposition mobiles. (Les antennes sont à plus de 20 cm du corps d'une personne). AIG-302 Series User Manual...
Need help?
Do you have a question about the AIG-302 Series and is the answer not in the manual?
Questions and answers