Skip to main content

Posts

Install Winget on Windows 2022 or Windows 10 LSTC

Install Winget on Windows 2022 or Windows 10 LTSC Install Pre-reqs Install Microsoft.UI.Xaml/2.7.3 Navigate to https://www.nuget.org/packages/Microsoft.UI.Xaml/2.7.3 , on the left side look for Download Package button to download microsoft.ui.xaml.2.7.3.nupkg. Using 7-zip, extract microsoft.ui.xaml.2.7.3.nupkg\microsoft.ui.xaml.2.7.3.nupkg\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.7.appx Install PS C:\>Add-AppxPackage .\Microsoft.UI.Xaml.2.7.appx Install Microsoft.VCLibs.140.00.UWPDesktop Download https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx Install PS C:\>Add-AppxPackage .\Microsoft.VCLibs.x64.14.00.Desktop.appx Install Winget Download Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle or any recent versions (tested using 1.6.2771) from Github Download license file 27abf0d1afe340e7a64fb696056b2672_License1.xml (should be one of the artifacts) from Github, the same URL from above. Install PS C:\cd ~/Downloads PS C:\Users\u1\Down

Fedora 32 Workstation installation screen capture

Just an itch, wanted to see how Fedora 32 Workstation looks like. For other versions see  here .

Get Network Interface Card GUID in Windows

Get Network Interface Card GUID in Windows Method 1 - using netsh PS C:\> netsh lan show interfaces Below shows sample output There is 1 interface on the system: Name : Ethernet Description : Microsoft Hyper-V Network Adapter GUID : 17ab0088-6ca5-4aac-82bb-c533700cda21 Physical Address : 00-15-5D-1C-45-00 State : Connected. Network does not support authentication. Method 2 - using PowerShell WMI PS C:\> Get-CimInstance -ClassName Win32_NetworkAdapter | Select-Object -Property DeviceID, GUID, Name Below shows sample output DeviceID GUID Name -------- ---- ---- 0 Microsoft Kernel Debug Network Adapter 1 {17AB0088-6CA5-4AAC-82BB-C533700CDA21} Microsoft Hyper-V Network Adapter 2 WAN Miniport (SSTP) 3

Control Panel console command equivalent

There are cases where you might need to run some of the Control Panel applets to perform quick configuration like add user accounts under different user credentials(say administrator account). Anyway below lists the files and equivalent Control Panel applet. Command Description access.cpl Accessibility Options appwiz.cpl Add or REmove Programs bthprops.cpl Bluetooth configuration desk.cpl Display Properties firewall.cpl Windows Firewall hdwwiz.cpl Add Hardware Wizard inetcpl.cpl Internet Properties intl.cpl Regional and Laguage Options irprops.cpl Infrared Properties joy.cpl Game Controllers jpicpl32.cpl Java Control Panel main.cpl Mouse Properties mmsys.cpl

Enable SSH server on QNX 6.5

This is quick start guide how to run ssh server on QNX. Tested on QNX 6.5 (650SP1-VM.tar). # ssh-keygen -t dsa -b 1024 -f /etc/ssh/ssh_host_dsa_key -N '' # ssh-keygen -t rsa -b 1024 -f /etc/ssh/ssh_host_rsa_key -N '' This is not security best practice but this is only a test machine. Enable direct root ssh login to the machine. # sed -i 's/#PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config To start ssh service interactively, do: # /usr/sbin/sshd Use /usr/sbin/sshd -ddd to view debug output To run sshd on start, add the following to /etc/rc.d/rc.local : /usr/sbin/sshd & Reference: http://www.qnx.com/developers/docs/660/index.jsp?topic=%2Fcom.qnx.doc.neutrino.utilities%2Ftopic%2Fs%2Fsshd.html

Using INTEL PRO/1000 Gigabit driver in QNX 6.6 running on VMware ESXi

Using INTEL PRO/1000 Gigabit driver in QNX 6.6 running on VMware ESXi When installing QNX 6.6 using VM-QNXSDP660-201402230339.iso on VMware ESXi (8.0 update 2) the default network apapter used is AMD Lance PCNet 32 . The PCNet 32 driver reports to only support 10Mbps, for cases where higher network bandwidth is needed Intel PRO/1000 Gigabit is a good choice. To load Intel PRO/1000 Gigabit , edit /etc/rc.d/startup_aps.sh and comment out pcnet.so driver and add dirver for e1000 , like: #io-pkt-v4-hc -d /lib/dll/devn-pcnet.so & io-pkt-v4-hc -d /lib/dll/devnp-e1000.so &

Installing Vim 7.2 in QNX 6.5 using pkgsrc

Installing Vim 7.2 in QNX 6.5 using pkgsrc QNX 6.5 self-hosted Neutrino host ships with vi but Vim 7.2 is a big imporovement over the default application. Below are the steps to install Vim 7.2 using pkgsrc. Download the bootstrap package http://archive.netbsd.org/pub/pkgsrc-archive/packages/QNX/i386/6.5.0_head_20110826/bootstrap.tar.gz Download Vim package and dependencies from the link below http://archive.netbsd.org/pub/pkgsrc-archive/packages/QNX/i386/6.5.0_head_20110826/All vim-share-7.2.446.tgz libiconv-1.14.tgz gettext-lib-0.18.1.1.tgz vim-7.2.446nb1.tgz Copy the files into /tmp using ftp, Momentics IDE, sftp, etc #: ls /tmp bootstrap.tar.gz vim-share-7.2.446.tgz libiconv-1.14.tgz gettext-lib-0.18.1.1.tgz vim-7.2.446nb1.tgz Install bootstrap package into the root folder #: tar -xvzf bootstrap.tar.gz -C / Add pkgsrc utilities into the path #: echo 'export PA

How to apply QNX 6.5 SP1 into an existing QNX self hosted installation

How to apply QNX 6.5 SP1 into an existing QNX self hosted installation This was tested on VirtualBox with QNX 6.5.0 self-hosted Neutrino host. Below are the quick steps Mount the QNX 6.5 SP1 iso (qnxsdp-6.5.0SP1.iso) Run the following command in QNX terminal Load CD/DVD-ROM driver devb-eide cdrom Mount the cd/dvd-rom mount -t cd /dev/cd0 /cd Install the update cd /cd sh ./qnxsdp-6.5.0SP1-201206270843-nto.sh

Building in QNX Momentics 6.5 SP1 throws "Couldn't reserve space for cygwin's heap, Win32 error 0"

Building in QNX Momentics 6.5 SP1 throws "Couldn't reserve space for cygwin's heap, Win32 error 0" Buiding barebones QNX C++ program throws "Couldn't reserve space for cygwin's heap, Win32 error 0". See sample output below C:\QNX650\host\win32\x86\usr\bin\make.exe -k CPULIST=x86 all --file=C:/Users/u1/AppData/Local/Temp/QMakefile169726255947317724.tmp 0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487 AllocationBase 0x0, BaseAddress 0x71690000, RegionSize 0x330000, State 0x10000 C:\QNX650\host\win32\x86\usr\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0 C:/QNX650/host/win32/x86/usr/bin/make.exe -j 1 -Cx86 -fMakefile all make.exe[1]: Entering directory `C:/ide-4.7-workspace/test1/x86' C:/QNX650/host/win32/x86/usr/bin/make.exe -j 1 -Co -fMakefile all make.exe[2]: Entering directory `C:/ide-4.7-workspace/test1/x86/o' make.exe[2]: Nothing to be done for `all'. make.exe[2]:

Eclipse shortcut keys

This are some of the shortcut keys that I find useful while working with Eclipse . Key Action Ctrl+/ Comment out the current line Ctrl+\ Uncomment the current line Ctrl+D Delete the current line Ctrl+M Maximize editor view Ctrl+Alt+Arrow Up Duplicate current line, maintain caret location Ctrl+Alt+Arrow Down Duplicate current line, move caret location down Ctrl+Shift+p Find matching bracket Window Navigation Ctrl+F7 Move to different views. Ctrl+F6 Move to different editor windows Alt+Shift+Q+C Focus Console View Alt+F7 Switch between different consoles Misc Ctrl+O Quick Outline

Doing winget install fails with a message "Failed when searching source: msstore An unexpected error occurred while executing the command: 0x8a15005e : The server certificate did not match any of the expected values."

Doing winget install fails with a message "Failed when searching source: msstore An unexpected error occurred while executing the command: 0x8a15005e : The server certificate did not match any of the expected values." I tried to install Windows Terminal using the command below - C:\>winget install Microsoft.WindowsTerminal But got the following error message instead. Failed when searching source: msstore An unexpected error occurred while executing the command: 0x8a15005e : The server certificate did not match any of the expected values. The following packages were found among the working sources. Please specify one of them using the --source option to proceed. Name Id Source ------------------------------------------------- Windows Terminal Microsoft.WindowsTerminal winget Reason: This is normally caused by SSL inspection used in enterprise environments. Workaround: C:\>winget settings --enable BypassCertificatePinningF

Minimal OPC UA client that auto generates self signed certificate on startup in C#

Minimal OPC UA client that auto generates self signed certificate on startup in C# This is minimal OPC UA client in C# that demonstrates self signed certificate auto generation on startup. Pre-Req Visual Studio 2022 Community Edition ConsoleReferenceServer running in the another console Steps Using Visual Studio, create C# .Net 6.0 Application Add a nuget reference to OPCFoundation.NetStandard.Opc.Ua.Client Copy/paste code from gist below into Program.cs and run it Full working code can be found here .

OPC UA Read service using C#

OPC UA Read service using C# This is a sample bare bones OPC UA C# application performing a Read service. Pre-Req Visual Studio 2022 Community Edition Run sample ConsoleReferenceServer Steps Using Visual Studio, create C# .Net 6.0 Application Add a nuget reference to OPCFoundation.NetStandard.Opc.Ua.Client Copy/paste code from gist below into Program.cs Full working code can be found here .

Batch convert file line ending from Windows to Linux using Notepad++

Batch convert file line ending from Windows to Linux using Notepad++ Working on cross-platform project means you have to be careful with file line endings. If for some reason the files were not using the correct line endings Notepad++ can be used to do batch conversion of the files. To do so, open Find in Files (Ctrl+Shift+F) and use the following options: Find what: (\r\n) Replace with : \n Filters : *.* Directory : C:\Temp Search Mode: (o) Regular expression

ESXi 6.5.0 fails to start a VM with a message "Maximum virtual machines limit reached: ## (#### worlds)"

Maximum virtual machines limit reached: ## (##### worlds) ESXi 6.5.0 by default determines the maximum number of VMs dynamically at runtime. In certain scenarios this might be too conservative and you will not be able to start a virtual machine. If you are observing a message like below when starting a VM then you have hit the limit. Maximum virtual machines limit reached: ## (##### worlds). This behavior is controlled by VMkernel.Boot.maxVMs in Advanced settings . Change this to a value that might be reasonable based on CPU, memory and network capacity. The same setting can be changed from SSH shell like below: [root@localhost:~] esxcli system settings kernel set -s maxVMs -v 1024 Reboot the server for this change to take effect. Tag: ESXi

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 ConsoleReferen