# AG-1621 The AG-1621 is a Quad-core, highly effective ARM-based compact-size multipurpose industrial computer with IoT gateway functionality. It is designed for edge computing. It supports a variety of Linux distributions, including Rasberry Pi OS, Debian, OpenWRT, and many more. AG-1621 comes pre-installed with any of the operating system environments mentioned below. - Debian - OpenWRT Serial interfaces, input, and Output - Opto-Isolated RS485 - Opto-Isolated RS232 - Digital Inputs - Relay output (230V/3A) Connectivity - LTE (2G Fallback) - GPRS - GNSS Please read carefully before starting. Also read the product [safety information.](https://docs.atreyo.in/books/ag-1621/page/safety-information) # General information
Download technical specification[Technical Specification](https://www.atreyo.in/sites/default/files/a-download/AG-1621%20Technical%20Specification.pdf)
### Model Selection Atreyo manufactures several versions of the AG-1621 with respect to components and modules used in it, There are two versions available with respect to OS pre-installed, Linux (Debian) and OpenWRT. The table below lists all the currently manufactured models.
Model VarientCellular NetworkGNSSInternal Memory
GPRS3GLTE 8GB16GB
AG-1621-8G
AG-1621-8G-LT-IN
AG-1621-8G-LT-EU
AG-1621-8G-LT-GL
AG-1621-8G-WRT
AG-1621-8G-LT-IN-WRT
AG-1621-8G-LT-EU-WRT
AG-1621-8G-LT-GL-WRT
##### Linux-based version: - AG-1621-8G does not have a cellular module installed. - AG-1621-8G-LT-IN is the basic variant of this model. It has a cellular module certified for India. - You can install any module powered by 3.3V and having a pinout compatible with the pinout of the EC200 module. Refer to cellular modem documentation pinout. - AG-1621-8G-LT-EU is the same as the base model except that it has a cellular module certified for Europe. - AG-1621-8G-LT-GL is a version with a module certified all over the world. ##### OpenWRT based version: AG-1621-8G-WRT is the same as the basic variant of this model except it has OpenWRT OS instead of Linux and does not have a cellular module installed. - AG-1621-8G-LT-IN-WRT is the basic variant of this model. It has a cellular module certified for India. - AG-1621-8G-LT-EU-WRT is the same as the base model except that it has a cellular module certified for Europe. - AG-1621-8G-LT-GL-WRT is a version with a module certified all over the world. --- ### Hardware The device is manufactured as a PCBA placed in an aluminum profile with DIN-Rail mount and connectors on its side plates. The main PCB inside the profile has a MiniPCIe socket to mount the LTE modem. This design has many advantages. The aluminum profile efficiently transfers heat from the electronics, keeping them cool even under heavy loads. The profile also protects the electronics from damage from impact, shock, and vibration. The PCB is easy to access for maintenance and repair purpose. The overall design is compact and lightweight, making it easy to install and deploy. #### Mechanical Dimensions The device's compact body design makes it easier to fit even if less amount of space is available. ##### Side view [![AG-1621-dimensions.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-dimensions.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-dimensions.png) ##### Top view [![AG-1621-dimentions-top.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-dimentions-top.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-dimentions-top.png) #### Connectors ##### Top view The AG-1621 has a pluggable connector on it's top side. connector can be used for RS232 and RS485 connection as well as inputs and output. LTE and GPS antennas can be connected to female SMA antenna sockets and SIM card to be inserted in microSIM slot. [![AG-1621-connectors-A.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-connectors-a.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-connectors-a.png) ##### Bottom view On the bottom side, it has a LAN socket with LED indicator, microSD card slot, USB type A host, HDMI output, and a 3-pin female connector as power socket. [![AG-1621-connectors-B.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-connectors-b.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-connectors-b.png) --- #### Block Diagram For a better understanding of the operation of the AG-1621, refer to the block diagram given below. Non-essential components have been omitted. Developers who program peripherals such as GPIOs, Serial interfaces, DI/DO etc., will find information about particular area in the sections dedicated to such peripherals. [![AG-1621-block-diagram.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-block-diagram.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-block-diagram.png) --- #### Digital inputs AG-1621 have inbuilt two digital inputs which is having capability to detect input from 5V to 24V. Both the digital inputs can be directly accessed through gpio pins. [![AG-1621-inputs-diagram.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-inputs-diagram.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-inputs-diagram.png) --- #### Relay output AG-1621 has inbuilt relay output which is directly accessible through gpio pin. --- #### RS232 The RS232 port includes CTS and RTS signals in addition to TX and RX signals. The baudrate range for the RS232 port is 1200 bps ~ 921600 bps. The port is protected by high-power TVS diodes against electrical surges. We can access this using "/dev/ttyS2" port which you can check using "ls /dev/ttyS\*" command. --- #### RS485 The baud rate range for the RS485 port is 600 bps ~ 921600 bps. Note that with a longer cable, the maximum speed may drop. It is recommended to use special cables designed for RS485. The port is protected by high-power TVS diodes against electrical surges. We can access this using "/dev/ttyS1" port which you can check using "ls /dev/ttyS\*" command --- #### USB/SD storage The gateway has both a microSD card as well as USB which can be used to connect a flash drive or external USB drive. --- #### LTE 4G modem Below is the description of the PCI express pinout used in the AG-1621. Before installing anything other than the EC-200U or EG25, be sure to check the pinout for compatibility. The LTE model is connected via a USB data bus. MiniPCI express pinout [![AG-1621-PCIexp.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-pciexp.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-pciexp.png) # Configuration manual - Debian #### Access by SSH To access gateway at first boot, connect gateway to the LAN network and give power. Find its IP by IP scanner tool or use CMD in host system with "arp -a" command ( take reference of gateway MAC ID). Then you need to log in via SSH to the gateway system. To login using SSH use below command in CMD/terminal of host system. ```bash ssh atreyo@your_gateway_ip ``` Use credential : user/pass: **atreyo/12345** To obtain root rights, type in the terminal: ```bash su - ``` Use user/pass: **root/root** If you intend to use a web interface to manage the gateway, you can install Webmin. A very convenient interface that allows you to fully manage the system. You can find the instructions here. --- #### Partition resize Once login to gateway using SSH at first check for rootfs size using "df -h" and "lsblk". If mounted root partition has less size, increase using following command. (use sudo if asked for root privileges') ```bash /usr/sbin/resize2fs -p /dev/mmcblk0p8 ``` Then check the partition size with one of the following commands. If you have the webmin panel installed, the partition size will also appear there after refreshing it. ```bash lsblk ``` ```bash df -H ``` --- ### Packages installation Debian does not have all the packages installed. you can install needful manually as per need using below commands. ```bash sudo apt-get update sudo apt-get upgrade --------- or ----------- sudo apt update sudo apt upgrade ``` Below are examples: #### Curl To install curls, type the following command in the terminal. ```bash sudo apt-get update ``` And: ```bash sudo apt install curl ``` #### Bash To install Bash, type the following command: ```bash sudo apt-get update ``` And: ```bash sudo apt-get -y install bash ``` --- # Applications - Debian As per specific need and requirement you can install any Debian supported open-source platform. i.e. webmin for web-UI based device and system management, node-red for block programming and openPLC etc. --- #### Node-RED Node-RED is a digital flowchart tool for connecting different online services and devices. It helps you easily create automation and data-handling processes without needing to write a lot of code, you can use the web interface to design even very complex flows for automation control. ##### Prerequisites You need to install the required packages. - curl - bash You can find the instructions [here.](https://docs.atreyo.in/link/57#bkmrk-curl)

Installing is not suggested to done as root user, this kind of installations are instructed to be performed under normal user only, but in case if your Node-RED development will need any root user permissions in future irrespective of any process/development, we suggest to must follow one of below methods.

- Install Node-RED using root user. - If Node-RED is installed under normal user, replace normal user in Node-RED service with root user. --- ##### Installation of Node-RED First, update the repositories. ```bash sudo apt-get update ``` Enter below command to start node-red installation process: ```bash bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) ``` If any error encounters During the installation process, i.e. *"user is not in sudoer group"*, either give sudo privileges' to normal user or you can try to run whole process as root, *but that can be done only on specific requirements.* it will ask for various questions while installation startup, all of them are answered with a **"Y"**, But enter **"N"** when it asks for *'Raspberry PI spec node'*. [![AG-1621-apps-nodered-1.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-apps-nodered-1.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-apps-nodered-1.png) Wait for above process to be finished! [![AG-1621-apps-nodered-2.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-apps-nodered-2.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-apps-nodered-2.png) As shown below go through warnings and exec **"sudo chown root:root ~/.node-red/settings.js" as suggested.** At the end, the installer will ask if we want to secure the instance. Hence it is necessary secure it, enter the username and password for the Node-RED panel as per convenience. (Ref image below) [![AG-1621-apps-nodered-3.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-apps-nodered-3.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-apps-nodered-3.png) For sack of avoiding any hurdles go with basic/default settings, But must apply password.

Remember to make your password long and complicated enough. The security of your gateway depends on it.

After installation, you need to execute below command: ```bash sudo node-red-pi --max-old-space-size=256 ``` Node-RED will start and will be available on port "localhost:1880". Open in any browser of host system connected to same IP range or in same networking area. [![AG-1621-apps-nodered-login.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-apps-nodered-login.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-apps-nodered-login.png) It will prompt for "*username/password"*, feed with the same credentials configured back while installation process. --- ##### Node-RED AutoStart In the last step node-red was started after manual command executed in CLI, In order to automatically start node-red on gateway startup, it needs to be entered into the startup system. To do so, execute below commands: ```bash sudo npm install pm2@latest -g ``` If ask to " run **`npm fund`** for details", do the same and process for next command: ```bash sudo pm2 start /usr/bin/node-red --node-args="--max-old-space-size=256" -- -v ``` You will get below output after command executed, check for user in table, if not "root", need to change user to "root" from normal user. [![AG-1621-apps-nodered-PM2-1.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-apps-nodered-pm2-1.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-apps-nodered-pm2-1.png) If user is "root" proceed to below command or else skip this step. ```bash pm2 save pm2 startup ``` For changing user from "normal user" to "root" for node-red startup, follow below steps: ```bash sudo pm2 start node-red -u root sudo pm2 save ``` [![AG-1621-apps-nodered-PM2-2.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-apps-nodered-pm2-2.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-apps-nodered-pm2-2.png) If any warning shown on screen use "--force" flag, i.e. "sudo pm2 save --force" Must check the symlink created should have service *"pm2-root.service"* ```bash sudo pm2 startup sudo pm2 save ``` Reboot the device, for cross checking and verifying proper installation. once rebooted, check below command: ```bash ps -aux | grep pm2 ``` [![AG-1621-apps-nodered-PM2-3.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-apps-nodered-pm2-3.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-apps-nodered-pm2-3.png) Check either it's daemon running over root or not, if not you might have misguided somewhere and make mistake while installation, please refer again and install. Open "**localhost:1880**" and start node-red. --- #### Webmin The [Webmin](https://webmin.com) administration panel, which allows you to administer the server via the web interface, can be installed on the Gateway. The Webmin panel has many functions related to web hosting and one of them is updating your Linux packages. To install Webmin you need to connect a keyboard, mouse and monitor via USB HUB and it is necessary to have access to the Internet. ##### Prerequisites You need to install the required packages. - curl - bash You can find the instructions [here.](https://docs.atreyo.in/link/57#bkmrk-curl) --- ##### Webmin installation Start the gateway and launch the terminal. Enter the commands below. ```bash curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh sh setup-repos.sh ``` [![AG-1621-apps-webmin-1.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-apps-webmin-1.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-apps-webmin-1.png) Above script will automatically setup repository and install needed keys on system, also it will provide **webmin** package for installation. execute below command for installation, If confirmation is required during installation, enter **'y'**. Then type the below commands: ```bash apt-get install webmin --install-recommends ``` The entire Webmin system should install without errors. Once installation is successful you can access webmin on port 10000 over localhost IP, in any browser. **i.e. : [http://localhost:10000](http://localhost:10000) or** [**http://192.168.10.174:10000**](http://192.168.10.174:10000)

if any privacy error appears continue with Proceed to <localhost\_IP> (unsafe)

The login panel will open and pop-up for credential will appear. you need to provide system's credentials here. i.e. user/pass : atreyo/12345 [![AG-1621-apps-webmin-login.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-apps-webmin-login.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-apps-webmin-login.png) Once you sign in with password, below interface will open and it's a dashboard of webmin. [![AG-1621-apps-webmin-load.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-apps-webmin-load.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-apps-webmin-load.png) [![AG-1621-apps-webmin-dasheboard.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-apps-webmin-dasheboard.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-apps-webmin-dasheboard.png) With Webmin we can update system packages, restart the gateway, change user and network settings and much more. For more about the Webmin panel visit [Webmin Docs](https://webmin.com/docs/) --- #### OpenPLC OpenPLC is an open-source [Programmable Logic Controller](https://en.wikipedia.org/wiki/Programmable_logic_controller) that is based on an easy to use software. It is the first fully functional standardized open source PLC, both in software and in hardware. The OpenPLC project was created in accordance with the IEC 61131-3 standard, which defines the basic software architecture and programming languages for PLCs. OpenPLC is mainly used on industrial and home automation, internet of things and SCADA research. ##### Installation of OpenPLC To install OpenPLC on AG-1621 log in via SSH or if you are using the Webmin panel go to **Tools > terminal** and type the following commands. Remember that the whole installation and compilation of the program may take up to an hour of your time. ```bash sudo apt-get install git ``` Once installed, type the following command: ```bash git clone https://github.com/thiagoralves/OpenPLC_v3.git cd OpenPLC_v3 ./install.sh rpi ``` The whole installation process will take some time. When it finishes it will display "Compilation finished successfully!" in the terminal. After rebooting the system, OpenPLC will start automatically.

To use in-development capabilities, checkout the development branch (git checkout development) prior to running install.sh.

##### Starting OpenPLC After restarting, enter the gateway IP and port 8080 in the browser address window. For example, **192.168.10.60:8080** The login window will open. The default username and password is: login: **openplc** password: **openplc** [![AG-1621-apps-openplc-login.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-apps-openplc-login.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-apps-openplc-login.png) After logging in, we go to the home screen. [![AG-1621-apps-openplc-dashboard.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-apps-openplc-dashboard.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-apps-openplc-dashboard.png) To learn how to use OpenPLC you can read on the site: [https://openplcproject.github.io/](https://openplcproject.github.io/) --- # Configuration manual - OpenWRT The AG-1621 is also sold in an OpenWRT version. With this system, we have a web interface available, and all in all, it is a ready-to-use gateway. ### OpenWRT Startup Guide ##### Opening inbuilt website To access the built-in website, connect the gateway by WAN to the local network and enter the IP address in the address window of the browser. Please note that it may take some time from powering on to booting up the system. IP: **http://192.168.10.60** user name: **root** password: **root** [![AG-1621-web-login.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-web-login.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-web-login.png) After logging in, you are automatically taken to the application page. [![AG-1621-web-apps.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-web-apps.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-web-apps.png) --- #### Cellular modem ##### Modem The Gateway in its basic configuration is equipped with an LTE modem that also supports GPRS and SMS functions. Different modems were used depending on the model variant. [Here](https://docs.atreyo.in/link/55#bkmrk-model-selection) is a table of models. ##### SIM card The Gateway supports two nano SIM cards, both 1.8V and 3V. The card connector is tray type. When installing the SIM card, pay attention to the correct insertion of the card. The used SIM card tray is designed so that the card sticks to the tray. This make easily insert the SIM regardless of the position of the Gateway ##### Using Cellular Network To activate the LTE modem, go to **Network > Interfaces** and select the **lte** tab there. [![AG-1621-web-interfaces-lte.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-web-interfaces-lte.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-web-interfaces-lte.png) Mostly the network operator requires you to enter the APN, sometimes it also requires a username and password. Enter the required data and save. [![AG-1621-web-interfaces-modem.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-web-interfaces-modem.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-web-interfaces-modem.png) Then go to **System > Custom Commands** and click on **Start modem**. [![AG-1621-web-custom-commands-modem.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-web-custom-commands-modem.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-web-custom-commands-modem.png) The modem will start up and connect to the Internet. To check if it is working properly and what the signal is, go to **Status > Mobile Service**. [![AG-1621-web-mobile.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-web-mobile.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-web-mobile.png) --- ##### Cellular modem ON on start To make the gateway automatically connect to the Internet after startup, you need to add a modem startup in the System > Startup section under Local Startup, add a line ``` /usr/commands/start_modem.sh. ``` Then save the changes. After each reboot, the gateway will automatically start the modem. [![AG-1621-web-startup-modem.png](https://docs.atreyo.in/uploads/images/gallery/2025-03/scaled-1680-/ag-1621-web-startup-modem.png)](https://docs.atreyo.in/uploads/images/gallery/2025-03/ag-1621-web-startup-modem.png) Generally, the Gateway supports all versions of Quectel MiniPCI express modems. However, you can use a third-party modem, as long as the signal outputs are compatible with those of the Quectel company. For use your won LTE module select model without LTE module installed. You also need to pay attention to the power supply to the LTE module should be 3.3V. # Firmware / OS list #### Firmware list Information about future releases of Debian for this computer.
OS VersionFile nameKernel Debian Date
V-1.00 5.10.14611 (Bullseye)
Information about future releases of OpenWRT for this computer.
OS VersionFile nameKernel OpenWRT Date
V-1.00 5.10.14623.05 10.12.2023
# Safety information ##### Operating environment - The device is designed to be installed in clean, dust-free and insect-free places - Operating temperature: -25 ~ 65°C (-13 ~ 149°F). - Humidity range is 10% to 95% (non-condensing). Use the device in a dry environment. - Away from heat sources and direct sunlight. - It must not be exposed to acid fumes, salts and other chemicals. - The device must not be used in places where there is a risk of gas explosion.

Use in inappropriate conditions may damage the device or shorten its life.

--- ##### Electrical and power supply safety - The device is powered with a voltage in the range of 8-36V. Voltage up to 24V is considered safe. Be especially careful when supplying them with higher voltages. - Use only approved accessories - Use the supplied power adapter or a good quality certified power adapter with the correct supply voltage range and sufficient power. - Only use approved accessories like antenna etc.

Only a person with qualification and appropriate knowledge should install the device.

--- ##### Malfunctioning and damaged device - Do not disassemble the device. - Only qualified personnel must service or repair the device or its accessories. - If water or other liquid has got into the device, or if it looks mechanically damaged, do not connect the device, but take it to an authorized service center. --- ##### Radio frequency exposure This device has been designed and manufactured not to exceed radio frequency energy emission limits set by regulatory agencies. To comply with RF exposure guidelines, the device must be used at least 20 cm away from a person's body. Failure to follow these instructions may result in exceeding the applicable RF exposure limits. This only applies to models with a built-in LTE modem. --- ##### What to do and what not to do - You are solely responsible for the use of the device and any consequences of its use. - Do not store or use the device in harsh environments such as dust, gases, oils, chemical vapors and damp places. - Do not throw the device and its accessories. Handle with care. - The device heats up during operation. Ensure proper ventilation. - If you need to dispose of your device, check your local regulations for recycling and disposal of electronics. - Route power, Ethernet, and antenna cables properly so that they cannot be accidentally pulled out. - The device should be used and kept away from small children.