Setting up GPS2IP to push TCP or UDP data

Configure your network settings

In most situations, GPS2IP can be operated on a local network with the other device.
Normally, this would be over wi-fi. In this situation, Socket Mode would operate perfectly in almost all cases.

If you want to receive NMEA data over a much larger distance, you would need to send data over a WAN, such as your device's cellular network.
There may be a problem, however: Depending on your cellular provider, you may not be able to receive incoming connections (as Socket Mode uses).
In this case, you will have to send the data out, rather than receive that initial connection.

This is where the option to push the data over TCP or UDP is invaluable.
Of course, you can easily push NMEA data over your local network just as easily if you want.

Also, some software is written to accept only TPC or UDP data pushed to them.
Check out the list of what some software requires.

In order to use TCP or UDP push, the software you want to connect with must support this method of opening a port and listening for data. Check the documentation of your application to see if this method is supported.


Firstly, in the settings page in GPS2IP, select the appropriate choice under Connection Method:

  • TCP Push
  • UDP Push

For this example, we will be using UDP Push.

Next, select the appropriate Network Selection:

  • Wifi IP if you are on a LAN
  • Cellular IP if you have a data plan with your cellular provider. (Don't forget to enable Mobile Data in iOS Settings)
  • Mobile Data and Personal Hotspot must be enabled in iOS Settings, plus Wifi if you are connecting over Wifi.

For this example, we select Wifi.

Figure out the destination IP address

In Push mode (TCP or UDP, they both function similarly), the IP address of the device running GPS2IP doesn't really matter. As long as you are on the network that the device you are sending the data to, then it doesn't matter.

After you have determined the IP address of the destination, press the little next to the appropriate Connection Method, and enter it in the IP Address field.
(Remember, if you are using a Hotspot connection, you must connect the other device first!)

For this example, the destination IP address we will be sending NMEA data to is 192.168.1.22.
This is the address of a laptop that we will run some software on the check that everything is ok with GPS2IP pushing data over the network.
(The laptop and the iPhone are on the same network!).

Determine the port to transmit to

Some navigation applications have a fixed port that they listen to, and others may be configured as you like.
SeaNav has a default open port of 5323, for example, so we will use that in this example.
Press the little next to the appropriate Connection Method, and enter it in the Port Number field.

We are finished configuring GPS2IP - please return to the main screen.

Test that we can receive GPS2IP data

In order to check that we are transmitting correctly over the network, we can set up a relatively simple test that eliminates any confusing software settings in many navigation programs.
The software is called Packet Sender, and is available on pretty much every operating system. It is free, and awesome.
I will demonstrate using it on a PC, but the operation is near-identical on other systems.

  1. Download Packet Sender, and Install
  2. Run (and allow incoming connections if asked)
  3. Go into Packet Sender settings
  4. Configure as per the settings we determined earlier.
    We are using UDP Push to port number 5323 for this example:
     
    Packet Sender Settings  
  5. Go back to the main screen, and at the bottom, make sure that we are listening on the correct UDP port:
     
    Packet Sender Port Open  
  6. Enable GPS2IP, and if you have configured the Port and IP address correctly, you should receive NMEA data with the messages types you specified in GPS2IP.
     
    Packet Sender Receiving Success  

If you can send and receive data, then all you need to do is configure your application to start receiving GPS data!





Problems?

Please check the following:

  • You are receiving GPS data!
    The Rx value on the main screen of GPS2IP resets back to zero when GPS data is received. Are you getting a good signal?
  • Have you configured the correct destination IP and Port Number in GPS2IP?
  • If you are using Hotspot
    • Is your laptop/device connected to the Hotspot connection?
    • Your iPhone isn't connecting to another wiFi network automatically?
  • Do you have a firewall on your machine or router that is blocking the incoming data?

If you still can't get an data using Packet Sender, please get in touch.