SDR# TETRA demodulator plug-in can log raw binary data to user-defined UDP port (default 20025).
udp-conf.jpg
Short and simple Python script show raw binary data and write it to a text file.
(Ctrl-C terminates the script, although this method does not always work in Windows)

import datetime as dt
import time
import socket

udp_ip = "127.0.0.1"
udp_port = 20025

print "Creating UDP socket"
try:
    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
except socket.error:
    print "Failed to create UDP socket"
    sys.exit()

print "Connecting to " + udp_ip + ":" + str(udp_port)
try:
    sock.bind((udp_ip, udp_port))
except socket.error:
    print "Failed to connect"
    sys.exit()

fname = dt.datetime.now().strftime("%Y%m%d%H%M%S") + "-tetralog.txt"
print "Logging to file " + fname
f = open(fname, "w")
try:
    while True:
        data, addr = sock.recvfrom(1024)
        data = data.replace('\x00', '0')
        data = data.replace('\x01', '1')
        f.write(data)
        f.write("\n")
        print data
except KeyboardInterrupt:
    sock.close()
    f.close()

tetralog.jpg
https://ibb.co/mC6M9J