The N2K0183 multiplexer is a bridge between Nmea0183 and N2K devices. The device contains a bidirectional N2K bus interface with N2K-to-Nmea0183 and Nmea0183-to-N2K converters. The device can convert data from N2K sensors so that their data can be transmitted as Nmea0183 messages to your smartphone or laptop via WiFi or wired connections, turning it into a powerful chartplotter. The multiplexer component of the device works with Nmea0183 data and filters and routes the messages to multiple output streams. In addition to the main bidirectional N2K input, the device has two additional opto-isolated Nmea0183 inputs that allow easy connection to pure Nmea0183 devices such as some AIS receivers. Data in Nmea0183 format can also be wirelessly input to the multiplexer of UDP TCP and an 'EXT' coupled multiplexer. Filtering of the Nmea0183 sentences and the N2K bus messages is possible. After filtering, the input streams are combined and forwarded by the multiplexer, which can wirelessly forward Nmea0183 format messages to UDP, TCP and 'EXT' outputs as well as to the wired Nmea0183 output port. This wired serial output data is also available on the device's micro USB port. The multiplexer can also be used as a debugger or analyzer of the data transmitted on the N2K bus and can detect and identify most common N2K messages. 

ELECTRICAL CHARACTERISTICS: 
   Microcontroller: ESP32 (2 cores - 4MB - 240 MHz) 
   Power supply: via the N2K bus (use a 1A fuse when connected directly to a battery) 
   Power consumption: less than 90mA with WiFi ON less than 10mA with WiFi OFF and Serial OFF 
   NMEA 183 input connectors: P1 and PX (internal) - optically isolated 
   NMEA 183 output connector: P2 - RS-422 compatible 
   N2K connector: input and output (fully bidirectional) 
   Baud rates: 
      P1 and PX = 4800, 9600, 19200 or 38400 
      P2 and USB = 4800, 9600, 19200, 38400, 57600 or 115200 
   NMEA 0183 filtering: serial inputs and outputs, N2K output and WiFi inputs 
   N2K message filtering: on the incoming N2K data 
   Firmware update: Over The Air (OTA) without cable 
   WiFi protocols: UDP and TCP 
   Other: Multiplexer pairing and operation in simulation or debug mode 

INSTALLATION: 
Before installation and to familiarize yourself with the multiplexer, it can be powered via a USB micro cable. After connecting to the Access Point (see below), select Sim mode and the device will simulate NMEA 0183 instruments and AIS data. In this mode you can check the connections to applications such as iNavX, QTVLM, Navionics, OpenCPN, etc. To perform the installation please follow the instructions on https://www.vela-navega.com/index.php/n2k0183. Note that you will need a cable with a 5-pin M12 connector with stripped wires at the end that will be connected to the N2K0183. All instructions regarding the connections of the serial interfaces and in particular the connection of the P2 output interface to a non-optically isolated Nmea0183 handset must be respected. In this case the small adapter supplied with the multiplexer must be used.

CONFIGURATION: 
The multiplexer is fully configurable via WiFi. When it is turned on for the first time, it starts with factory settings and automatically creates a WiFi network called N2K0183. Disconnect your smartphone (or PC) from other networks (if possible, turn off mobile data) and connect to the N2K0183 network using the password 12345678. Once connected, enter the address 192.168.4.1 in the navigation bar of your browser and you will get the following web page where you can fully configure the multiplexer and the operating modes.

 

N2K0183 Version 2.0
192.168.4.1
N2K0183 AP-NETWORK SSID

PASSWORD

IP ADDRESS
EXTERNAL NETWORK SSID

PASSWORD

IP ADDRESS
SERIAL PORT SETTINGS
>P1 P1>P2 P1>N2K P1>UDP P1>TCP
>PX PX>P2 PX>N2K PX>UDP PX>TCP
P2>
N2K CONNECTION SETTINGS
>N2K N2K>P2 N2K>UDP N2K>TCP
N2K>
WIFI PORT SETTINGS
UDP UDP>P2 UDP>N2K UDP>TCP
TCP TCP>P2 TCP>N2K TCP>UDP

N2K0183 AP ONLY POWER
AND ALSO TO THE EXTERNAL NETWORK
ENTER SIMULATION MODE
GO TO DEBUG MODE




N2K0183 AP NETWORK
You can operate the N2K0183 multiplexer in two modes: AP or Client Station. In AP (Access Point) mode, the N2K0183 creates a WiFi network and smartphones, tablets or computers connect to this WiFi network to receive/send data from/to the N2K0183. In Client Station mode, the N2K0183 connects to an existing external WiFi network and sends/receives WiFi data over this network. The N2K0183 always creates its own AP network, even if you set the N2K0183 to join an existing network. In this section, you specify the name and password of the WiFi network that smartphones, tablets and computers should use to join this network. When the N2K0183 works as an Access Point, it uses the IP address 192.168.4.1 and supports DHCP. A maximum of 5 clients can join the network and will be assigned consecutive IP addresses (eg 192.168.5.2 ...). Security is WPA2-PSK. Ssid and password can be a maximum of 15 characters and a minimum of 4 and 8 characters respectively. If you need to change any setting of the N2K0183, you should connect to this network and then enter 192.168.4.1 in the navigation bar of a browser to get the page you are reading.

EXTERNAL NETWORK
If you already have a working WiFi network and want N2K0183 to join this network as a client station, you should enter here the authentication parameters that N2K0183 should use to join this existing network. Ssid and password can have a maximum and a minimum number of characters as before. The IP address of the multiplexer in this external network can be assigned by DHCP or be static. To have the multiplexer get an automatic IP address from the network/router, enter 0 in the IP address text box (this is the default value). To force a static IP, you must specify it exactly in the IP address text box. Make sure to enter an unused IP that belongs to the DHCP pool of the existing network or router. If the connection to an existing network is successful, the IP address will be displayed in the header of this page, just below the firmware version number.

SERIAL PORT SETTINGS
The N2K0183 multiplexer has 2 serial input ports labeled P1 and PX and one serial output port labeled P2. The PX serial input port is not directly accessible from the multiplexer's screw terminals. To use PX, you must remove the cover and identify the pads labeled AX/BX from which you route the wires to the outside. The baud rate of the P1 and PX serial ports is adjustable between 4800, 9600, 19200 and 38400. The baud rate of the P2 port can be 4800, 9600, 19200, 38400, 57600 or 115200. If the baud rate of the output port is lower than that of the input ports, data may be lost when you route the serial inputs to the serial output. All data output through P2 is simultaneously output through the multiplexer's USB port. Port P1 has a special mode of operation. If you set USB to the baud rate of port P1, the data from this port will not be input through ports A1/B1, but will be read from the multiplexer's USB port. In this case, the data will be read at the baud rate set on P2. The wide text fields for each serial port refer to NMEA0183 sentence filtering. If you do not need sentence filtering, enter 0 (zero) in these fields. An explanation of sentence filtering is provided below. The data received on the input ports P1 and PX can be transferred to the output port P2, either through the UDP or TCP ports, or through both and to an external (EXT) paired multiplexer. It can also be converted to N2K messages and sent over the N2K bus.

N2K PORT SETTINGS
The N2K0183 multiplexer can receive and send N2K messages from and to the N2K bus. The received N2K messages from the N2K bus can be filtered and then converted to Nmea0183 sentences and forwarded to the P2 serial port, to WiFi (UDP or TCP) or to a paired multiplexer (EXT). In the other direction, Nmea0183 sentences from the input serial ports or from WiFi can be filtered and then converted to N2K messages to be transmitted over the N2K bus. To set a filter for the incoming N2K messages, see the note 'N2K message filtering' below. For the outgoing Nmea0183 sentences, see the note 'Nmea0183 sentence filtering' below. If you do not want any filtering, just enter 0 (zero) in the filter width text boxes. Only a small number of Nmea0183 sentences can be translated into N2K messages and vice versa. You can also choose advanced settings for the operation of the multiplexer by pressing the button that appears.

WIFI PORT SETTINGS
The N2K0183 multiplexer can send and receive WiFi data in a client/server configuration, where the multiplexer is the server and the connected devices are the clients. You can use either the UDP, TCP, or both Internet protocols to send and receive WiFi data. You turn off a protocol by setting its port number to zero. Non-zero port numbers, either UDP or TCP, should be in the range 1024 to 65535. By default, the N2K0183 broadcasts via UDP broadcasting to port number 2000 (compatible with Navionics Sonar Chart Live). UDP broadcasting ensures that all clients connected to the WiFi network and listening on the specified UDP port number receive the packets sent by the multiplexer. You should also set the same protocol (UDP or TCP) and the corresponding port number on the connecting devices that will receive/send data from/to the N2K0183 multiplexer. If you use the TPC protocol, you need to specify the IP address of the multiplexer. In case of AP ONLY mode, this address is 192.168.4.1. If the multiplexer is connected to an external network, specify the IP address assigned by the external network. It is important to note that only one connection to the multiplexer via the TCP protocol can be active, but at the same time you can have several UDP connections. The wide text fields for each WiFi port refer to the NMEA0183 sentence filtering. If you do not need sentence filtering, enter 0 (zero) in these fields. See below for an explanation about Nmea0183 sentence filtering. Finally, you can set what should happen to the received WiFi data. They can be transmitted to the P2 serial output, to the N2K bus, to the EXT output for a paired multiplexer or to the other Internet port.

FILTERING NMEA0183 SENTENCES
The N2K0183 multiplexer is capable of filtering Nmea0183 input sentences arriving at the two serial input ports, as well as the UDP and TCP input ports. It can also filter Nmea0183 output sentences before they are transmitted over the serial output interface or before conversion and transmission over the N2K bus. Filtering is a process that allows us to pass or block certain Nmea0183 sentences. Filtering is determined by a 'filter string' of up to 40 characters that you can enter in the wide text fields for each of the ports mentioned above. The first character of the filter string is a number between 0 and 9. If this number is 0 and nothing follows, no filtering takes place. If this number is 9, the port is ignored (neither read nor written by the multiplexer). If this number is between 1 and 8, a sequence of consecutive sentences is periodically discarded, regardless of the rest of the filter chain. For example, if this number is 4, it means that 4 consecutive sequences are discarded and only the following one is used for filter analysis. The second character can only be 'Y' or 'N' and refers to the checksum of the Nmea0183 sentence. If the character is 'Y', the checksum of the sentence is checked and the sentence is ignored if the checksum is not correct. If the character is 'N', no checksum checking is performed. The filter strings '0' and '0N' are equivalent 'all-pass' filters, and '0Y' blocks sentences with an incorrect checksum. The third character can only be 'A' or 'R'. 'A' means that only the sentences referred to in the rest of the filter string are ACCEPTED (passed through) by the port. 'R' means that only the sentences referenced in the rest of the filter string will be REJECTED (blocked) from the port. The fourth character is a separator. We use '-' as a separator, but characters like '+', '.', '~' and others can also be used. Each Nmea0183 sentence is described by 5 characters. The first 2 characters refer to the speaker's ID and the following 3 characters refer to the type of sentence. You can specify up to 6 sentences to accept or reject. Below are some examples of filter strings. If you want a port to only pass the DBT (Depth Below Transducer) sentence generated by a source with ID SD (Sounder, Depth), you can use the string '0YA-SDDBT'. If you want the filter to only pass DBT sentences regardless of the talker ID, use '0YA-xxDBT', as the talker ID xx means it should be ignored. Likewise, the TYPE xxx means it should be ignored.For example, the filter string '0YR-SDxxx' will reject any TYPE of sentence generated by the SD Talker ID. An example of a string specifying 2 sentences is '0NA-IIDBT-xxRMC'. This means that the filter will only pass DBT sentences generated by the Talker ID II and RMC sentences, regardless of the Talker ID.

N2K MESSAGE FILTERING
N2K message filtering refers to the filtering of the messages read from the N2K bus before converting them into Nmea0183 sentences. As with Nmea0183 sentences, you must enter a string defining the (only) messages you want to accept or reject. In this case, the start character can only take 3 values: '0' (no filtering), 'A' (accept only) or 'R' (reject only). If this character is '0', nothing should follow. On the other hand, if the start character is 'A' or 'R', at least one N2K message should follow. The start character and the N2K messages must be separated by a separator, as in the case of Nmea0183 filtering. For the purpose of filtering, N2K messages are defined by a sequence of 7 hexadecimal (0, 1, ... 9, A, B, ... F) characters. The first 2 characters refer to the SRC and the remaining 5 characters refer to the PGN. If you use debug mode, you can see the messages being transmitted on the N2K bus and the corresponding hexadecimal string in square brackets. For example, the filter string A-211F50B means that only the PGN 1F50B (or 128267 in decimal) coming from SRC 21 (or 33 in decimal) will pass the filter. If the PGN being referenced should pass the filter regardless of the SRC, we would use A-xx1F50B, since xx means that the SRC should be ignored. In the same way, the string A-21xxxxx means that only N2K messages generated by source 21 (or 33 in decimal) will be accepted.

OPERATION MODES
In addition to the parameters mentioned above, you have 4 radio buttons available that allow you to choose between 4 operating modes: (i) operate only in AP mode (ii) also connect as Client Station (iii) Simulation mode (iv) Debug mode. To change the operating mode, select the corresponding radio button and press SET. You must also press the SET button for N2K0183 to apply any changes you make to the parameters on this page. If there are no errors in the parameters, the N2K0183 will change its operation to the selected mode and settings.

RESET AND UPDATE
When you press the HARD RESET button, the multiplexer will load its factory settings. Pressing the UPDATE button allows you to check and load the latest available software for the multiplexer. The factory default uses the following parameters: Mode: Access Point; Ssid: N2K0183; Password: 12345678; IP address: 192.168.4.1; Wifi protocol: UDP; UDP port number: 2000; Serial port P1 baud rate: 4800; Serial ports PX and P2 baud rates: 38400; Serial output P2: none; UDP output: P1.