Linux Script using curl no longer works

Brodes a year ago

Hello,
I've been using the following script on a Raspberry Pi for quite a while with no issues until now.

#!/bin/sh
i=0
while [ $i -lt 12 ]; do # 12 five-second intervals in 1 minute
  curl "http://<traccar-server>:5055/?id=<0404>&lat={0}&lon={1}&timestamp={2}"
  sleep 5
  i=$(( i + 1 ))
done

Ther server is receiving but the device is showing the following the server logs:

0404	osmand	GET /?id=<0404>&lat=0&lon=1&timestamp=2 HTTP/1.1\r\nHost: <traccar-server>:5055\r\nUser-Agent: curl/7.74.0\r\nAccept: */*\r\n\r\n

Also when I check the "more info" on the device the device time is incorrect but on the actual device it is correct.

Any help will be much appreciated.

Brodes a year ago

Here are some server logs:

INFO: [T0fbf5535] connected
INFO: [T0fbf5535: osmand < server ip GET /?id=0404&lat=0&lon=1&timestamp=2 HTTP/1.1\r\nHost: <FQDN>:5055\r\nUser-Agent: curl/7.74.0\r\nAccept: */*\r\n\r\n
INFO: [T0fbf5535] id: 0404, time: 1970-01-01 10:00:02, lat: 0.00000, lon: 1.00000, course: 0.0
INFO: [T0fbf5535: osmand > server-ip] HTTP/1.1 200 OK\r\ncontent-length: 0\r\n\r\n
INFO: [T0fbf5535] disconnected
Anton Tananaev a year ago

It is displaying exactly what you're sending. What are you expecting to see?