Saturday, April 12, 2014

Create hotspot on your windows machine

Being a developer, you might want to test your localy hosted websites with various mobile devices. The easiest way is to create a virtual hotspot and have the devices connected there. This can be easily done executing the first two commands of the following gist in an administration command prompt (run as admin):
@REM Create the hostednetwork named AbotNetwork and protect
@REM it using the 12345678 password
netsh wlan set hostednetwork ssid=AbotNetwork key=12345678
@REM Start the hostednetwork. Devices should be able to
@REM see the network after that and be able to obtain
@REM an ip on the 192.168.x.x range
netsh wlan start hostednetwork
@REM Stop the hostednetwork
netsh wlan stop hostednetwork
view raw WindowsHotSpot hosted with ❤ by GitHub
Once connected, your devices will get an ip in the range of 192.168.x.y (mine was 192.168.173.something) and the pc will be available on the 192.168.x.1 ip.
In order to disable the hotspot, just run the last command on the gist.