📻 TEF Logger App – Documentation
đź“»

TEF Logger App

Complete Technical User Manual & Feature Guide
Application: TEF Logger App
Version: v6.01
Developer: Highpoint
Platform: Android 8.0 or higher
v6.01

Table of Contents

1Introduction & System Requirements
2Network Architecture & Connectivity
3User Interface & Real-Time Processing
4Background Engine, WakeLocks & Resurrection
5Lock Screen / Pocket Mode
6Hybrid GPS & Satellite Telemetry
7Map Engine & Proxy Failover System
8Station ID & Dynamic Logo Rendering
9TEF Remote Control & Frequency Mapping
10Log Management & Multipart Uploads
11Advanced Integrations (URDS Validator & RDS AI)
12FMDX Converter App
13Troubleshooting & FAQ
14Version History (Changelog)
15Credits

1. Introduction & System Requirements

The TEF Logger App is a highly specialized software tool designed for visualizing, recording, and managing FM reception data originating from TEF668x-based receivers (specifically those running the ESP32 firmware by PE5PVB). The application communicates wirelessly via the UDP protocol, decodes highly complex RF metadata (Frequency, PI Code, RDS strings, Signal Strength) in real-time, and fuses this information with the smartphone's native GPS data to generate URDS-compliant CSV logbooks for the global DX community.

Furthermore, the app deeply integrates data from the FMDX.org ecosystem. It renders interactive maps, employs statistical prediction models (AI) to reconstruct fragmented RDS texts, visualizes live telemetry from GPS satellites, and asynchronously downloads high-resolution station logos.

System Requirements

Platform Limitation: The TEF Logger App is exclusively available for Android. Porting to iOS is technically unfeasible. Apple's restrictive background process policies strictly prohibit the permanent binding of multicast UDP sockets in the background, as well as the use of indefinite WakeLocks, which are absolutely mandatory for automated logging while the screen is turned off.

2. Network Architecture & Connectivity

Specific Network Binding (Routing Bypass)

Modern Android versions (Android 6.0+) feature aggressive network routing protocols. If a device has an active mobile data connection (LTE/5G) while simultaneously connected to a Wi-Fi network that lacks external internet access (such as the direct hotspot created by the TEF receiver), Android defaults to routing all data traffic through the cellular network. Consequently, incoming local UDP broadcast packets on Port 9100 are ignored and dropped.

To resolve this architectural hurdle, the app performs a deep integration into the system's Connectivity Manager upon launch. It scans all available network interfaces for the "WIFI" transport layer and explicitly forces its internal Datagram Socket to bind exclusively to this local network adapter. Additionally, the system is instructed to prioritize the IPv4 stack to prevent timeout issues inherent to modern IPv6 cellular networks.

Establishing a Connection

  1. Ensure that both the receiver and the smartphone are logged into the exact same Wi-Fi subnet, or connect the TEF receiver directly to the smartphone's mobile hotspot.
  2. Launch the app. The socket listener initializes automatically and awaits broadcast packets from the TEF hardware.
  3. If multiple receivers are broadcasting on large networks, you can specifically target the desired device by its IP address via Menu → TEF Source.
Device Source Selection

3. User Interface & Real-Time Processing

Real-Time Data Processing

Once a connection is established, the application deconstructs the incoming comma-separated UDP payload at millisecond intervals. An internal watchdog timer simultaneously monitors the stream every 500 milliseconds; if packets cease arriving, the display safely resets to prevent frozen data states.

The following real-time data is visualized in highly optimized UI containers:

Menu Configurations

The user interface is highly customizable via the main menu:

Menu Item Technical Function
Lock Screen Activates Pocket Mode (consumes and ignores touch events to prevent accidental operation while in a pocket).
Log Vibration / Sound Triggers system haptics or the ToneGenerator whenever a data packet is successfully written to storage.
Show Comment Displays a text input field on the main screen. Entered text is injected into the CSV stream (Column 48).
TEF Rename Permanently assigns a custom alias/name to the receiver's current IP address for easier identification on multi-device networks.
Log Ident Enables users to manually map unidentified log entries to specific geographical transmitter coordinates, permanently linking them for future mapping.
Beta Update Accesses the in-app beta update channel, allowing users to read changelogs and download the newest experimental APKs directly without external stores.
Map License Displays your current license status for the map proxy servers.
```html

4. Background Engine, WakeLocks & Resurrection

The core philosophy of the app is autonomous logging over extended periods, often while the smartphone is stowed in a pocket. The Android operating system natively attempts to suspend applications to conserve battery. Several highly technical protection mechanisms counteract this to guarantee uninterrupted data collection.

Manual vs. Automatic Logging

Background Resilience & Auto-Resurrection

Because processing continuous UDP streams demands active processor time, the application runs a dedicated background service paired with specialized background optimization locks (WakeLocks, WifiLocks, and MulticastLocks). These ensure your phone's CPU and Wi-Fi radio do not power down when the screen turns off.

Resurrection Protocol: If Android's memory management (Low Memory Killer) violently terminates the application during a massive resource constraint, the app utilizes a system-level alarm watchdog. This mechanism guarantees that the background logging engine will autonomously revive and restart itself exactly 4 minutes after a crash.

Log File Handling & Selection Architecture

All recorded data is structured into dedicated LogFile instances, defined by a display name and a physical File pointer. The app utilizes a highly stable tracking architecture for these files:

Extended URDS CSV Architecture (All 49 Columns)

All collected data is physically appended to the targeted CSV file located in Downloads/logs/. To maintain strict URDS standard compatibility while supporting advanced local features (like AI injection), the CSV schema is strictly organized into 49 fixed columns (Indexed 0 to 48). Unused columns are deliberately left empty (rendered as consecutive commas) to act as padding for the FMLIST parsers.

Index Column Name Description, Data Type & Length
0 Record Type Fixed integer value of "30" representing a standard URDS record.
1 – 2 Empty Reserved / Unused padding.
3 Frequency Tuned frequency in Hz (e.g., 97300000) or kHz.
4 Empty Reserved / Unused padding.
5 & 6 Signal Strength Radio signal level measured in dBµV (Numeric, decimal).
7 Raw Timestamp Local receiver or system timestamp string.
8 & 9 Receiver GPS Lat/Lon Native device or fused coordinates (Decimal), typically rounded to 6 decimal places.
10 Empty Reserved / Unused padding.
11 Receiver Height Altitude above sea level in meters (Numeric).
12 ISO Timestamp UTC time formatted according to ISO 8601 (e.g., YYYY-MM-DD'T'HH:MM:SS'Z').
13 PI Code Raw hexadecimal Program Identification code (String, 4 chars) directly from the TEF hardware.
14 Empty Reserved for PTY (Program Type) / Unused padding.
15 PS Name Raw Program Service name (String, 8 chars). Spaces are strictly preserved as underscores (_).
16 – 29 Empty Reserved for extended RDS flags (TP, TA, RT) / Unused padding.
30 Station ID Unique numeric FMLIST station identifier (Integer).
31 AF List Alternate frequency raw codes (String Array, supports legacy integer and decimal MHz formats).
32 – 35 Empty Reserved / Unused padding.
36 Station Name Resolved human-readable station name (String) from the database.
37 City Transmitter city location (String).
38 ITU International country code (String, 1-3 chars).
39 ERP Effective Radiated Power in kW (Numeric).
40 Polarization Antenna polarization (String: H, V, or M).
41 Distance Calculated distance between receiver and transmitter in km (Numeric).
42 Azimuth Directional angle to the transmitter in degrees (Numeric, 0-360°).
43 & 44 Transmitter Lat/Lon Transmitter mast geographic coordinates (Decimal).
45 AI RDS Flag Artificial Intelligence status indicator (Integer, length 1). 1 = AI active, 0 = Inactive.
46 AI PI AI-processed/predicted Program Identification code (String, 4 chars).
47 AI PS AI-processed/predicted Program Service name (String, 8 chars).
48 Comment Custom user comments (String, variable length). Encapsulated within escaped quotes to prevent CSV parsing fractures.
```

5. Lock Screen / Pocket Mode

During mobile use (e.g., cycling or hiking), carrying an active smartphone in a pocket frequently results in capacitive phantom inputs on the touchscreen. This can inadvertently close the app or halt the logging process. As of v6.01, this feature is universally unlocked for all Android versions.

How the Overlay Works

Activated via the menu, the Lock Screen function technically injects a pitch-black layout container with an extremely high Z-axis priority (elevation) over the entire user interface. This overlay completely consumes all incoming touch events before they can reach the buttons or input fields beneath it. Concurrently, the rendering engine for the station logo is paused and hidden to prevent accidental interaction. Background processes continue entirely unaffected.

The Unlock Algorithm

A simple tap or swipe is insufficient to remove the overlay. The algorithm requires exactly 3 consecutive touches within 1000 milliseconds (1 second).

6. Hybrid GPS & Satellite Telemetry

The Hybrid Location Engine

Position tracking is designed for extreme fault tolerance. The location service initially attempts to use Google Mobile Services (FusedLocationProvider) to obtain an ultra-fast, high-precision fix by combining hardware sensors, cell tower triangulation, and satellite data. If this fails (e.g., on custom ROMs lacking Google services, or encountering a 15-second timeout), the system seamlessly falls back to the native Android LocationManager, reading data directly from the physical hardware chips.

Satellite Radar & Signal Visualization

Tapping the GPS data on the main screen opens the Satellite View. This interface does not display static text; rather, it intercepts raw NMEA telemetry callbacks from the satellites and computes a real-time radar map.

Hardware Dependency: Many Wi-Fi-only tablets lack physical GPS antennas and rely solely on router triangulation for location. Because this method generates zero physical satellite telemetry data, the radar view will remain empty on these devices, even if coordinates are successfully received.
Satellite View

7. Map Engine & Proxy Failover System

The app offers two distinct geographic mapping environments (Live TX Map and URDS Log Map), both built upon OpenStreetMap tiles. To circumvent API rate limits and geoblocking, a complex network architecture is employed.

Failover Proxy & SSL Bypass

Map tiles are never loaded directly from OSM servers. The network manager routes requests through a primary proxy server, injecting device and OS telemetry for authentication. If this server responds with a timeout (e.g., server failure), the app's background thread instantly switches to a hardcoded backup proxy server.
Because older devices (Android 8 and 9) often possess expired Let's Encrypt root certificates (resulting in "Trust anchor not found" errors), the app injects a custom TrustManager for map downloads, safely bypassing SSL verification exclusively for these specific proxy connections.

Slippy-Map Caching (Offline Mode)

All downloaded tiles (PNG images) are stored in the device's local cache based on their Z/X/Y coordinates. When the "Offline Caching" feature is triggered, the app calculates a bounding box around current coordinates and preemptively downloads all necessary images up to Zoom Level 16. The WebView then renders these maps entirely from local storage without requiring an internet connection. In the event of an invalid map license, the system actively triggers a purge sequence, wiping the WebView, JSON, and physical tile caches to protect server bandwidth.

Live TX Map Engine

The Live TX Map is a real-time visualization environment tailored for active DXing. It features:

The Live Map (TX MAP) user guide can be downloaded here: Download PDF.

Live TX Map

URDS Log Map & Playback Engine

The URDS map is a robust offline playback tool for analyzing recorded CSV log files. Its features include:

The URDS Mapviewer Guide (URDS MAP) user guide can be downloaded here: Download PDF.

image
Map License: Due to the increasing number of users and the resulting rise in map data downloads, I am unfortunately forced to introduce a service fee of €10 per year and device for using the map service. Currently, I pay almost €25 per month for this, and in some months even almost €60 or €80. I can no longer bear this burden alone. Therefore, I urge all users to update to the latest version. All older versions of the app will then no longer have access to the newer map data. Once the app has been updated, installed, and launched for the first time, it will register automatically, and a 14-day trial period will begin. When using the map display or via the newly added "Map License" menu item, a pop-up will appear with information about the current license status and the option to activate the map display. Invalid or expired licenses will immediately block map access and autonomously purge all related local caches.
Bild 1 Bild 2

8. Station Identification & Dynamic Logo Rendering

Mathematical Localization (Haversine & Epsilon)

Incoming data is matched against the FMDX database. To avoid floating-point rounding errors (e.g., if the TEF chip reports 104.295 MHz, but the database expects 104.300 MHz), the engine rasterizes frequencies using a strict mathematical tolerance limit (Epsilon = 0.02 MHz).
Once coordinates of a transmitter mast are known, the app uses the Haversine Formula, accounting for the Earth's curvature, to calculate the precise distance and the Azimuth angle required for physically aiming directional antennas.

PI Regional Codes (piReg): The identification engine intelligently handles regionalized program splits (piReg). In countries where national networks split into local variants (using the second nibble of the PI code), the app correctly resolves and displays the specific regional station name rather than defaulting to the national parent network.

Ambiguity Resolution & Manual ID Editing

If multiple physical transmitters share the exact same PI code on your current frequency, a badge (e.g., "+3") appears next to the Station ID. Note: To save UI space, frequencies with an excessive amount of additional locations (e.g., widespread networks in Italy) will display this badge safely capped as "99+".

Station ID Manual Edit
Station Identification

Dynamic Station Logos

The app features an interactive overlay displaying the broadcasting station's high-resolution logo (supporting both raster PNG and scalable vector SVG formats fetched securely via logos.fmdx.org).

Logo Wiggle UI

9. TEF Remote Control & Frequency Mapping

Via the TEF Remote menu, the app displays a control overlay. Every button press is converted in real-time into a command string, packaged into a UDP datagram, and transmitted back to the ESP32 chip.

TEF Remote Control Panel

Core Controls

Auto-Scan Safety Reset (Failsafe)

If the UDP connection drops or the Wi-Fi disconnects while Auto Scan is running, the app triggers a critical safety fallback. It automatically commands the ESP32 chip to halt the ongoing auto-scan process, preventing the hardware from endlessly scanning without a client to record the data.

Manual Frequency Entry (OIRT Support)

A long-press on the Scan button opens a dialog for direct frequency input. The app routes the input string through a Regular Expression (Regex) parser that cleans invalid characters. This allows inputs like "991", "99.1", or "99100" to be processed uniformly. The parser explicitly supports low frequency ranges down to 68.80 MHz, enabling full command over the Eastern European OIRT band.

10. Log Management & Multipart Uploads

The URDS Options menu conceals a complete file manager. The architecture relies on a RecyclerView utilizing set-based path selection. This ensures file selection remains perfectly stable during scrolling.

Managing Local Files

Multipart Uploads & Header Injection

When uploading logs to FMLIST, the app automatically merges multiple selected logs and compresses them into a GZIP archive to drastically reduce cellular data consumption. The HTTP-POST upload is executed using a "Multipart/Form-Data" format.

Crucially, the app automatically injects hardware metadata—the exact TEF hardware type and ESP32 firmware version—into the HTTP POST headers. This ensures highly accurate records in the global URDS database.

A specialized tracking engine intercepts the byte streams being pushed through the socket, calculating the exact percentage uploaded in real time and feeding it back to the UI progress bar, preventing ANR (Application Not Responding) crashes on slow connections.

In-App Beta Updates

Users can fetch the latest experimental versions directly inside the app. The update engine pulls version manifests from the server, displays detailed changelogs, and executes direct APK downloads without relying on external app stores.

11. Advanced Integrations (URDS Validator & RDS AI)

URDS Log Validator

The integrated URDS Log Validator is a cornerstone feature that allows users to audit their raw CSV logs directly within the app before uploading. It cross-references recorded data with the FMDX database, assigns confidence scores to each reception, and offers an 'Auto-Fix' capability to mathematically repair erroneous PI and PS values. It features a fully interactive UI to manually resolve ambiguous stations, filter by confidence (e.g., <40%, 40-73%), and inject custom text comments directly into the log rows before saving the enriched, clean CSV back to local storage.

You can find a detailed guide for the URDS Log Validator here: URDS Log Validator Documentation.

RDS AI Predictor

The RDS AI Predictor acts as an intelligent, mathematical interception layer between the receiver and the screen. Because conventional RDS decoders often produce flickering letters when reception is weak, the AI evaluates the raw stream before it reaches the UI.

RDS AI Interface

You can find a detailed guide for the RDS AI Predictor here: RDS AI Predictor Documentation.

12. FMDX Connector

Use the FMDX Converter app for local logging of web servers on your smartphone! FMDX Connector Interface

FMDX Connector App: Download

13. Troubleshooting & FAQ

Q: No data from TEF. All values remain at zero.

A: UDP broadcasting is immediately paused by the TEF receiver whenever its internal hardware menu is open. Close the menu on the device. Furthermore, check if your smartphone and receiver are logged into the exact same subnet, and verify under Menu → TEF Source that the correct local IP address is selected.


Q: GPS coordinates are missing or show 0.0000.

A: Ensure that Android location permissions in system settings are set to "Allow all the time". Note that Wi-Fi-only tablets often lack a physical GPS chip, and network-based positioning can fail in nature far away from Wi-Fi routers.


Q: Automatic logging stops after some time when the screen is off.

A: Aggressive battery optimizers (especially on Xiaomi, Samsung, and Huawei devices) intervene deeply in the system and "kill" the app's protective WakeLock. You must manually navigate to the App Info in Android settings, select "Battery," and strictly enforce the "Unrestricted" profile.


Q: The Live TX Map shows only a white area.

A: The rendering engine (Android System WebView) on your device is outdated or has crashed internally. On older systems (Android 9/10), update the Chrome/WebView app via the Play Store. On newer devices, fully swiping the TEF Logger App away via the task manager to rebuild the rendering context usually suffices.


Q: The station name rapidly switches between two stations when I change the frequency.

A: You are scrolling through frequencies faster than the AI's 200ms hardware lag filter can catch. The TEF chip's internal ring buffer is overlapping old and new data. Pause for at least one second when manual tuning to allow the buffer to clear properly.


Q: On weak signals, some letters in the name are white, others are gray. Why?

A: White letters have been mathematically fully verified or checked exactly against the FMDX database. Gray letters indicate a statistical prediction (e.g., Bigram correction) by the AI engine. As soon as the signal improves slightly, the engine overwrites the prediction with real data, and the letters turn white.

14. Version History (Changelog)

Version 6.01
Version 6.0
Version 5.9
Version 5.83
Version 5.82
Version 5.81
Version 5.8
Version 5.72
Version 5.71
Version 5.7
Version 5.6
Version 5.5
Version 5.4
Version 5.3
Version 5.22
Version 5.21
Version 5.2
Version 5.1
Version 5.01
Version 5.0
Version 4.11
Version 4.1
Version 4.0
Version 3.90
Version 3.81
Version 3.80
Version 3.73
Version 3.72
Version 3.7
Version 3.61
Version 3.6
Version 3.5
Version 3.4
Version 3.3
Version 3.2
Version 3.1
Version 3.0
Version 2.4
Version 2.3
Version 2.2
Version 2.1
Version 2.0

15. Credits

Developed in collaboration with the international FM‑DX community.