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.
- General information
- Configuration manual - Debian
- Applications - Debian
- Configuration manual - OpenWRT
- Firmware / OS list
- Safety information
General information
Download technical specification | Technical Specification |
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 Varient | Cellular Network | GNSS | Internal Memory | |||
---|---|---|---|---|---|---|
GPRS | 3G | LTE | 8GB | 16GB | ||
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
Top view
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.
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.
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.
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.
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
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.
ssh atreyo@your_gateway_ip
Use credential : user/pass: atreyo/12345
To obtain root rights, type in the terminal:
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')
/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.
lsblk
df -H
Packages installation
Debian does not have all the packages installed. you can install needful manually as per need using below commands.
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.
sudo apt-get update
And:
sudo apt install curl
Bash
To install Bash, type the following command:
sudo apt-get update
And:
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.
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.
sudo apt-get update
Enter below command to start node-red installation process:
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'.
Wait for above process to be finished!
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)
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:
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.
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:
sudo npm install pm2@latest -g
If ask to " run `npm fund` for details", do the same and process for next command:
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.
If user is "root" proceed to below command or else skip this step.
pm2 save
pm2 startup
For changing user from "normal user" to "root" for node-red startup, follow below steps:
sudo pm2 start node-red -u root
sudo pm2 save
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"
sudo pm2 startup
sudo pm2 save
Reboot the device, for cross checking and verifying proper installation.
once rebooted, check below command:
ps -aux | grep pm2
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 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.
Webmin installation
Start the gateway and launch the terminal. Enter the commands below.
curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh
sh setup-repos.sh
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:
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 or 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
Once you sign in with password, below interface will open and it's a dashboard of webmin.
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
OpenPLC
OpenPLC is an open-source 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.
sudo apt-get install git
Once installed, type the following command:
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
After logging in, we go to the home screen.
To learn how to use OpenPLC you can read on the site:
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
After logging in, you are automatically taken to the application page.
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 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.
Mostly the network operator requires you to enter the APN, sometimes it also requires a username and password. Enter the required data and save.
Then go to System > Custom Commands and click on Start modem.
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.
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.
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 Version | File name | Kernel |
Debian |
Date |
V-1.00 |
5.10.146 | 11 (Bullseye) |
Information about future releases of OpenWRT for this computer.
OS Version | File name | Kernel |
OpenWRT |
Date |
V-1.00 | 5.10.146 | 23.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.