# Configuration Manual After unpacking, the gateway is ready to use, but requires configuration to adapt to the required functions. #### Power supply The device can be powered by connecting a power source to the terminal block: 1. Loosen or remove the screws on the terminal block. 2. Connect a 8–36 VDC power line to the terminal block. 3. Tighten the connections, using the screws on the terminal block. 4. Turn on the power source. Note that the device does not have an on/off switch. It automatically turns on when it receives power. It takes a couple of seconds for the system to boot up. Once the system is ready, the RED LED will light up. Power terminal block pin assignments are shown below: ![AG-201-power connector.png](https://docs.atreyo.in/uploads/images/gallery/2025-02/scaled-1680-/ag-201-power-connector.png) --- #### Connecting the configuration port To configure the device, firstly connect RX, TX and GND of device to TX,RX and GND of Atreyo TTL converter or any other TTL converter with 9600, 8, N, 1 parameter. The pin assignment of the port is shown as above. ![AG-201-debug.png](https://docs.atreyo.in/uploads/images/gallery/2025-02/scaled-1680-/ag-201-debug.png)

Note that RX of gateway should be connected to TX of USB-UART converter. And TX of gateway to RX of USB-UART converter

--- #### Inserting SIM card Please refer drawing for proper SIM placement. ![AG-201-SIM.png](https://docs.atreyo.in/uploads/images/gallery/2025-02/scaled-1680-/ag-201-sim.png) --- ### Connecting configuration application 1. Connect one end of the TTL converter to the window computer. 2. Open AG IoT Configuration application on window PC. 3. Select AG-201, Select COM port and configure port with 9600,N,1,8 and click open port After port connection, click connect. 4. Once the connection is established successfully, enter the password "atreyo" to access the configuration mode. This is the default password. 5. Click CONFIGON and configure device parameter, as shown below: [![AG-201-IoT-configurator-configuration-serial.png](https://docs.atreyo.in/uploads/images/gallery/2025-02/scaled-1680-/uTAag-201-iot-configurator-configuration-serial.png)](https://docs.atreyo.in/uploads/images/gallery/2025-02/uTAag-201-iot-configurator-configuration-serial.png) --- #### Beneral configuration 1. Reset the device parameters by selecting **Make default**. 2. Initiate a device restart by clicking on **Restart**. 3. Modify the password in the Device Password section; after entering the new password, click **Set Password**. 4. To apply and save these changes in the device, click **Config OFF.** 5. After configuring all parameters, remember to click **Config OFF**. 6. The device will automatically restart and operate based on the new configured parameters. #### Serial interface Go to Device option to view and configure serial parameter. To configure serial parameter: 1. Configure the b**audrate**, **parity**, **data bits** and **stop bits**. 2. Click "**Set**" to apply the chosen settings. 3. Click “**Get**”, to access the stored serial parameters from the device.
FielsValueComment
Baudrate2400 | 4800 |9600 |14400 | 19200 | 28800 | 33600 | 38400 | 57600 | 115200 | 230400 | 460800 |921600default: 9600
Data8 | 9default: 8
ParityNone | Odd | Evendefault: None
Stop1 | 2default: 1
[![AG-201-IoT-configurator-configuration-serial.png](https://docs.atreyo.in/uploads/images/gallery/2025-02/scaled-1680-/uTAag-201-iot-configurator-configuration-serial.png)](https://docs.atreyo.in/uploads/images/gallery/2025-02/uTAag-201-iot-configurator-configuration-serial.png) --- #### GSM parameter 1. Configure the **APN**, **user**, **password**. 2. Click "**Set**" to apply the chosen settings. 3. Click “**Get**”, to access the stored GSM parameters from the device. [![AG-201-IoT-configurator-configuration-gsm.png](https://docs.atreyo.in/uploads/images/gallery/2025-02/scaled-1680-/nhAag-201-iot-configurator-configuration-gsm.png)](https://docs.atreyo.in/uploads/images/gallery/2025-02/nhAag-201-iot-configurator-configuration-gsm.png) --- #### Modbus For Modbus command frame configuration, refer the table. You can add new modbus request string via the edit section. [![AG-201-IoT-configurator-configuration-mudbus-c.png](https://docs.atreyo.in/uploads/images/gallery/2025-02/scaled-1680-/ag-201-iot-configurator-configuration-mudbus-c.png)](https://docs.atreyo.in/uploads/images/gallery/2025-02/ag-201-iot-configurator-configuration-mudbus-c.png)
FieldValueDescription
Slave IDInteger\[1...255\]Slave ID
Function codeRead Coils(1) | Read Discrete Input(2) | Read Holding Register(3) | Read Input Register(4) Specifies the type of register being addressed by a Modbus request
Data structure8bit INT | 8bit UINT | 8bit HEX| 16bit INT |16bit UINT | 32bit float | 16bit HEX | 32bit HEX | BoolDefines how read data will be stored
Start addressInteger \[0 – 65535\]First Modbus register from which data will be read
Offset addressIntegerThe starting address or position of a data element within a register or data block
Data lengthInteger \[1 – 30\]Number of Modbus registers that will be read during the request
Data lengthInteger \[1 – 30\]Number of Modbus registers that will be read during the request
Endian structure2bit data – ABCD | BADC | CDAB | DCBA 16bit data - AB | BA Select endian structure of data type
Trigger-Not available now
riggering time-Not available now
Polling timeinteger \[1..\]in sec; default: 60SecInterval at which requests are sent to the server device.
1. By clicking ADD, you can add multiple Modbus request strings. 2. Click "Set" to save a single frame or "Set All" to save all the Modbus request strings in the device. 3. clicking "Get" or "Get All", to access the saved Modbus strings in the device. 4. Additionally, you can delete, copy, and paste strings from the Navigate section. 5. Go to Modbus parameter section and set polling time of modbus data to the server by click on "Set". Also check polling time from device by click on "Get" [![AG-201-IoT-configurator-configuration-modbus-p.png](https://docs.atreyo.in/uploads/images/gallery/2025-02/scaled-1680-/ag-201-iot-configurator-configuration-modbus-p.png)](https://docs.atreyo.in/uploads/images/gallery/2025-02/ag-201-iot-configurator-configuration-modbus-p.png) --- #### MQTT 1. Go to MQTT Parameter section, to add MQTT parameter. 2. Specify a server details, host and port. 3. If the broker requires, enter Client ID, Username, and Password. (optional). If not, enter NULL. 4. Specify the publish and subscribe topics. 5. Once you've specified all parameters, click "Set." 6. Click "Get", to access details of the MQTT parameters. [![AG-201-IoT-configurator-configuration-mqtt.png](https://docs.atreyo.in/uploads/images/gallery/2025-02/scaled-1680-/ag-201-iot-configurator-configuration-mqtt.png)](https://docs.atreyo.in/uploads/images/gallery/2025-02/ag-201-iot-configurator-configuration-mqtt.png) --- #### Save and restore Easily configure the number of devices by loading a configuration file. Navigate to the Connection section, load the file by clicking **Load All**, and load all configuration parameters by clicking **Write All**. [![AG-201-IoT-configurator-configuration-save.png](https://docs.atreyo.in/uploads/images/gallery/2025-02/scaled-1680-/ag-201-iot-configurator-configuration-save.png)](https://docs.atreyo.in/uploads/images/gallery/2025-02/ag-201-iot-configurator-configuration-save.png) The application allows saving the configuration for later uploading to other gateways. 1. Save all configured parameters in a file by navigating to the Connection section and clicking **Save all**. 2. After clicking "Save all", navigate to the Config section. From there, first you have to create config file by click on "Create config", once you create file, you can save it by clicking **Save config**. 3. And this file you can use for configuration of other AG-201 gateway anytime by click on **Open config.** [![AG-201-IoT-configurator-configuration-config.png](https://docs.atreyo.in/uploads/images/gallery/2025-02/scaled-1680-/ag-201-iot-configurator-configuration-config.png)](https://docs.atreyo.in/uploads/images/gallery/2025-02/ag-201-iot-configurator-configuration-config.png) ---