🛠 Deploying an Industrial IoT Gateway with the BIOSTAR EdgeComp MS-U320
Objectives
This tutorial aims to transform the BIOSTAR EdgeComp MS-U320 industrial mini PC into a reliable IoT gateway for collecting data from Programmable Logic Controllers (PLCs) and industrial sensors. We will leverage the card's unique ability to manage four COM serial ports simultaneously while ensuring robust data transmission via its two 2.5GbE Ethernet interfaces. The focus is on stability under continuous load and optimizing the performance of the Intel Wildcat Lake SoC for local data processing before sending it to the cloud or a central server.
Required Materials
- BIOSTAR EdgeComp MS-U320 card (Core 5 320 recommended for NPU processing).
- Stabilized 12V-24V DC power supply.
- Two Cat6 Ethernet cables.
- RS485/RS232 serial cables according to your industrial peripherals.
- Pre-installed or added NVMe M.2 SSD (PCIe Gen4).
- M.2 WiFi/5G module (optional for redundancy).
- Operating System: Ubuntu 24.04 LTS (recommended for server stability).
Steps
- Physical Preparation and BIOS: Mount the card in its fanless enclosure. Connect power and network cables. At startup, access the BIOS (Delete key) to disable CPU power-saving features (C-States) to guarantee constant latency. Enable Auto-Boot.
- System Installation: Install Ubuntu 24.04 Server. During partitioning, reserve a separate partition for logs to avoid system saturation. Once installed, update packages:
sudo apt update && sudo apt upgrade -y
- Serial Port Configuration: The MS-U320 exposes four COM ports. Identify serial devices via
dmesg | grep tty. Install serial management tools:
sudo apt install minicom
Configure serial port access permissions for the current user:
sudo usermod -aG dialout $USER
- Redundant Network Setup: Configure the two Ethernet interfaces (I226-V and I226-LM) in bonding mode (mode 1 for failover) or separate VLANs according to your architecture. Edit
/etc/netplan/01-netcfg.yamlto define static IP addresses and default routes.
- Collection Service Deployment: Use Python with the
pyseriallibrary to read data from sensors connected to COM ports. Example script for reading serial data on COM1 (ttyS0):
import serial
import time
try:
ser = serial.Serial('/dev/ttyS0', 9600, timeout=1)
while True:
if ser.in_waiting > 0:
data = ser.readline().decode('utf-8').strip()
print(f"Data received: {data}")
# Local processing with NPU here if needed
time.sleep(0.1)
except Exception as e:
print(f"Error: {e}")
- Temperature and Log Management: Monitor SoC temperature via
sensors. Configurelogrotateto limit log file sizes and preserve NVMe SSD lifespan.
Verification
Verify that serial ports are accessible by sending an AT command or reading data from a simulated sensor. Test network redundancy by unplugging one Ethernet cable: the connection should switch to the other port without service interruption. Use ethtool to confirm 2.5GbE negotiation. Check that the temperature remains below 70°C under 100% CPU load for one hour.
Further Reading
Integrate a lightweight AI model using the Core 5 320's 16 TOPS NPU for local anomaly detection before data transmission. Explore the use of the M.2 5G module to ensure cellular backup connectivity.