Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




37 posts

Geek


Topic # 242882 18-Nov-2018 23:42
Send private message quote this post

How things are now:

 

I have a PC which runs Windows 7 in a headless fashion with no monitor and keyboard, etc. At home when it starts it automatically joins the home Wifi network. I can then remote into this said headless PC from another computer (the "controlling PC") which is also on the same home Wifi network. I have the router assign a reserved IP address to this headless PC, so I know what IP address to use with Remote Desktop. This is all good.

 

 

 

What I want to achieve:

 

However, there are occasions I would like to use this headless PC outside the range of the home Wifi network. When this happens, both the headless PC and the controlling PC would not be able to connect to a Wifi network, and Remote Desktop obviously will not work.

 

 

 

What I have tried:

 

Now I have read about using netsh to create "virtual" access point. I have tried the following successfully:

 

 

 

On the headless PC, while it is still connected to the home Wifi network:

 

Run Cmd as administrator

 

Run netsh wlan set hostednetwork mode=allow "ssid=SSID" "key=KEY" keyUsage=persistent

 

Run netsh wlan start hostednetwork

 

 

 

On the controlling PC:

 

Connect to "SSID" network created by netsh

 

Find out what IP address itself got assigned (e.g. 192.168.173.xx)

 

Remote desktop into the headless PC using 192.168.173.1, changing 'xx' to '1'

 

 

 

My questions:

 

The steps in the above experiment are of little use to me, as they require me setting up the virtual AP with the headless PC connected to the home Wifi network.

 

Even if I am to put a startup script to run netsh automatically, if the headless PC is not connected to the home Wifi DHCP, how is it going to get an IP address?

 

And even if it manages to get an IP address, how do I find out what it is so I can put that into Remote Desktop?

 

Is there some way I can automate the above process? i.e. If the headless PC fails to connect to the home network, I am hoping it will automatically turn itself into a virtual AP and giving itself a pre-determined IP such that I can remote into it?  

 

I hope I have made my questions clear....Any help would be very much appreciated.

 

 


Create new topic
1823 posts

Uber Geek
+1 received by user: 458

Lifetime subscriber

  Reply # 2129091 19-Nov-2018 00:23
Send private message quote this post

Wouldn't it be easiest to stick with hardware devices and avoid the virtual/software device? Simply assume that the absence of a WiFi connection at the headless PC means that the hardware AP will have automatically started. It will be easier to find scripts/batch files to automate this where you are testing for only one IP address at a time.

 

  • On the headless PC check if WiFi is connected. If it isn't then start the AP.
  • On the controlling PC check for the headless PC on the WiFi network - it has a set IP address. If the device isn't there then try to connect to the AP which should also have aknown IP address because you configured it too.

There should be no time when you don't know the IP address of the headless PC. It is either connected to your WiFi network with a know IP address or is an AP with a known IP address.




37 posts

Geek


  Reply # 2129134 19-Nov-2018 09:14
Send private message quote this post

Thanks.
The reason why I wants the virtual solution is because the headless PC is occasionally being used in a portable manner. It is a lower power 12V PC running Atom processor. At home it runs on main but there are times I need to run it on 12v battery when I am in the middle of nowhere with no mains power (The controller PC is a laptop so has its own battery). I do not want to add more hardware which will increase power consumption when it is being used in the portable setting.

I know this can be done in Linux. I have a Raspberry Pi which can join the home wifi when at home but also creates its own wifi network which I can connect to when home wifi is not available. The controlling PC can address it using a host name (e.g http://rpi.local) whether it is on the home network or on the ad hoc network. I would like to duplicate that on my headless PC but I do not have the network know how to do so (the Raspberry Pi runs a prepackaged server image not set up by me).


 
 
 
 


21621 posts

Uber Geek
+1 received by user: 4432

Trusted
Subscriber

  Reply # 2129272 19-Nov-2018 10:42
Send private message quote this post

Add a second USB wifi dongle, many of the realtek ones have software available to turn them into an accesspoint and then just enable internet connection sharing on that second adapter so it has DHCP and a constant IP address on it.





Richard rich.ms

Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.


Geekzone Live »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.