Setting up an Ad-Hoc network
When you need to connect GPS2IP to another machone without a router, you can connect the two devices directly to each other.
This is called an Ad-Hoc network.
Choose the device to set up an Ad-Hoc network
You can choose which device to set up the network on, and then connect the other device to that network.
For example, you can set up the network on your PC, and connect to that wifi network with your iPhone.
For the sake of battery life, and general reliability, we always recommend to host the network on the PC
If you want to set up the network on your iOS device, Apple calls this a "Hotspot":
Configure a Hotspot on iOS
If you have a cellular connection in your iPhone, you can enable "Personal Hotspot" .
This means your iPhone will act like a wi-fi router, and you can connect to the new wi-fi network that it provides.
To set up Personal Hotspot:
- Go to Settings > Cellular
- Tap Personal Hotspot, then tap the slider to turn it on
- (Make sure you leave wi-fi on, so that you can connect to the new wi-fi network!)
If you don't see the option for Personal Hotspot, contact your carrier to make sure that you can use Personal Hotspot
with your plan.
Once you have enabled Personal Hotspot, when you select Hotspot in the GPS2IP Network
Selection settings, you will be
able to connect to it over wifi from any other device.
If you are using TCP ur UDP push, you will need the other device to connect to the Hotspot before determining the
IP address of that device.
Be sure to check the Hotspot IP address by pressing the little
next to the Hotspot
selection.
Warning
If HotSpot is operating, your data usage may be high if network access is required for anything connected to the
device
running GPS2IP.
For example, Navionics syncs information, and can use quite a lot of data.
Please disable these features if you do not have a high data allowance.
In iOS 11, it can take a few minutes for your device to configure itself properly for some reason.
If you get a message 'Not Available' in GPS2IP when you press the next to the
Hotspot setting, then try waiting a minute or so..
Once your Hotspot is configured, you can connect your computer to that wifi network.
Configure an Ad-Hoc network on your PC
You can set up a wifi network on your PC, and then connect your iOS device to it.
Your device might end up with an IP address of something like 169.254.52.233.
Windows has changed the method of creating an ad-hoc netwqork quite dramatically over the years..
Windows 8 had a native "Create AdHoc network" option in the settings, but that has been removed in Windows 8.1 & 10, unfortunately.
For Windows XP
- Open the Start menu, and click My Network Places
- Click View network connections from the left side of the window
- Find your wireless network connection, right click on it, and click Properties
- Click the Wireless Networks tab
- Click Advanced
- Select Computer-to-computer (ad hoc) networks only then click Close
- Click Add
- Give your network a name (this is what you will connect to later on your iPhone)
- Set up a password for your network if you wish. Uncheck the box next to The key is provided for me automatically if you want to enter a password. Select Disabled in the Data encryption drop down menu if you do not wish to have a password
- Click OK
- Click OK
For Windows Vista
- Open the Start menu and click Control Panel
- Click Network and Internet
- Click Network and Sharing Center
- Click Set up a connection or network from the left side of the window
- Choose Set up a wireless ad hoc (computer-to-computer) network.
- Click Next
- Click Next
- Enter a name
- Set up a password for your network if you wish
- Click Next and Close
- Click Close
For Windows 10
- Open the Windows Command Prompt ( + X, then click Command Prompt)
- Firstly, make sure your wifi adapter supports setting up an ad-hoc network: type
netsh wlan show drivers
at the prompt:
Microsoft Windows [Version 10.0.16299.192]
(c) 2017 Microsoft Corporation. All rights reserved.
C:\Users\username>netsh wlan show drivers
It should output something like the following. We are looking for Hosted network supported : Yes
Interface name: Wi-Fi
Driver : 300Mbps Wireless High Power USB Adapter
Vendor : TP-LINK Technologies Co.
Provider : Microsoft
Date : 4/03/2016
Version : 1027.4.630.2015
INF file : rtwlanu_oldIC.inf
Type : Native Wi-Fi Driver
Radio types supported : 802.11n 802.11b 802.11g
FIPS 140-2 mode supported : Yes
802.11w Management Frame Protection supported : Yes
Hosted network supported : Yes
Authentication and cipher supported in infrastructure mode:
Open None
WPA2-Personal CCMP
Open WEP-40bit
Open WEP-104bit
Open WEP
WPA-Enterprise TKIP
WPA-Personal TKIP
WPA2-Enterprise TKIP
WPA2-Personal TKIP
WPA-Enterprise CCMP
WPA-Personal CCMP
WPA2-Enterprise CCMP
Vendor defined TKIP
Vendor defined CCMP
Vendor defined Vendor defined
Vendor defined Vendor defined
WPA2-Enterprise Vendor defined
WPA2-Enterprise Vendor defined
Vendor defined Vendor defined
Vendor defined Vendor defined
Authentication and cipher supported in ad-hoc mode:
Open None
Open WEP-40bit
Open WEP-104bit
Open WEP
WPA2-Personal CCMP
Wireless Display Supported: Yes (Graphics Driver: Yes, Wi-Fi Driver: Yes)
-
Think of a name for your new network, and a password.
We'll use adHocNet
as the network name, and goodPassword
as the password.
- Type
netsh wlan set hostednetwork mode=allow ssid=adHocNet key=goodPassword
(remember to change the network name and password to the ones you chose!).
C:\Users\username>netsh wlan set hostednetwork mode=allow ssid=adHocNet key=goodPassword
The hosted network mode has been set to allow.
The SSID of the hosted network has been successfully changed.
The user key passphrase of the hosted network has been successfully changed.
-
Now, we start the network.
Type netsh wlan start hostednetwork
.
C:\Users\username>netsh wlan start hostednetwork
The hosted network started.
-
You may need to reset the network adapter before you can see the network on your iOS device.
Wait a minute or so, and if you can't see the network adHocNet
, then type ipconfig /renew
.
C:\Users\username>ipconfig /renew
Windows IP Configuration
An error occurred while renewing interface vEthernet (Default Switch) : unable to contact your DHCP server. Request has timed out.
No operation can be performed on Wi-Fi while it has its media disconnected.
No operation can be performed on Local Area Connection* 10 while it has its media disconnected.
An error occurred while renewing interface Local Area Connection* 11 : unable to contact your DHCP server. Request has timed out.
Ethernet adapter vEthernet (Default Switch):
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::883f:8376:84ba:9f6b%8
Autoconfiguration IPv4 Address. . : 169.254.159.107
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::6555:e5f4:3e91:adba%16
IPv4 Address. . . . . . . . . . . : 192.168.0.108
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
Wireless LAN adapter Wi-Fi:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Local Area Connection* 10:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Local Area Connection* 11:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::d1d8:8d02:a795:821%45
IPv4 Address. . . . . . . . . . . : 192.168.137.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Tunnel adapter Teredo Tunneling Pseudo-Interface:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
C:\Users\username>
- At this point, you should be able to connect to your new network
adHocNet
with your iOS device!
Apple has significantly changed this process in OSX 10.10 (and later).
The old method (pre OSX 10.10.x)
- Open the Airport Menu from the top right of your screen
- Click on Create Network
- Enter a name, and a password if you wish to. Leave the Channel Field as is
- Click OK
The new method (OSX 10.10 and after)
This used to be relatively easy, but in OSX 10.10, Apple preferred to obfuscate the process, while disabling the option to password protect the network at the same time. It makes no sense - but there you are..
There is a solution. It's ugly, but it works.
Firstly, in this example, my mac is called miniGus, so please adjust these steps according to the name of your mac.
Secondly, we will create a kind of hidden network, I have called mine gps2iploopback. Change this name if you like.
- Open up a Terminal. (Here's how to do that)
- Type:
sudo networksetup -createnetworkservice gps2iploopback lo0
(That last thing you typed was <small L> <lowercase 'O'> <the number zero>)
- Hit return, and type in your password.
- Type:
sudo networksetup -setmanual gps2iploopback 172.20.12.12 255.255.255.255
- Hit return, again..
- Now we have created a kind of network, we need to enable it
- Go into System Preferences on your mac
- Then the Sharing section
- Go down to Internet sharing service on the left, and highlight it
- On the right, where is says Share your connection from: select the network you just created (gps2iploopback in this example)
- Next, below that, enable Wi-Fi for To computers using:
-
By clicking the Wi-Fi Options button, you can set the password, and other wi-fi settings
By default the network visible to other devices will be your machine name miniGus in my case.
You can call this network anything you like - it is what you will be connecting to from your iPhone/iPad.
- Make sure Internet Sharing is enabled by checking the box next to the service
- It will ask you if you are sure. You are - click Start
-
At this point, your mac should have created a Wi-Fi network that you can connect to with your other devices.
If your mac has an internet connection, so will your devices.
If your mac has no connection, you can still connect devices to it, but they won't have any internet connection. This is not necessary for most navigation software.
-
On your iPhone/iPad, go into settings and connect to the Wi-Fi network you just created.
(miniGus in my case). Enter the password you just created in step 12, and you should be connected.
-
Now that you are connected, you can choose with method of communication you require/prefer: