How to set up GPRS tracking with TK103

Vee.K7279 years ago

Hi, I'm building a web application with php and mysql to track several vehicles from the website. I've bought TK103 devices from a chinese manufacturers. Now I understand how to send and receive data with sms commands but I'm not able to find any resource on how to do it over the internet.

Once I enable the gprs option on the device, how do I actually communicate with the device. i understand I might have to create a server for that. I have no idea where to begin, any easy instructions/guides/resources would be much appreciated.

Thanks in advance

Anton Tananaev9 years ago

You can use Traccar server if you want and then just call API from your PHP application.

Vee.K7279 years ago

I'll need more than a hint for this. Where do I get the APi and how do I configure the device to communicate with the traccar servers?

Anton Tananaev9 years ago

For more info about API you can read this page:

https://www.traccar.org/traccar-api/

For details on how to configure device you need to check manual for your particular device or ask seller / manufacturer.

Vee.K7279 years ago

I've read the user manual and uunderstand it for the most part. It lists a lot of details on using SMS to operate the device but not through GPRS. There is however enough to setup gprs tracking. The command is something like ip[ip address][space]port[port number] that needs to be sent over sms.

I'm confused, who's IP address and Port do I send here? The server's, where I'm hosting the website? And where do I find it?

Anton Tananaev9 years ago

IP address is the address of your server. For port please read following page:

https://www.traccar.org/ports-for-tk-gt-and-other-gps-devices/

shaga9 years ago

Im having an issue with APN settings on my TK103 I can not get the GPRS on, is this dependent on APN setting? it seems when I send the APN123456 fast.t-mobile.com, my smartphone is changing it to a hyperlink.

IE -
begin123456
adminip123456 <ip address> 5055
apn123456 fast.tmobile.com
t001mn123456 (tried fix060sn123456 too, neither returns a response)
GPRS123456

Sorry for the three hijacking.

Vee.K7279 years ago

Hi Anton, So it's slowly coming to me. I have a LAMP Server (Php/Apache) and using SSH, I can install Java Runtime and then Traccar as mentioned on https://www.traccar.org/linux/, but then what? How do I access the interface like demo.traccar.org? Or if I have to add a device, how do I do it?

Thanks

Anton Tananaev9 years ago

My demo server is located on a separate server with its own IP address, so sub-domain is configured via DNS.

If you want to host website and Traccar on the same server, you can use Apache proxy for Traccar web interface.

Vee.K7279 years ago

Anton mate, I've decided to use your demo server for now. i've added one device for testing and I'm receiving the data. Now the next step is to call the api from my php application. Based on the info on https://www.traccar.org/traccar-api/ are you referring to using cURL to call the api from php?

Something like the selected answer here: http://stackoverflow.com/questions/9802788/call-a-rest-api-in-php?

Thanks

Anton Tananaev9 years ago

I don't know much about PHP. cURL seems like one of the most popular options.

nafis8 years ago

Hi,
I have setup traccar sever by executing .run file. Everything is fine on server I can register and logging in and can see my dashboard. But when I am calling REST API it always return HTTP/1.1 401 Unauthorized response code. Below is my api call request:
url -v -X POST --data "["email","password"]" http://localhost:8082/api/session

Please help me to fix this problem

Thanks

Anton Tananaev8 years ago

Your POST data is incorrect. It should be form parameters.

ahirawar7 years ago

hey
guys help me
i have implemented tk103 server traccar but my code not working
i am unable to get communicate with the device and server
please help me

ahirawar7 years ago

if someone find the solution contact ,me on gautamnaresh96@gmail.com