diff --git a/backend/src/gps/traccar-client.service.ts b/backend/src/gps/traccar-client.service.ts index 7adc21a..ca790fe 100644 --- a/backend/src/gps/traccar-client.service.ts +++ b/backend/src/gps/traccar-client.service.ts @@ -343,7 +343,7 @@ export class TraccarClientService implements OnModuleInit { /** * Get the device port URL for mobile app configuration - * Returns hostname:port for Traccar Client app to connect to + * Returns full HTTP URL - port 5055 uses OsmAnd protocol without SSL */ getDeviceServerUrl(): string { const port = this.configService.get('TRACCAR_DEVICE_PORT') || '5055'; @@ -352,10 +352,10 @@ export class TraccarClientService implements OnModuleInit { const traccarUrl = this.getTraccarUrl(); try { const url = new URL(traccarUrl); - // Return just hostname:port (no protocol - the app handles that) - return `${url.hostname}:${port}`; + // Return HTTP URL (not HTTPS) - OsmAnd protocol on port 5055 doesn't use SSL + return `http://${url.hostname}:${port}`; } catch { - return `localhost:${port}`; + return `http://localhost:${port}`; } } diff --git a/frontend/src/pages/GpsTracking.tsx b/frontend/src/pages/GpsTracking.tsx index 89699b2..f278caf 100644 --- a/frontend/src/pages/GpsTracking.tsx +++ b/frontend/src/pages/GpsTracking.tsx @@ -776,23 +776,32 @@ export function GpsTracking() { )} - {/* QR Code for Traccar Client app */} -
+ {/* Manual Configuration - Traccar Client doesn't reliably scan QR codes */} +
- - Scan with Traccar Client + + Download Traccar Client
-
- {/* Traccar Client expects: serverUrl?id=xxx&interval=xxx&accuracy=high */} - + -

- Open Traccar Client → Settings → Scan QR Code +

+ Must use official Traccar Client app (not other GPS apps)