November 7, 2017 How to set up a pair of Wi-Fi Gateways as a NMEA 2000 wireless bridge
A pair of Wi-Fi gateways can act as a NMEA 2000 wireless extender and allows joining of two or more physical networks. Benefits: saving on cables, reducing number of holes in bulkheads, unbeatable galvanic isolation, traffic filtering to reduce load on networks.
Wi-Fi gateways support RAW protocol, which transfers all NMEA 2000 messages (including proprietary), and NMEA 0183 protocol (NMEA 2000 data are converted to/from NMEA 2000). Both protocols can be used to set up a bridge between two NMEA 2000 networks.
With the factory settings, the gateway creates a Wi-Fi network with "YDWG" SSID (network name) and has the IP address 192.168.4.1. To configure the first gateway:
- turn on the gateway, the second gateway must be off;
- connect to the "YDWG" Wi-Fi network via mobile or laptop;
- open "Wi-Fi Access Point" on the administrative web site (http://192.168.4.1/);
- change the default network name (SSID) "YDWG" to anything else, for example, to "MyBoat";
- connect to the "MyBoat" network to check your settings.
Connect the second gateway and configure it to act as a "Wi-Fi" client:
- turn on the gateway and connect to "YDWG" Wi-Fi network;
- open the "Wi-Fi Client" page on the administrative web site;
- in the "IP Address Settings" section, choose "Static IP" and set the IP address to 192.168.4.100, net mask 255.255.255.0, and gateway address 192.168.4.1;
- click the "Save" (not "Save and apply") button in the "IP Address Settings";
- scan for Wi-Fi networks and choose "MyBoat", specify the password and click "Connect!" button;
- connect to the "MyBoat" network and open http://192.168.4.100/ to check your settings.
Figure 1. Example of server's settings
To pair the gateways, you need to set up both using UDP protocol and set the same port number. For example, open the "NMEA Server" page on the second gateway (http://192.168.4.100/) and configure any server to use "UDP" network protocol, "RAW" data protocol and port 1459 in "Both" directions (see Figure 1). Open the same page on the first gateway (http://192.168.4.1/) and configure any server the same as above. Voila!
Be sure that everything works so that you are able to see data from first network in the second one and vice versa. Now we'll show how you can tune your settings.
First, you can add a third gateway. All is done as for the second above but use the next IP address, 192.168.4.101. Congrats, you joined three NMEA 2000 networks!
If your gateways are used as extenders only, it may be good idea to make the network invisible and hide it from other devices to prevent unwanted connections:
- on the "Wi-Fi Client" page of the second gateway, specify the network name in the "Other" field and click "Connect!";
- on the "Wi-Fi Access Point" page of the first gateway, tick "Make the network hidden" and click "Change Access Point settings".
From now on, to connect to your network from a laptop or smartphone you will need to choose "Other network.." (or something like that) and type its name manually.
If you already have a Wi-Fi network on the boat, you can configure both gateways as clients of the existing network. The signal of the Wi-Fi router usually is stronger and it allows extension of the range but usually it is not required.
But what if you need only to get the depth data from the first network on the second? There is no reason to flood both networks. You can switch the data direction on first gateway to "Transmit Only" from "Both", and to "Receive Only" on the second gateway. This will reduce the traffic in first network but not at second one.
Figure 2. Filter settings
To reduce the traffic in the second network, you can configure the "Transmit" filter for the "RAW" protocol of the first gateway server to "White" type and set 128267 as the value (Figure 2), this is the message number (PGN) of "Water Depth" messages. In this case, the first gateway will transmit water depth only.
It looks easy, but we know that many of our customers are not familiar with NMEA 2000 but rather with NMEA 0183. In this case, you can switch servers of both gateways from RAW to NMEA 0183 protocol and set up "White" filter with "DPT" value (NMEA 0183 sentence for Depth).
We also wish to draw your attention to our NMEA 2000 Bridge product. It provides a reliable wired connection between two networks and is preferable in demanding applications. The Wi-Fi signal can be masked out and loss of the connection (despite low probability) should be considered.
To learn more about the Wi-Fi Gateway, see the product page. To learn more about NMEA 2000 Bridge, see this page.
Next articles:
- Update v1.07 for USB, Wi-Fi and NMEA 0183 gateways / October 30, 2017
- Voyage Recorder PC Software update / October 24, 2017
- Control of Raymarine autopilots was added to our gateways / October 6, 2017
Previous articles:
- CAN Log Viewer update 1.06 for Windows, Linux and Mac
OS X / November 8, 2017 - Web Gauges and new sentences support / November 16, 2017
- CAN Log Viewer update with DTC support for J1939 engines / December 6, 2017
See also: recent news, all news...