Traccar 4.3 and last version of Traccar client

Peter Flower 6 years ago

Hi, do you know why I have this kind of answer when I tried to use Traccar Client with my server Traccar 4.3?
The answer are these:
5055 < IP Mobile Phone with Android:
Data sent from the Mobile Phone (It's a little bit unintelligible)

5055 > IP Mobile Phone with Android:
485454502f312e31203430302042616420526571756573740d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
Which translated is: HTTP/1.1 400 Bad Request content-length: 0

5055 < IP Mobile Phone with Android:
15030100020246
Which translated is: F

When I use the same mobile phone but with a demo server, everything is working very well. I use HTTPS for my server.
Is it changed the way how the information is transmitted? I have not see any change in the Osmand decoder.

Please you help

Anton Tananaev 6 years ago

Have you proxied HTTPS data? Server only handles HTTP.

Peter Flower 6 years ago

Thanks for your answer Anton.
I have tested with test-generator.py from a laptop in the same network and the information is received and decode by the server without any problem.
I have the server working with HTTPS and Teltonika devices working very well, and only wants to add the OsmAnd protocol to use mobile phone.
Inside the test-generator.py the URL server is set without http or https, the mobile app needs to add http or https.
Any clue about what could be happening?

Peter Flower 6 years ago

I will to add my configuration:

server {
	server_name	site.mytraccar.com;
	client_max_body_size 10M;
	client_body_buffer_size 128k;
	
	location / {
		proxy_set_header Host $host;
		proxy_set_header X-Forwarded-Host $host;
		proxy_set_header X-Forwarded-Server $host;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        	proxy_http_version 1.1;
        	proxy_set_header Upgrade $http_upgrade;
        	proxy_set_header Connection "upgrade";
		
		proxy_pass http://127.0.0.1:8082;
		proxy_redirect http://127.0.0.1:8082/ /;
		proxy_redirect ws://127.0.0.1:8082/api/socket /api/socket;

		proxy_buffering	off;
                proxy_connect_timeout	86400s;
                proxy_send_timeout	86400s;
                proxy_read_timeout	86400s;
		allow all; # Any IP can perform any other requests
                proxy_redirect off;
                proxy_set_header Proxy "";
	 }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/site.mytraccar.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/site.mytraccar.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
Anton Tananaev 6 years ago

Clue? I have already explained what the issue is. You cannot send HTTPS data directly to Traccar server.