For some applications (in my case, Spacedesk), it helps to make the wireless network you are on marked as Private (if it is trusted) so that the firewall allows connections. This is a bit complicated when the wireless network is created by Windows using the Hotspot functionality.
Windows usually creates the hotspot network as 192.168.37.x with your Windows machine set as 192.168.37.1 as the gateway for the connected devices.
(1) Before you get started, switch on your Hotspot and give it a name – in my case, the network is called MSX-WL
and my devices can connect to it.
(2) Next, open up Windows Defender Firewall
and you should see a screen like the one below. It should show you that the firewall is ON and will show you active networks – both private and guest/ public. Look at the list of active networks. If you have not yet marked it Private, you would see your Wi-Fi hotspot network also listed here (maybe, with a number added to it, e.g. “MSX-WL 3” in my case.
(3) Finally, from the Windows run menu (Windows Key + R), run secpol.msc
and that will open the Local Security Policy
manager. Click on Network List Manager Policies
and find your network in the list.
(3B) In case you do not see it, you may need to click on Action > Show all Networks
to pull up the list.
(4) Double click on it and go to the Network Location
tab and change Location type
to Private
.
Once that is done, the network is now marked private and you should be able to let a device on the hotspot access your Windows machine.