The system now automatically sends both files (Aircraft Data + Entity Contacts) based on the toggle status in the Android app.
Writes two separate files in parallel:
player_aircraft_parsed.jsonl— aircraft data (~1KB/update)entity-contacts-parsed.jsonl— tactical units (~30KB/update)
A single command is enough:
python forward_parsed_udp.py --interval 50 --host 192.168.178.132 --port 5010 --verbose --authorized-devices authorized_devices.json --bind-ip 192.168.178.100What happens automatically:
- The script detects both files automatically
- During the handshake it receives the
entityTrackingEnabledstatus from the app - If toggle OFF: only aircraft data is sent
- If toggle ON: both files are sent in parallel
- Toggle switch in the Tactical Units list
- Status is sent to the forwarder during the handshake
- Can be toggled on/off at any time (the next handshake applies the new status)
DCS Export.lua
├─→ player_aircraft_parsed.jsonl (always)
└─→ entity-contacts-parsed.jsonl (always)
Python Forwarder (reads both files)
├─→ Aircraft Data → ALL connected devices
└─→ Entity Contacts → ONLY devices with entityTrackingEnabled=true
Android App
├─→ Receives Aircraft Data (always)
└─→ Receives Entity Contacts (only when toggle is active)
✅ One Python command — no separate processes
✅ Dynamically controllable — toggle in the app is enough
✅ Efficient — entity data is only sent when needed
✅ No bandwidth waste — forwarder checks sessions before sending
✅ Automatic detection — forwarder finds entity-contacts file automatically
{
"type": "ClientHello",
"deviceId": "...",
"deviceName": "...",
"publicKey": "...",
"entityTrackingEnabled": true // NEW
}Each session stores:
session_id— unique session IDdevice_id— device IDsession_key— encryption keyentity_tracking_enabled— client's toggle status
# Aircraft data: sent to ALL sessions
for device_id, session_id in device_sessions.items():
send(aircraft_data, device_id)
# Entity contacts: ONLY if session.entity_tracking_enabled==True
for device_id, session_id in device_sessions.items():
session = sessions[session_id]
if session.entity_tracking_enabled:
send(entity_data, device_id)The forwarder logs messages like:
🔑 Session created: abc123... (key derived from ECDH, with entity tracking)
📡 Entity contacts file detected: ...\entity-contacts-parsed.jsonl
📡 Sent entity data to abc123...
📡 Entity contacts sent to 1 device(s)
Or when toggle is off:
🔑 Session created: xyz789... (key derived from ECDH, aircraft data only)
Existing commands continue to work!
- If
entityTrackingEnabledis missing from the handshake → default:false - Old apps without the toggle → do not receive entity data
- New apps with toggle off → do not receive entity data
- New apps with toggle on → receive entity data
No breaking changes! 🎉