Saturday, July 15, 2023

Running OPC UA .Net Standard PubSub reference server on Ubuntu 22.04 using dotnet-sdk-6.0

Running OPC UA .Net Standard PubSub reference server on Ubuntu 22.04 using dotnet-sdk-6.0

System info:
OS: Ubuntu 22.04
OPC UA .Net Standard under test: 1.4.371.96

Install MQTT broker

$: sudo apt install mosquitto

Install dotnet-sdk-6.0

$: sudo apt install dotnet-sdk-6.0

Install git as needed

$: sudo apt install git

Clone OPC UA .Net Standard git repo

$: mkdir ~/prj
$: cd ~/prj
$: git clone https://github.com/OPCFoundation/UA-.NETStandard.git
$: cd UA-.NETStandard
$: git checkout refs/tags/1.4.371.96

Run publisher

$: dotnet run --project Applications/ConsoleReferencePublisher/ConsoleReferencePublisher.csproj --framework net6.0

Run subscriber (on another terminal)

$: cd ~/prj/UA-.NETStandard
$: dotnet run --project Applications/ConsoleReferenceSubscriber/ConsoleReferenceSubscriber.csproj --framework net6.0

Unable to install updates (null): cannot refresh "snap-store": snap "snap-store" has running apps (snap-store)

Unable to install updates
(null): cannot refresh "snap-store": snap "snap-store" has running apps (snap-store), pids:#####

Using Ubuntu Software to update Snap packages failed on Ubuntu 22.04.
To fix it run the following:
$: killall snap-store
$: snap refresh

Running OPC UA .Net Standard PubSub reference server on Ubuntu 20.04 using dotnet-sdk-3.1

Running OPC UA .Net Standard PubSub reference server on Ubuntu 20.04 using dotnet-sdk-3.1

High Level Info:


OPC UA .Net Standard under test: 1.4.371.96
OS: Ubuntu 20.04 (>20.04 not working due to dotnet-sdk-3.1 is not supported)

Install dotnet-sdk-3.1

$: wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
$: sudo dpkg -i packages-microsoft-prod.deb
$: rm packages-microsoft-prod.deb
$: sudo apt update
$: sudo apt install dotnet-sdk-3.1

Clone OPC UA .Net Standard git repo

$: mkdir -p ~/prj
$: git clone -b 1.4.371.96 https://github.com/OPCFoundation/UA-.NETStandard.git

Install MQTT broker Mosquitto and supporting tools

$: sudo apt install mosquitto
$: sudo apt  install mosquitto-clients

Run mqtt sub client to see traffic

$: mosquitto_sub -h localhost -v -t '#'

Run reference PubSub publisher

$: cd ~/prj/UA-.NETStandard/Applications/ConsoleReferencePublisher
$: dotnet run --project ConsoleReferencePublisher.csproj --framework netcoreapp3.1

Run reference PubSub subscriber

$: cd ~/prj/UA-.NETStandard/Applications/ConsoleReferenceSubscriber
$: dotnet run --project ConsoleReferenceSubscriber.csproj --framework netcoreapp3.1
Ref(s):
Install the .NET SDK or the .NET Runtime on Ubuntu

Fedora install screen chronicle

Fedora install screen chronicle Below are links to Fedora installation screens. It is interesting to see how it has evolved over time. Fe...