The Deep Sync Relay is a C#/.NET 7 application designed to relay and manage real-time biometric data between wearable devices and a client application over TCP. It is receiving data from multiple wearables, and forwards it to a client app.
- TCP Communication: Listens to incoming data from wearables and the client app on configurable ports.
- User Management: Tracks connected users (wearables), assigns unique IDs, and manages timeouts.
- Data Relay: Receives, and forwards heart rate and SpO2 data.
- Command Handling: Supports commands from the client app to wearables (e.g., assigning new IDs).
- Debug Mode: Simulates multiple users and generates test data for development and testing (
-d). - Threaded Architecture: Uses threads and async tasks for efficient, concurrent data handling.
- Wearables connect to the server via TCP, sending JSON-formatted biometric data.
- Client Application connects via TCP to receive user data and send commands.
- The server maintains a concurrent dictionary of users and relays messages as needed.
- .NET 7 SDK
- Visual Studio 2022 or later
- Build the project in Visual Studio 2022.
- Run the server from the command line or within Visual Studio.
-d
Enable debug mode (generates test users and data).-ip <address>
Set the TCP address for the client application (default:192.168.101.223).
Example:
DeSyServer.exe -d -ip 192.168.19.203
- Wearable to Server: 53397
- Server to Wearable: 53396
- App to Server: 43396
- Server to App: 43397
All communication uses JSON. Example user data: { "userId": 1, "ip": "192.168.111.10", "heartRate": { "last": 75, "average": 72 }, "spO2": { "lastSpO2": 98.5, "averageSpO2": 98.0 }, "lastUpdate": "2025-11-25T12:34:56" }
DeSyDataRelay: Main server logic, TCP handling, user management.UserData: Represents a user's biometric data and connection info.NewIdCmd,DeepSyncCmd: Command structures for communication.
- Add new sensor types by extending
UserDataand updating JSON handling. - Adjust timeouts and port numbers as needed in
DeSyDataRelay.
???