Filtering is an advanced feature of the Nmea3Wifi, Nmea4Wifi and N2K0183 multiplexers. This page describes: (i) Nmea0183 sentence filtering used in  the Nmea3Wifi and Nmea4Wifi multiplexers; (ii) SeaTalk Datagram filtering in the Nmea3Wifi multiplexer; (iii) Nmea0183 sentence filtering used in  the N2K0183 multiplexer and (iv) N2K message filtering used in the N2K0183 multiplexer. In all cases you can ignore filtering by accepting its default value of 0.  

Nmea0183 Sentence Filtering in the Nmea3Wifi and Nmea4Wifi multiplexers

The 2 (Nmea3Wifi) or 4 (Nmea4Wifi) input serial ports, the serial output port and the 2 input wifi ports or the can be set to pass or to block certain NMEA0183 sentences. This is governed by a filtering string of up to 43 characters that you can enter in the wide text boxes for each of the ports referred to. The first character is a number, between 0 and 9. When this number is 0 and nothing follows, no filtering takes place. When this number is 9, the port is ignored (neither read nor written by the multiplexer). When this number is between 1 and 8, the multiplexer tests the checksum of the sequence. If it finds a wrong checksum, the sentence is ignored. If the starting number is between 2 and 8, some sequences are periodically dropped independently of the rest of the filtering string. For example, if that number is 4, it means that only the 4th sentence is taken from 4 successive sequences. The first 3 sentences are dropped. The second character is a separator. The characters "-", ".", "~" and others could be used as separators, but we will use "-". The third character can only be "A" or "R". "A" means that only the sentences that are referred to in the rest of the filtering string are ACCEPTED by (pass through) the ports. "R" means that only the sentences that are referred to in the rest of the filtering string are REJECTED (blocked) by the ports. Each NMEA0183 sequence is specified by 3 characters inserted between separators. For example, the string "3-A-RMC-GGA-GLL-GRS-GSA" means 3 things. Firstly, a sentence only passes the filter if it has a correct checksum. Secondly, only 1 in 3 successive sentences is taken. And finally, the sentence only passes the filter if it is 1 of the 5 specified sentences. An important note is to understand that the filtering strings for the UDP and TCP ports refer to data input. No filtering takes place when data is transmitted by UDP or TCP.

In the case of the Nmea3Wifi multiplexer, it is possible to filter the datagrams that are received or are ready to be sent out, on the SeaTalk1 bus. Datagrams are also specified by 3 characters. For example, datagram 53 (hexadecimal) is specified by S53. 

You can use the tool Nmea0183Tester available here, to construct Nmea0183 filtering sentences. This tool is a Windows programme that was used in the development of the multiplexers. It is also a convenient tool to test many aspects of data communication with the multiplexers. 

Click and open in a new window!

 Note: to properly see this picture, right click on the image and open it in a new separator.

SeaTalk1 Datagram Filtering in the Nmea3Wifi multiplexer

In the case of the Nmea3Wifi multiplexer, it is possible to filter the datagrams that are received or are ready to be sent out, on the SeaTalk1 bus. Datagrams are also specified by 3 characters. For example, datagram 53 (hexadecimal) is specified by S53.

Nmea0183 Sentence Filtering in the N2K0183 multiplexer

The N2K0183 multiplexer is capable of filtering input Nmea0183 sentences arriving at the 2 input serial ports and at the UDP and TCP input ports. It can also filter output Nmea0183 sentences before being transmitted on the output serial port or before being converted and transmitted on the N2K bus. Filtering is a process that we can use to pass or to block specified Nmea0183 sentences. The filtering is governed by a 'filtering string' of up to 40 characters that you can enter in the wide text boxes for each of the referred to ports above. The first character of the filtering string is a number, between 0 and 9. When this number is 0 and nothing follows, no filtering takes place. When this number is 9, the port is ignored (neither read nor written by the multiplexer). When this number is between 1 and 8, a sequence of successive sentences is periodically dropped independently of the rest of the filtering string. For example, if that number is 4, it means that 4 successive sequences are dropped and only the following one is taken for filtering 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 verified and the sentence is ignored if the checksum is not correct. If the character is 'N', no checksum verification is performed. The filtering strings '0' and '0N' are equivalent 'all-pass' filters, and '0Y' blocks sentences with a wrong checksum. The third character can only be 'A' or 'R'. 'A' means that only the sentences that are referred to in the rest of the filtering string are ACCEPTED (pass through) by the port. 'R' means that only the sentences that are referred to in the rest of the filtering string are REJECTED (blocked) by the port. The fourth character is a separator. We will use '-' as a separator but characters such as '+', '.', '~' and others can also be used. Each Nmea0183 sentence is specified by 5 characters. The starting 2 characters refer to the talker ID and the following 3 characters refer to the TYPE of sentence. You can specify up to 6 sentences to be accepted or to be rejected. Following are some examples of filtering strings. If you want a port to pass only the sentence DBT (Depth Below Transducer) generated by a source with ID SD (Sounder, Depth) you can use the string '0YA-SDDBT'. If the filter is to pass only DBT sentences independently of the talker ID, you use '0YA-xxDBT' as the talker ID xx means that it should be ignored. In the same way the TYPE xxx means that it should be ignored. For example, the filtering string '0YR-SDxxx' rejects any TYPE of sentence generated by the SD talker ID. An example of a string that specifies 2 sentences is '0NA-IIDBT-xxRMC'. It means that the filter only passes DBT sentences generated by the talker ID II and RMC sentences whatever is the talker ID.

N2K Message Filtering in the N2K0183 multiplexer

N2K message filtering refers to the filtering of the messages read from the N2K bus before they are converted to Nmea0183 sentences. As in the case of Nmea0183 sentences you need to enter a text string of characters that define the (only) messages that you want to accept or to reject. In this case, the starting 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 contrary, if the starting character is 'A' or 'R', at least one N2K message should follow. The starting character and the N2K messages must be spaced by a separator character as in the Nmea0183 filtering case. 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 that travel on the N2K bus and its equivalent hexadecimal string inside square brackets. The filtering string A-211F50B, for example, means that only PGN 1F50B (or 128267 in decimal) originated by SRC 21 (or 33 in decimal) passes the filter. If we wanted the referred to PGN to pass the filter independently of the SRC, we would use A-xx1F50B as 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) are accepted.

0
0
0
s2sdefault