Hvordan kompilere eldre .NET / C# prosjekter fra Visual Studio i VSCODE (notes to self)

Må ha support for C# utvikling installert i VSCODE. Hvis det er et eldre prosjekt som man henter opp som er laget i Visual Studio så må man ha C# Dev kit installert siden det støtter MSBUILD projects osv. 


Må sjekke at ikke det er feil versjon av dotnet som kjøres med kommando dotnet --info
Installering i et CMD vindu kan skje med winget: https://learn.microsoft.com/en-us/dotnet/core/install/windows?tabs=net70


X86 path kan være fær X64 path. Rekkefølgen på path prioriteres
Sjekk PATH ! IKke bare PATH for ALLE brukere, men sjekk path for DIN bruker 
https://github.com/dotnet/core/issues/5962#issuecomment-780084535 MRK denne tutorialen fokuserer på SYSTEM PATH men det var YOUR ACCOUNT PATH som var feil 
Hvis path peker til x86 versjonen av dotnet mens du har installert dev packs osv for X64 versjonen av dotnet så får du feilmeldinger i VSCODE
Må ha core dev installert
List hva som er installert med "dotnet --list-sdks" 


Må modde .csproj fila i det opprinnelige prosjektet for å få kopmpilert med VSCODE

<Project Sdk="Microsoft.NET.Sdk">


    <PackageReference Include="System.Resources.Extensions" Version="5.0.0" />



Måtte konvertere .csprj fila til nytt format som VSCODE ville godta (fikk build feilmelding) 
Brukte dette toolet på kommandolinje: https://treit.github.io/c%23,/programming/2019/02/18/ConvertingCsProjectsToNewSdkFormat.html

dotnet tool install --global Project2015To2017.Migrate2017.Tool
conv HelloWorld.csproj

Litt mer info om konvertering til nytt CSPROJ format: https://www.hanselman.com/blog/upgrading-an-existing-net-project-files-to-the-lean-new-csproj-format-from-net-core

Icom tuning / ATU controls

Icom Tune Control Plug – – Credit goes to KC2WI

According to KC2WI: An easy way to put most Icom radios into 10W CW for adjusting a manual tuner is with a tune control plug. All you need to make one is a pushbutton, 10K* resistor, and 4-pin Molex connector.** Connect the 10K resistor between pins 2 & 3, and the pushbutton between pins 1 & 4.

If you add a SPST switch in series with the resistor, you can switch the radio between using or bypassing the internal tuner without having to disconnect the tune controller.

My IC-746pro will switch between internal and external tuner without power cycling the radio. When you switch the “external” tuner in, the internal tuner is bypassed, but it remembers the last setting. So you could have an antenna that is resonant at one frequency, matchable with the internal tuner on another, and matchable with an external manual transmatch on another. If your transmatch has a bypass position, you could rapidly switch between 3 different frequencies/bands without ever having to actually retune.

This may also work on some other Icoms. However, my 706 will not recognize that a “tuner” is connected unless it is connected when the radio is powered on. I haven’t tried it on other radios. See note below for the IC-7000***.

    diagram created using Kunky Schematic Drawing

Molex connector:
Radio Shack:RS 274-224
DigiKey:Connector: WM1326-ND Molex 03-09-2042 Connector Plug Housing, 4-pin
Pins for Connector: WM1100-ND Molex 02-09-2103

*For this simple pushbutton circuit you can also modify a male computer internal power connector (from a hard drive, CD drive, power extender cable, etc.). The pin spacing is identical but the keying of the housing is different. Just snip off some of the plastic from the housing so the connector fits on the radio. It won’t have the proper keying but it doesn’t matter because the connections are symmetrical.*** So you can basically make the whole thing from junk box parts.

**Other schematics show 47K or 100K.

***IC-7000 Caution: There has been some discussion about differences between the IC-7000 and other radios, and possible dangers of using tune controls designed for other Icoms on the 7000. One main issue appears to be that improper loading of or voltage on pin 1 will cause a malfunction of the fan control circuit leading to overheating. Note that pin 1 in the circuit above is open except during the tune activation. There is also a caution that connecting pin 2 to 12V is a problem because pin 2 has snubber diodes connected to the 5V bus. See the thread at groups.yahoo.com/group/ic7000/message/30151. AD5X presents an alternate circuit which incorporates a zener diode between pin 2 and 4 to limit the voltage (seewww.ad5x.com/images/Articles/TuningIntfc706.pdf). If you build the circuit with the diode note that having a proper keyed connector becomes important. If you use it with tthe SPST int-ext switch I would put the diode between pin 4 and the switch end of the resistor rather htan direct to pin 2. Steve W3AHL has made some measurements on the IC-7000 which suggest that the resistor should be a higher value than 10K. AD5X uses 47K.


Icom Autotuner Connector pinout:

Pin 1 is the KEY pin, when the ‘TUNE’ button is pressed, it’s pulled low by the tuner to tell the radio to start transmitting. This is the green wire on the AH-4 cable.

Pin 2 is the START pin to/from the microprocessor. Under normal circumstances the START pin is pulled high when a remote tuner is attached to tell the radio that the tuner is present. When you press ‘TUNE’ the radio pulls the pin low telling the tuner to start the matching sequence. This is the white wire on the AH-4 cable.

Pin 3 is POWER rated for 1 amp max and switches on and off with the radio. This is the red wire on the AH-4 cable.

Pin 4 is ground. This is the black wire on the AH-4 cable.

Additional Information and References:

AH-4 Tuner Info – K9EQ

Manual controller AT-140 but should work for AH-4

Original pushbutton circuit – pictorial diagram at http://www.hampedia.net/icom/ic-718-tune-controller-mod.php

Simple timer circuit info: http://www.hampedia.net/icom/ic-706-10-watt-tune-modification-an-icom-ic706-tune-trigger.php

Info on KG6MVB and AB2CT timer circuits: www.qsl.net/kg6mvb/tuner.html

Credit goes to KC2WI for this info. Use at your OWN risk.

LC Impedance matching networks regions of operation on the Smith chart

Here is an overview of what configuration of LC matching networks for RF applications you should use based on where on your Smith chart the load (antenna impedance) is located. Tricks: to place the series reactive element closest to where the resistance is lower. Since you know you also need a parallel reactive element, that comes furthest away from where the resistance is lowest. In most cases for HF / antenna / amateur radio applications the antenna resistance is higher than 50 ohms. However take care to correct for the impedance transformation that occurs along the feedline to the antenna.

Credit for the illustrations: VA3IUL
Here is VA3IULS PDF document:

How does FT8 work?

FT8 is unfortunately impacting amateur radio negatively. CW and SSB activity goes down and the modes that require serious skills to operate are not practiced. FT8 can today run fully automated QSOs. However FT8 is interesting from a technical view. Advanced techniques such as FFT, correlation, 7×7 Costas matrixes are used to synchronize, error correct and decode data. Here is an interesting presentation that gives you a lot of the the technical details. (Reference / Full credit to WB2FKO Mike Hasselbeck)

MQTT and Husdata H66 in Home Assistant

If you have a smart home with a geothermal well feeding a heatpump from IVT or some of the other suppliers, the chance is good that Husdata www.husdata.se has a IoT device for it so you can monitor your heating system in your smart home system.

To set up MQTT for Home assistant, you need to go to Addons, backups and supervisor. Find Mosquitto and install it. Then go to the info tab and select start on boot so it starts again on a boot. Go to configuration and take a note of the network ports for later.

Reboot HA

Then goto Devices and services, check that you see mosquitto

Then you need to set up a new user in HA for mqtt: go to people and zones / select the users TAB. Make a new user with usernamexyz and a safe and long pw. of your choice.

Now go into your husdata H66 web gui on the ip it resides on. Goto the Config tab. Find the MQTT settings. You need to point to the IP of your HA server. Also now give the username and password you did set up in HA earlier.

My MQTT settings look something like this:

Now check the log of the husdata H66. If it says something like “08:03:00 MQTT subscribing to: MAC ADDRESS OF THE H66/HP/CMD/#” then you are good. It will try to connect several times, however after some tries it will go over to try once per hour. Then its best with a reboot of the H66 to speed it up unless you are very patient in your fault finding process.

Now go to the HA user interface: Go to devices and services. Find the mosquitto broker “tile”. If you now see that there are xx entities available in that tile like below, you are good.

Click on all the entities link in the tile and select all the entities you want to get data for. When you are done, click ENABLE SELECTED.

Now do a reboot of both HA and the H66 (it doesn’t hurt).

Now you should be ready to make dashboards and use the sensors.
Also, check this tutorial out: https://learn.adafruit.com/set-up-home-assistant-with-a-raspberry-pi/mqtt-setup

(Disclaimer: you do everything on your own responsibility. The information given may be incorrect. By interfacing to your heat-pump you may change settings that may lead to overheating and/or damage of your heatpump, loss of heat or other problems. If you do not know what you are doing, don’t do it).

Orbi mesh network RBS350 / RBR350 in chained mode (not star mode)

Earlier versions of orbi RBS350 (satellite) and RBR350 (router) before ca. version would have to be set up in chained mode manually. If you have a house where one part of the house does not have coverage from the base the system will now automatically set it self up in chained mode. IN the outermost nodes you even have BOTH 2.4GHz and 5GHz service for the units that want to connect even if the back-haul is wireless and uses 2.4 or 5.

How to fix ORBI wifi mesh setup so all units on the network is visible

If you have experienced that some units on your Wifi network that were previously connected to your fiber or cable router cannot anymore be connected on your internal network – after you installed a set of ORBI mesh units – the reason may be that the ORBI system is not set up in access point mode. If it is set up in router mode, there is an internal firewall that acts in addition to the normal firewall you have in your cable or fiber modem. Log into the orbi unit with orbilogin.com and go to ADVANCED/Advanced/Router/APmode and select AP mode. Reboot the ORBI units and you are all set. All units on your Wifi network are visible (on your internal network). Read more here: https://kb.netgear.com/000061927/What-is-the-difference-between-router-mode-and-AP-mode