How to Run .NET Applications on MG460 / RobustOS Pro Gateway

How to Run .NET Applications on MG460 / RobustOS Pro Gateway

Installation

#Download and run the installation script
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel Current

#Add .NET to your PATH
echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.bashrc
echo 'export PATH=$PATH:$HOME/.dotnet' >> ~/.bashrc
source ~/.bashrc

#Verify installation
dotnet --version

Creating and Running a Simple Test Application

#Create a new directory for your test app
mkdir -p ~/dotnet-test
cd ~/dotnet-test

#Initialize a new console application
dotnet new console

#Replace the default Program.cs with a simple test
cat > Program.cs << 'EOF'
// Simple test program for MG460 Gateway
Console.WriteLine("MG460 Gateway .NET Test");
Console.WriteLine($"Current Date/Time: {DateTime.Now}");
Console.WriteLine($".NET Version: {Environment.Version}");
Console.WriteLine($"OS Version: {Environment.OSVersion}");

// Test file operations
try {
    File.WriteAllText("test.txt", "Hello from .NET on MG460 Gateway!");
    string content = File.ReadAllText("test.txt");
    Console.WriteLine($"File test successful: {content}");
} 
catch (Exception ex) {
    Console.WriteLine($"File test error: {ex.Message}");
}

Console.WriteLine("Test completed successfully!");
EOF

#Build the application
dotnet build

#Run the application
dotnet run
This basic guide demonstrates that your MG460 Gateway can successfully run .NET applications, which is the foundation needed for potentially replacing the component with your device.
    • Related Articles

    • Deploying Applications with Docker on RobustOS Pro

      This document guides developers on installing and using Docker on RobustOS Pro devices (firmware version 2.4.0 or higher), and demonstrates application deployment and management in containers through a specific example: creating a Web application ...
    • How to Configure APN on RobustOS Pro Gateways (EV8100, EG5100 Series, R1520LG, LG5100, EG5200, MG460)

      Overview This guide provides step-by-step instructions for configuring a custom Access Point Name (APN) on Robustel gateways running the RobustOS Pro system, including models such as EV8100, EG51xx series, R1520LG, LG5100, EG5200, and MG460. It ...
    • RobustOS Pro SDK

      Robustel enables third-party developers to build custom applications. The SDK provides a comprehensive toolset and a streamlined environment to implement customer-specific functions directly on our edge gateways and routers. Supported Models: EG5xxx ...
    • RobustOS Pro Third-Party Application Development Guide

      1. Quick Overview What is RobustOS Pro? RobustOS Pro is an embedded Linux distribution based on Debian 11 (bullseye), designed specifically to meet the demanding requirements of industrial IoT gateways, providing a high degree of customization and ...
    • RobustOS Pro Application Development Getting Started

      Preface Welcome to RobustOS Pro! This guide provides a step-by-step roadmap for understanding, developing, and deploying applications on the platform. This document is only applicable to RobustOS Pro 2.4.x firmware versions. System Architecture ...