Google
  Web www.gpspassion.com
fiogf49gjkf0d


GpsPasSion LIVE!
www.flickr.com
This is a Flickr badge showing public photos from GpsPasSion Live !. Make your own badge here.

www.NaviBlog.com



Versions

Links/Liens




Portal/Portail
Rechercher

- -

Polls/Sondages
Sondage
Pour vous guider sur la Route :
GPS Mobile (SEM)
GPS Intégré
Smartphone
Autre
Voter  -  Résultat des votes
Votes : 2791




Club GpsPasSion
Soutenez le site!

USA: (US$)
EUROPE: (€)
Guide Paypal


GpsPasSion Forums
Home | Profile | Register/Enregist. | Active Topics | Search/Recherche | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Advanced Topics
 Live GPS Tracking Systems
 [TOPIC] Xexun "TK102" Tracker - User Experiences
 New Topic  Reply/Répondre
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 177

jricardo

Brazil
10 Posts

Posted - 29 oct. 2009 :  02:49:07  Show Profile  Reply with Quote
AndrewH

Nice tip. I sent the command via GPRS and it worked. You have a catalog of command for GPRS?

Building. The coordinates received via SMS are different from those received by GPRS. Have you any idea what might be?
Go to Top of Page

SOFNW

36 Posts

Posted - 29 oct. 2009 :  11:56:44  Show Profile  Reply with Quote
Very interesting:

I have included some special lines of code to my software today in the morning.
Please correct me if i am wrong; The TK 102 (V1) has minimum GPRS sending interval of about 20 seconds?

After updating my sourcecode on server the unit is able to send interval of about ~ 3 (three!) seconds.

Edited by - SOFNW on 29 oct. 2009 12:52:44
Go to Top of Page

SOFNW

36 Posts

Posted - 29 oct. 2009 :  23:44:53  Show Profile  Reply with Quote
Just a short question:

Is somebody willing to connect to my server for - i think, some days?
I would like to checkout if the origin XEXUN TK's are working similar to the TK fakes (no matter if TK-102-1 or TK-102-2) and i need to determine the format of the strings the unit sends by GPRS. I am interested in my idea if the t030s***n settings can be overwritten by GPRS without user interaction. I have a simple webfrontend where you can checkout your position.

Feel free and send me a msg, would be very helpful to trick the TK bugs and write a tool to configure the TK without sending SMS.

Kind regards,

Boris
Go to Top of Page

AndrewH

Australia
60 Posts

Posted - 30 oct. 2009 :  00:28:02  Show Profile  Reply with Quote
quote:
Originally posted by jricardo

You have a catalog of command for GPRS?

Building. The coordinates received via SMS are different from those received by GPRS. Have you any idea what might be?



that is really interesting! As i said, mine is different from most TK's (mine is also a clone)

I think you will find that the difference in SMS Vs GPRS coords is that one is in decimal and the other in 'minutes' respectively. You have to convert.

The protocol i have is as follows:
After initiating GPRS mode (adminip) the tracker will attempt to connect with '##,imei:<imei>,A;'
The server then replies 'LOAD'

After this, the tracker sends a 'keepalive' every minuteto the server of JUST it's imei. The server must reply with 'ON' or the tracker will terminate it's GPRS session and try again from the ## command.

Once a session is established, the following commands can be sent, all commands start with **,imei:<imei>,
**,imei:<imei>,B - Single track (like calling the tracker)
**,imei:<imei>,C,20s - 20s polling
**,imei:<imei>,C,01m - 1m polling
**,imei:<imei>,D - Disable multi tracking
**,imei:<imei>,E - Stop alarm (stops move, stockade alarms)
**,imei:<imei>,G - Set move alarm
**,imei:<imei>,H,060 - 60 k/mph overspeed (mine seems to work in MILES??)
**,imei:<imei>,I,+9 - Set timezone to +9h
**,imei:<imei>,N - Return to SMS mode ('noadminip')
Using GPRS commands, mine will track @ 5s intervals.


After issuing the command, you should get a response from the tracker much like the SMS confirm such as:
imei:<imei>,ht,..... the HT denotes 'Speed alarm OK'

In an alarm case, it will replace the 'HT' with 'LOW BATTERY', 'SPEED', 'MOVE' etc.

I am interested to see how many of these commands work on a 'generic' TK or even one from xexun. I have a feeling mine is more like a TK-102-2

HTH
Andrew

Edited by - AndrewH on 30 oct. 2009 00:33:22
Go to Top of Page

thiago

Brazil
14 Posts

Posted - 30 oct. 2009 :  02:10:01  Show Profile  Reply with Quote
Trying to configure the GPRS, I installed the GPS Tracker software that comes with the TK102. When I added a new terminal providing my IMEI it worked ok. Accidentally I deleted the terminal from the Terminal List, but when I tried to register another terminal with the same IMEI the soft does not allow me and a message pops up "IMEI Invalidation". Does anybody know how to fix that problem?

In the manual it says that it is only possible one IMEI per computer, but what to do in a situation like that?

Edited by - thiago on 30 oct. 2009 02:11:17
Go to Top of Page

jricardo

Brazil
10 Posts

Posted - 30 oct. 2009 :  02:12:23  Show Profile  Reply with Quote
Andrew

Actually you are right. The coordinates of GPRS and SMS are different. GPRS -> Degrees and Minutes SMS-> Degrees.

The commands work perfectly.

I'm trying to develop an application in C # to read data from the device. But I'm having some problems. You of any examples? (in any programming language) could send?

The following are some tests I'm trying to do:

public void StartListen()
{
while (true)
{
string dados; byte[] bytes;
Console.WriteLine("Aguardando por conexào...");
TcpClient tcpClient = tcpListener.AcceptTcpClient();

tcpClient.ReceiveTimeout = timeout;
Console.WriteLine("Conexào realizada...");
NetworkStream networkStream = tcpClient.GetStream();

bytes = new byte[tcpClient.ReceiveBufferSize];
networkStream.Read(bytes, 0, (int)tcpClient.ReceiveBufferSize);
dados = Encoding.ASCII.GetString(bytes);
if (dados.IndexOf(";") > 0) dados = dados.Substring(0, dados.IndexOf(";") + 1);


Console.WriteLine("Dados Recebidos: " + dados);
Log(dados);


if (dados == "##,imei:123456789132456,A;")
{
dados = "LOAD";
}
else if (dados == "123456789132456;")
{
dados = "ON";
dados = "**,imei:123456789132456,B;";
}
else
{
dados = "**,imei:123456789132456,N;";
}


bytes = Encoding.ASCII.GetBytes(dados);
networkStream.Write(bytes, 0, bytes.Length);
Console.WriteLine(("Enviados /> : " + dados));


networkStream.Close();
networkStream = null;
tcpClient.Close();
tcpClient = null;

}

}

Go to Top of Page

AndrewH

Australia
60 Posts

Posted - 30 oct. 2009 :  09:05:43  Show Profile  Reply with Quote
This is the PHP function that processes mine. It is heavily based on Cyril's script (cyril@feraudet.com). I butchered his script to give a stateful connection and the ability to process commands held in a file.

My front end web page creates the file, the script then picks it up and sends the command on the next loop.


function interact($socket)
{
$loopcount = 0;
$conn_imei = "";
/* TALK TO YOUR CLIENT */
$rec = "";
# Read the socket but don't wait for data..
while (@socket_recv($socket, $rec, 2048, 0x40) !== 0) {

  # If we know the imei of the phone and there is a pending command send it.
  if ($conn_imei != "" and file_exists("<path>/commands/$conn_imei"))
    {
    $send_cmd = file_get_contents("<path>/commands/$conn_imei");
    socket_send($socket, $send_cmd, strlen($send_cmd), 0);
    echo date("d-m-y h:i:sa") . " Sent: $send_cmd\n";
    unlink("<path>/commands/$conn_imei");
    }

# Some pacing to ensure we don't split any incoming data.
sleep (1);

# Timeout the socket if it's not talking...
# Prevents duplicate connections, confusing the send commands
$loopcount++;
if ($loopcount > 120) return;

#remove any whitespace from ends of scting.
$rec = trim($rec);

if ($rec != "") 
  {
  $loopcount = 0;
  echo date("d-m-y h:i:sa") . " Got : $rec\n";
  $parts = explode(',',$rec);
    If (strpos($parts[0], "#") === FALSE )
    {
    $cnx = mysql_connect('localhost', 'tracker', '');
    
    # Only worry about the rest if there is data to get
    if (count($parts) > 1) 
      {
      $imei			  = substr($parts[0],5);
      $infotext			  = mysql_real_escape_string($parts[1]);
      $trackerdate                = mysql_real_escape_string($parts[2]);
      $phone                      = mysql_real_escape_string($parts[3]);
      $gpsSignalIndicator         = mysql_real_escape_string($parts[4]);
      $satelliteFixStatus         = mysql_real_escape_string($parts[6]);
      $latitudeDecimalDegrees     = mysql_real_escape_string($parts[7]);
      $latitudeHemisphere         = mysql_real_escape_string($parts);
      $longitudeDecimalDegrees    = mysql_real_escape_string($parts[9]);
      $longitudeHemisphere        = mysql_real_escape_string($parts[10]);
      $speed                      = mysql_real_escape_string($parts[11]);
      
      # Write it to the database...
      mysql_select_db('tracker', $cnx);
      if($gpsSignalIndicator != 'L')
      mysql_query("INSERT INTO gprmc (date, imei, phone, satelliteFixStatus, latitudeDecimalDegrees, latitudeHemisphere, longitudeDecimalDegrees, longitudeHemisphere, speed, infotext, gpsSignalIndicator) VALUES (now(), '$imei', '$phone', '$satelliteFixStatus', '$latitudeDecimalDegrees', '$latitudeHemisphere', '$longitudeDecimalDegrees', '$longitudeHemisphere', '$speed', '$infotext', '$gpsSignalIndicator')", $cnx);

     # Now check to see if we need to send any alerts.
     if ($infotext != "tracker"){
       $res = mysql_query("SELECT * FROM alerts WHERE imei='$imei'", $cnx);
       while($data = mysql_fetch_assoc($res)){
          switch ($infotext){
	  case "dt":
	    $body = "Disable Track OK";
	    break;
	  case "et":
	    $body = "Stop Alarm OK";
	    break;
	  case "gt";
	    $body = "Move Alarm set OK";
	    break;
	  case "help me":
	    $body = "Help!";
	    break;
	  case "ht":
	    $body = "Speed alarm set OK";
	    break;
	  case "it":
	    $body = "Timezone set OK";
	    break;
	  case "low battery":
	    $body = "Low battery!\nYou have about 2 minutes...";
	    break;
	  case "move":
	    $body = "Move Alarm!";
	    break;
	  case "nt":
	    $body = "Returned to SMS mode OK";
	    break;
	  case "speed":
	    $body = "Speed alarm!";
	    break;
	  case "stockade":
	    $body = "Geofence Violation!";
	    break;
          }
	 $headers = 'From: user@domain.com' . "\r\n" .
                    'Reply-To: tracker@domain.com' . "\r\n";
         $responsible = $data['responsible'];
         $rv = mail($responsible, "Tracker - $imei", $body, $headers);

       } 
     }
      mysql_close($cnx);
      }
    else
     {
     /* If we got here, we got an imei ONLY - not even 'imei:' first
	This seems to be some sort of 'keepalive' packet
        The TK-201 is not stateless like the TK-102, it
	needs to retain a session.  Basically, we just reply with 'ON'
	anything else seems to cause the device to reset the connection.
     */
     socket_send($socket, "ON", 2, 0);
     echo date("d-m-y h:i:sa") . " Sent: ON\n";
     }
    }
    else
    { 
      /* Here is where we land on the first iteration of the loop
	on a new connection. We get from the gps: ##,imei:<IMEI>,A;
      It seems the correct reply is 'LOAD' so that's what we send.
      */
      $init = $parts[0];
      $conn_imei = substr($parts[1],5);
      $cmd = $parts[2];
      if ($cmd = "A")
      {
        socket_send($socket, "LOAD", 4, 0);
        echo date("d-m-y h:i:sa") . " Sent: LOAD\n";
      }
    }
  }
$rec = "";
}
}

Go to Top of Page

SOFNW

36 Posts

Posted - 30 oct. 2009 :  22:17:14  Show Profile  Reply with Quote
quote:
After this, the tracker sends a 'keepalive' every minuteto the server of JUST it's imei. The server must reply with 'ON' or the tracker will terminate it's GPRS session and try again from the ## command.


I suppose, the server needs to reply only a command, as **,imei and so on;
maybe the tracker respond to everything, maybe only to special commands.

wait few minutes, i will re-write my code and post the results.
Go to Top of Page

javigps

Ecuador
2 Posts

Posted - 30 oct. 2009 :  22:48:46  Show Profile  Visit javigps's Homepage  Reply with Quote
Hi everybody!!

Could you help me with the SMS command for getting the device ID of the TK-102 and TK-103?
Not IMEI number, I know it is imei123456.

Thanks very much!!

Javier

Javi GPS
Go to Top of Page

SOFNW

36 Posts

Posted - 30 oct. 2009 :  23:17:53  Show Profile  Reply with Quote
Back again:

The TK isnt interested in the format, the data are incoming, the TK cares only for a GPRS data package.

I have sent some packages, see link below:



http://geosence.de/TK102/output.JPG

The TK seems to respond to everything.

But this is interesting, the interval is now @ 30 seconds, what has been configured by SMS.

If i send the "special package" to the TK, i have a tracking interval of ~ 4 seconds.

I think the TK (and i think, this is only for the non-xexun units) is very buggy, but it's simple to trick.

I think, i will start talking to xexun. I hope, that the X's are better than the copies...

Kind regards,

Boris

Edited by - SOFNW on 30 oct. 2009 23:21:35
Go to Top of Page

AndrewH

Australia
60 Posts

Posted - 31 oct. 2009 :  00:40:03  Show Profile  Reply with Quote
Boris, i think you misunderstand the operation of the unit. if you send the tsn command then it will send data at that interval regardless of other commands. If it recieves a command it does not understand, it just ignores it. You do not have to keep sending a command to get data.

As for the keepalive - it is just that. It enables the GPS to maintain a GPRS session. If it does not send any data, the carrier is likely to terminate the GPRS session.
Go to Top of Page

jricardo

Brazil
10 Posts

Posted - 31 oct. 2009 :  01:28:13  Show Profile  Reply with Quote
SOFNW

You could post in this forum software P_tracker_cmd_line_vers_1.exe "? Was the source of it?
Go to Top of Page

namwan2550

1 Posts

Posted - 31 oct. 2009 :  01:47:37  Show Profile  Reply with Quote
I have a problem when i change SIM in tracker. When i use old SIM it work good. But when i change to new SIM in tracker. i can't get response from tracker when i send SMS to tracker. But if i call to tracker it can response sms back to my phone. New SIM can receive SMS when i put in mobile phone.
Go to Top of Page

Shearerdk

Denmark
32 Posts

Posted - 31 oct. 2009 :  15:11:04  Show Profile  Reply with Quote
Hi all

i need some help. i have the newest firmware from xe. i am trying to flash/update my tk device. but i cant find the program to flash my thing with.

can anyone help me with a link to the program ?
Go to Top of Page

jricardo

Brazil
10 Posts

Posted - 31 oct. 2009 :  16:09:50  Show Profile  Reply with Quote
Hello Shearerdk

You can download the software directly from the manufacturer's website.
www.mcu-memory.com/datasheet/stc/stc-isp-v3.5-setup/stc-isp-v3.5-setup.exe

You could post a link to download the firmware?
Go to Top of Page
Page: of 177 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply/Répondre
 Printer Friendly
Jump To:
GpsPasSion Forums © 2002-2017_GpsPasSion/Manzanite Go To Top Of Page
This page was generated in 0,91 seconds. Powered By: Snitz Forums 2000 Version 3.4.05