10 March 2018

STANAG-4481 PSK

STANAG-4481 PSK (4481-P) is basically a STANAG-4285 sub-mode which adopts fixed 300 bps data-rate and long interleaving. As well as 4285, 4481-P is mostly used in  NATO Naval broadcast  due to its repeated preamble  for which it's easy to maintain sync during long transmissions. 
In the heard transmission, spotted on 8322.2 KHz/USB, it's interesting to note the presence of the 64-bit KG84 sync pattern into the demodulated bitstream (Fig. 2)

Fig. 1
Fig. 2

6 March 2018

some tests with Harris RF-5710A modem

All that passes through the output from the HARRIS RF-5710A modem [1] is the decoded "unknown" data content and none of the raw octets (the overhead added by the HF waveform) will pass; unknown data may be synchronous or synchronous, ITA2 or ITA5 coded, clear-text or encryptyed blocks. Moreover, this is not a piece of software running on a PC but rather "hardware" that shall be connected through its serial interface port (DTE Port): the use of the synchronous or asynchronous port configuration is dictated by the type of equipment that is interfaced to the modem and the mode of operation.

Fig. 1a
At the other side, modern day PCs employ 9 pin RS-232C and do not support external receive (RX Clk) and transmit (TX Clk) clocks which are required for synchronous modes of operation. It is therefore impossible to set a synchronous mode of operation on these PCs and it means that you can only handle asynchronous (unknown) data using two possible configurations:

a) DTE Port Async - PC Port Async (Async-Async)
b) DTE Port Sync  - PC Port Async (Sync-Async), only if the on-air speed is constant, ie no autobaud waveforms

Since the Async configuration, Pc Port (and DTE Port in Async-Async) must be set to the same framing of the on-air data or you get gibberish. For what concerns the data rates:

Async-Async: ports speed can be equal or greater than the on-air speed
Sync-Async: PC port speed must match the on-air speed


Fig. 1b

The modem provides (un-framed) 8-bit ASCII output so to get ITA2 or 6-7 bits coded data you will need to run a terminal software that provides a binary stream, since dumb terminals as Putty will only display ASCII characters, and process it with a bit editor. I tried several softwares (Termite, Realterm, Aspmon,...) and in my opinion the best solution is the "Br@y Terminal" [2].
In Figures 2,3 you may see the same transmission as appear after a software modem (Sorcerer) and as sent by the 5710A modem: note the presence of the start/stop bits in the Sorcerer output. In case of non-ASCII data, as said above, the original binary stream can be obtained by processing the modem output with a bit editor and removing the extra-bits added (3 bits in case of ITA2 data, as in Figure 7)

Fig. 2
Fig. 3
I tested the modem using several waveforms, here I report only the tests of STANAG-4285, 188-110A Serial and FSK to confirm what said above about the settings of the serial ports, more precisely:

* STANAG-4285 600bps L, ITA2 Async transmission 5N1 (NSS CARBs, NATO from S.Rosa-Rome)
* 188-110A Serial 1200bps L, ASCII Async transmission 8N1 (test file from DMT) 
* FSK 50Bd/450, ITA2 Async transmission 5N1 (DDH9)

Figure 4 shows the case depicted in a): DTE Port and PC Port set to Async, data and ports use the same 5N1 framing, on-air data rate is 600 bps while both the ports are set to 2400 bps (four times the on-air speed). Figure 5 shows the same configuration (Async-Async) but in case of a 188-110A Serial waveform.

Fig. 4 - decoding STANAG-4285 in Async-Async mode
Fig. 5 - decoding 188-110A Serial in Async-Async mode
Figure 6 shows the case depicted in b): DTE Port set to Sync and PC Port set to Async. The  framing settings are the same but in this case the PC Port speed must match the on-air speed (DTE Port is set to Sync!). This is why this configuration (Sync-Async) can handle only fixed data rate waveforms. Fig. 6 is related to 4285 tests, the same Sync-Async test was also done using 188-110A Serial getting the same results.

Fig. 6 - decoding STANAG-4285 in Sync-Async mode
Fig. 7 - 8-bit stream as received from the 5710A
Note the 5-bit ITA2 stream after the extra-bits removal

FSK test is shown in Figure 8, since the low on-air rate (50Bd)  you must set the DTE Port to Async: for this test I used 600bps while framings is the same as the one on-air data.

Fig. 8 - decoding FSK in Async-Async mode

For Sync intercepts, an hardware SYNC <=> ASYNC adapter or a synchrounus DB-25 RS-232 interface are needed (both costly). The adapter needs to support all the one-air Sync mode data rates as does the PC Port which must be set to the same. On my side, I'm waiting for a synchronous interface to complete the Sync-Sync tests.

HW modems are NOT friendly as are software solutions, you will need to know how to deal with what is coming out as to its meaning.

[1] https://tsc-60.cellmail.com/tsc-60/modem/Harris.modem.5710a.pdf
[2] https://sites.google.com/site/terminalbpp/

28 February 2018

CARB-data formats in CTA, IDR, NSS, PBB and TBB transmissions

As a final stage of my ITA2 tour I wanted to take a look at how CARB (Channel Availability and Receipt Broadcast) data are sent. By the way, CARB transmissions typically consist of clear-text informations on the frequencies available for ship-shore traffic and are used to perform a channel-link before a message could be sent. 
Most stations (CTA, IDR, NSS, TBB) use STANAG-4285 600bps/Long while PBB uses asynchronous FSK 75Bd/850 for its CARBs; all the messages are originated in ITA2 (Baudot) and sent using the 5N1 framing.

Given the use of the 5N1 framing, a sharp 7-bit period bitstream is expected but it happens only in transmissions from IDR and NSS in which the start and stop bits are well identified and with clear-cut outlines (Figure 1)

Fig. 1
whereas in the other cases (CTA,TBB and PBB) bits are mixed up and a strict 5N1 format is impossible to see (Figs 2,3)

Fig. 2
Fig. 3

In TBB transmissions the CARB data are sent within a 75-bit frame, with a variable spacing between the ITA2 characters (spaces consist of 1-value bits). It's just the variable spacing that makes clear 5N1 visualization impossible. To clean up the bitstream and remove the start and stop bits I used the "Del CT" tool provided by the BEE software, "Del CT" can be used to extract a character length of 5,6,7,8 bits (ITA2 and ITA5): in this case I used the "5 bit" setting. The tool searches and removes the framing, returning the initial ITA2 characters of the CARB strings (Fig. 4)

Fig. 4
The same procedure was used for CTA transmissions, in which the CARB frame length is 74 bits (Figure 5).

Fig. 5
Unlike the above, IDR and NSS use a fixed spacing between the characters and this allows the clear 5N1 visualization depicted in Figure 1 (a perfect 7-bit period frame).

Fig. 6
In cases like this it is not necessary to use the "Del CT" tool and the start and stop bits can be removed by hand (figure 7).

Fig. 7
The CARB transmissions from PBB, although they use asynchronous FSK and not the S-4285 waveform, adopt the same way of TBB and CTA: data are sent within a 64-bit frames and with variable spacing between characters. The five ITA2 bits are recovered from the demodulated bitstream by using "Del CT" tool (Figure 8).

Fig. 8

And... don't be fooled by your eyes: bits are sent serially from left to right and row by row!

Fig. 9

27 February 2018

DDH7/ DDH9/DDK9 ITA2 FSK and Sorcerer

Following the previous post, I tried the asynchronous FSK decoder of Sorcerer on some 5N1.5 bitstreams transmitted by DWD: precisely DDH7, DDH9 and DDK9. All transmissions are FSK 50Bd/450Hz with 5N1.5 framing, as evidenced by the SA rasters in Figure 1.
 
Fig. 1
I added the generic decoder for synchronous FSK demodulator in order to see and process the bitstreams on which Sorcerer works. As already underlined, bit editors work with an integer number of bits since they can't represent an half bit, so a 5N1.5 bitstream is depicted as 15-bit frame obtained by aggregating two consecutive frames (ie, 7.5 x 2). The raster method of SA allows to detect  the length of 1.5 bit because it works in the time domain. Figure 2 indicates that in all three cases, Sorcerer correctly demodulates the signals.

Fig. 2
Unfortunately the asynchronous FSK decoder for ITA2 does not provide the 5N1.5 framing and therefore there are some uncertainties in the decoding; using 5N2 framing you get gibberish (Figure 3). It's worth noting that in the previous post a similar not-standard framing was correctly decoded by the S-4285 decoder using 5N1 either 5N2 settings.

Fig. 3
In these cases, asynchronous FSK with 1.5 framing, the best choice is Fldigi which provides this non-standard length of the stop bit (Figure 4). 

Fig. 4

26 February 2018

French Navy FUE, STANAG-4285 asynchronous ITA2 framing

updated
Looking at milcomm logs in the web, I noted that the STANAG-4285 clear-text test transmissions of the French Navy call "FUE" from Brest are logged with different indications of the ITA2 data-format (here called as "framing"): sometimes 5N1 and sometimes 5N2, as also reported in some youtube video clips [1].
I tuned their 6348.0 KHz/USB frequency and recorded a sample of these transmissions, then I processed the wav file using two S-4285 well known decoders: sorcerer and multiPSK. It is interesting to note that the two programs correctly decode the test messages using both 5N1 and 5N2 framing settings (Figs. 1,2) and this is certainly curious because seven and eight bits are not the same thing.

Fig. 1
 
Fig. 2

Looking at the bit outputs produced by the two decoders, the stream is structured in five bits of data (ITA2 coding, commonly referred to as Baudot) sandwiched between one start bit and two stop bits, ie a 5N2 framing (Fig. 03).

Fig. 3 - sorcerer/multiPSK bitstream output
If the recorded transmission (S-4285 from FUE) were a "pure" 5N1 then things would be different since decoding with the 5N2 setting would produce errors, as in the case of a 5N1 CARB transmission from the Italian Navy IDR (Fig. 4).
 
Fig. 4 - decoding of a pure 5N1 transmission from Italian Navy "IDR"
Then, I tried to process the wav file from FUE using the HARRIS RF-5710A modem, configured for S-4285 600bps/L, connected to Realterm, a serial terminal program [2] (not a decoder!): the DTE port of the modem was in synchronous mode. These tests show that Realterm detects framing errors when the 5N2 setting is used, whilst the reception  is correct when the 5N1 setting is used (Fig. 5): indeed a different result if compared to that seen with sorcerer and multiPSK where the 5N2 setting produces right decodings (Fig. 6).

Fig. 5 - 5710A -> Realterm
Fig. 6 - decoding of the streams from Realterm
So it seems that not 5N1 neither 5N2 are used. By the way, Figure 7 shows some possible ITA2 framing derived from ASCII-bits output of sorcerer.

Fig. 7

That said, it's seems that we face a non-standard framing: 1 start bit, 5 ITA2 data bits, and <1-2> stop bits... or perhaps there is something odd in these decoders. I try a possible explanation.
Sorcerer and MultiPSK, two software modems/decoders, even if they do not provide the exact framing, they are able to recognize this data format by synchronizing their framing window to the incoming stream, say a "dynamic window", so that we get correct decodings using 5N1 or 5N2 settings. Realterm, just an RS-232 terminal, works with "static" framing windows of the UART, which are suited to the standard formats. So, facing this stream it most likely can synchronize using the 5N1 format because in case of 5N2 the UART does not see an integer number of stop bits.
About the graphic representatiosn of the bits in Fig. 7, it is worth saying that the bit editors work with an integer number of bits (they can't represent half bit) and that anyway the bit stream is the result as parsed by the decoder(!) and not the raw stream before the parsing. The 5N1.5 bit view is possible by aggregating two consecutive frames and then get an integer number of 15 consecutive bits (ie 7.5 x 2): as shown in Figure 7, the 15-bit period stream just exhibits 2 start bits and 3 stop bits... as expected for two aggregate 5N1.5 frames. Quoting Utility Planet "ITA2 bit states are based on timing, and they do not correspond to the base-2 places used in binary numerical notation" [3].

I noted the same behavior in a recorded transmission from Fort de France Martinique FUF (downloaded somewhere from the web): in this case I used multiPSK (Fig. 8).

Fig.8

As a final note, the ending message "INT ZBZ" (interrogative ZBZ) in military terms stands as "What is the printing acceptability of my signals ?", or simply "everything is ok with my transmission?" [4].



[1]  https://www.youtube.com/watch?v=8YBJ05aJcnA