Posts

Showing posts with the label TETRA

Some ideas about decoding TETRA with TI CC1120 and Arduino Due

https://www.rtl-sdr.com/decoding-tetra-voice-on-a-retevis-c62-handheld-with-custom-openrtx-firmware/ TI CC1120 has a mode called CFM. The CC1120 receives Custom Frequency Modulation (CFM) / Analog FM by bypassing its packet handler and continuously reading the instantaneous frequency offset from the CFM_RX_DATA_OUT register over SPI. This mode is designed for demodulating e.g. custom FSK modes. To configure the CC1120 for CFM, apply std RF settings (frequency, ch filter bw and AGC) and modify the following extended registers: Enable CFM Mode (CFM_DATA_CFG at 0x2F09) Bypass Packet Handling (PKT_CFG2 at 0x0026) Disable Sync Word Qualification (SYNC_CFG1 at 0x0008) Set RX Filter bw (CHAN_BW at 0x0010): Match the channel filter bandwidth to 25 kHz. Reading demodulated data (CFM_RX_DATA_OUT) Once the chip enters RX state via the SRX command strobe, your microcontroller must sample the demodulated frequency offset at regular intervals. Data format: register returns a signed 8-bit integer (tw...

Upgrading SDR# TETRA demod plugin to .NET7

Image
  26.3.2022 Upgrading SDR# TETRA demod plugin to .NET7 SDR# TETRA demod plugin version 1.0.14.0 dotPeek Visual Studio 2022 NET upgrade assistant Reverse-engineering with dotPeek to VS project NET upgrade assistant   Visual Studio 2022 Plugin displayname change Rebuild solution. NET 7 assembly is located in net7.0-windows directory. SDRSharp.Tetra\bin\Release\net7.0-windows SDR# version 1910 For the newer (obfuscated) versions of the TETRA demod plugin one can try to deobfuscate by using e.g. de4dot, dnSpy and de4dot-cex to get code at level which is buildable with VS (and upgradeable to .NET7).

Fixing old SDR# MSYS2 Tetra decoder plugin

Image
 11.5.2023 Fixing old SDR# MSYS2 Tetra decoder plugin https://www.rtl-sdr.com/tetra-decoder-plugin-for-sdr-now-available/ SDR# 1.0.0.1715 tetra plugin msys2 dotPeek Reverse engineer SDRSharp.Tetra.dll to Visual Studio project with dotPeek. Fix build errors. Change BeginInvoke((Delegate -> Action       if (flag)       {         this._oneChannelIsActive = true;         this.BeginInvoke((Action) (() => this._controlInterface.AudioIsMuted = false));       }       else       {         this._oneChannelIsActive = false;         this.BeginInvoke((Delegate) (() => this._controlInterface.AudioIsMuted = true));   // --> (Action instead of Delegate)       } Fix pointer errors:   =...

SDR# TETRA plugin raw data output

Image
27.10.2022 SDR# TETRA plugin raw data output Many years ago the first TETRA demod plugin for the SDR# featured UDP port 20025 demod raw data output. This SDRSharp.TETRA.dll plugin also required M-SYS2, pacman and Tetra-RX to display TETRA decoded data in net info window. The plugin works without M-SYS2+Tetra-RX and outputs raw data to UDP port 20025.

Mods for SDR# TETRA demod plugin 1.0.14.0 - 2

4.7.2021 Mods for SDR# TETRA demod plugin 1.0.14.0 - 2 dotPeek & Visual Studio 2019 NET 4.6 C# NetInfoWindow.cs public void UpdateTextBox(List<Dictionary<GlobalNames, int>> rawData) { ...             MmPrimitivesType mmPrimitivesType = (MmPrimitivesType) num1;             switch (mmPrimitivesType)             {               case MmPrimitivesType.D_OTAR:                 if (dictionary.TryGetValue(GlobalNames.Otar_sub_type, out num1))                 {                   str2 = str2 + " OTAR: " + (object) (D_OtarPduS...

Mods for SDR# TETRA demod plugin 1.0.14.0

26.6.2021 Mods for SDR# TETRA demod plugin 1.0.14.0 dotPeek & Visual Studio 2019 NET 4.6 C# SDR# TETRA demod plug-in seems to implement many TETRA protocol features but does not show them in netinfo view. NetInfoWindow.cs     public void UpdateTextBox(List<Dictionary<GlobalNames, int>> rawData)     { ...             int key1 = 0;             dictionary.TryGetValue(GlobalNames.SSI, out key1);             // modx             string str2 = string.Format(" {0:dd.MM.yyyy HH:mm:ss tt}  ", (object) DateTime.Now); ...                 if (dictionary.TryGetValue(GlobalNames.TAC, out num1))            ...

Modifying SDR# TETRA demod plugin 1.0.14.0 SDS type 4

Image
  31.5.2021 Modifying SDR# TETRA demod plugin 1.0.14.0 SDS type 4 Visual Studio 2019 dotPeek - for reverse engineering plug-in DLL SDR# TETRA demodulator plug-in version 1.0.14.0 (SDRSharp.TETRADemodulator) Show SDS type 4 messages always as binarystring and hexadecimal string. Modify SdsMessage.cs namespace SDRSharp.Tetra {   public class SdsMessage   {     public string TextString { get; set; }     public string BinaryString { get; set; }     //ADDX     public string BinaryString2 { get; set; } //add this   } }   Modify SdsParser.cs     public unsafe void ParseTextMessage(       LogicChannel channelData,       int offset,       int length,       Dictionary<GlobalNames, int> result)     {       int num1 = 0;       strin...

Modifying SDR# TETRA demod plugin 1.0.14.0 ext sub num

  9.6.2021 Modifying SDR# TETRA demod plugin 1.0.14.0 ext sub num NetInfoWindow.cs             if (dictionary.TryGetValue(GlobalNames.External_subscriber_number, out num1))             {                 // num1.toString added                  str2 += " External_subscriber_number: Exists but not implemented yet " + num1.ToString();                 // these lines added                  str2 += Environment.NewLine + GlobalFunction.extnum;                  GlobalFunction.extnum = "";  ...

SDR# TETRA demod plug-in UDP output

Image
 26.3.2021 SDR# TETRA demod plug-in UDP output SDR# TETRA demod plug-in: http://rtl-sdr.ru/page/plagin-dlja-priema-tetra (https://github.com/vgpastor/SDR-Tetra-Plugin) features UDP output port in config. Tetra-rx program (MSYS2 required in Windows) accepts its output data (which is demodulated dibits) Wireshark adapter for capturing local loopback traffic shows tetra-rx messages Raw data logging in Wireshark can be done with local loopback traffic capture by using capture filter udp port x

Modifying old SDR# TETRA demod plug-in

Image
 15.3.2021 Modifying old SDR# TETRA demod plug-in Visual Studio 2019 Community Edition C#, .NET 4.6 dotPeek SDRSharp.Tetra.dll - TETRA demodulator plug-in version 1.0.10.1 Reverse engineering SDRSharp.Tetra.dll with dotPeek. Mod for PDU raw data display in Network info screen.   Logging PDU data to logfile NetinfoWindow.cs private StreamWriter pduLog = null; public NetInfoWindow(TetraSettings tetraSettings) ... pduLog = File.AppendText(DateTime.Now.ToString("yyyyMMddHHmmss") + "_pduLog.txt"); public void UpdateTextBox ...                 if (GlobalFunction._pduTxt.Trim().Length > 0)                 {                     this.callsTextBox.AppendText(GlobalFunction._pduTxt + Environment.NewLine);       ...

SDR# tetra demodulator utils plug-in

Image
1.1.2020 SDR# tetra demodulator utils plug-in plugins.xml magic line: <add key="TD utils" value="SDRSharp.TDutilsPlugin.TDutilsPlugin,SDRSharp.TDutilsPlugin"/> Copy SDRSharp.TDutilsPlugin.dll (SDRSharp.TDutilsPlugin\bin\Release) to SDR# dir. https://github.com/OH1GIU-P/TDUtilsPlugin Capture (grid copy unchecked) saves Tetra demodulator plug-in network info window textbox contents (calls info, ms registrations) to file. Grid copy checked option saves grid content (tabs: current cell, neighbour cell) to file - select tab first and click capture button. using System; using System.Text; using System.Windows.Forms; using System.Runtime.InteropServices; using System.IO; using System.Drawing; using System.Drawing.Imaging; using SDRSharp.Common; namespace SDRSharp.TDutilsPlugin {     public partial class TDutilsPluginPanel : UserControl     {         public delegate bool WindowEnumDelegate(IntPtr hwnd, int lParam);  ...

SDRSharp TETRA demod plug-in network info grid data logger

Image
16.2.2019 SDRSharp TETRA demod plug-in network info grid data logger SDRSharp.ScrGrb is a simple TETRA demod plug-in network info grid data logger SDR# plug-in. Visual Studio 2017. C# https://github.com/OH1GIU-P/SDRSharp.ScrGrb Copy SDRSharp.ScrGrb.dll from SDRSharp.ScrGrb\SDRSharp.ScrGrb\bin\Release to SDR# directory and Add <add key="ScrGrb" value="SDRSharp.ScrGrb.ScrGrb,SDRSharp.ScrGrb"/> SDR# plugins.xml. Log file path button: select or type file name (.txt is added if now extension specified). Start TETRA demodulator and open network info and open tab which contains grid (e.g. current cell tab) and click any cell in the grid (to set focus). Click Start button. Data from the grid is automatically selected (select all) and copied to clipboard and logged to file every 6 seconds. Between entries in log file is timestamp. 20190215223517 ************* SystemCode    1    ETSI ETS 300 392-2 ed. 1 and ETSI EN 300 392-7 [8] V2.1.1 ......

SDR# TETRA plug-in Network Info pdu logger

Image
26.9.2018 SDR# TETRA plug-in Network Info pdu logger SDRSharp TETRA plug-in Network Info screen cannot log to file. I coded a simple .NET application with C# which logs PDU information to file (c:\temp\netinfo.txt). The source code and executable (CapTetraNetInfo\CapTetraNetInfo\bin\Release) upload: <https://files.fm/u/wvzjc2m9 /> https://github.com/OH1GIU-P/CapTetraNetInfo (Current cell and neighbour cell screens contain grid control, enumchildwindows does not find grid control. E.g. by using sendkey and clipboard [clipboard checkbox] it is possible to capture text from grid control (at first click any cell in the grid to set focus onto the grid)) Current cell and neighbour cell screens contain grid control, enumchildwindows does not find grid control. E.g. by using sendkey and clipboard it is possible to capture text from grid control (at first click any cell in the grid to set focus onto the grid). [DllImport("user32.dll")] static extern void SwitchToThisWindow(IntPt...

SDRSharp TETRA plug-in UDP raw data logger with Python

Image
  20.7.2018 SDRSharp TETRA plug-in UDP raw data logger with Python SDR# TETRA demodulator plug-in can log raw binary data to user-defined UDP port (default 20025). 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: ...

Wintelive

Image
23.4.2017 Wintelive TETRA radioverkkojen dekooderi ohjelman Teliven saa myös Windowsille. http://www.rtl-sdr.com/tetra-decoding-on-windows-with-telive/ Teliven manuaali (pdf) löytyy vaikka täältä: https://github.com/sq5bpf/telive Windowsissa ohjelman (Wintelive) toimimaan saaminen vaatii vähän virittelyä. Wintelive & asennusohjeet: http://curly.100dola.eu/data/my-tools/wintelive/read.txt 4) Copy contents of msys_root to your M-SYS2 installation directory => msys_root löytyy Wintelive zip paketista: http://curly.100dola.eu/data/my-tools/wintelive/ 5) Open M-SYS2 shell and execute "pacman -S socat tmux" => M-SYS2 shell (msys2_shell.cmd)msys-shell.jpg pacmanit: 6) Install VC 2015 runtime => https://www.microsoft.com/en-us/download/details.aspx?id=48145 Wintelive.zip paketissa on gnuradio_mod ja gnuradio_project kansiot. Projektista löytyy wintelive_10channels.grc. Kopioin sen gnuradio_mod kansioon ja ko. kansion siirsin documents kansioon. Top_block.py:n generoi GNU...