| Versions |
 |
|
| Author |
Topic  |
|
csalazar
Bolivia
4 Posts |
Posted - 13 mars 2012 : 18:38:38
|
Hi Everyone, I´m form Bolivia. I have a trouble with my GPRS connection beetwen tracker TK103-2 and the software GPS Tracker (Version 1.1.0.2). I set up my tracker with the APN of my IPS; internet.tigo.bo . Acording with software the connection is established and my tracker is sending information to the software. I could check this with the command: netstad -a en DOS mode of my computer. Acording with this the conection beetwen my server (software) and the tracker is established using the port 9000 but for some reason the software doesn´t show nothing. Please I need that the tracker works with GPRS connection. I'll be waiting for your comments. thanks
|
GPS Bolivia |
|
|
Ads
|
|
|
csalazar
Bolivia
4 Posts |
|
|
barbudor
France
1575 Posts |
Posted - 13 mars 2012 : 22:47:04
|
Ola Csalazar y bienvenido a GpsPassion 
I'll stop here, my spanish is too bad 
Are you sure that your tracker is in good position to receive GPS signal ? Is it outside ? Have you tested it with SMS mode before to check that it has a fix and a good position ?
Because if it does not have a position, then it is normal that the software says "ok its connected" but does not show the position.
Instead of running the GpsTracker software, you may try to get the nc.exe (NetCat, available from many sites such as http://www.instructables.com/id/Netcat-fun!/step1/Download-netcat/) and run the command :
nc -l -p 9000 to see the packets coming from your tracker.
|
Modérateur Forum Traceurs GPS et Suivi GPS Temps Réel, son Index (français) et Les bons plan SIM pour traceurs GPS Moderator Forum Live GPS Tracking Systems and its Index (english) CartoExploreur3D | OziPC+OziCE(iPaq314) | TTGoLive950 | Carminat TomTom Live | Tracker Coban GPS-102 |
Edited by - barbudor on 13 mars 2012 22:47:56 |
 |
|
|
csalazar
Bolivia
4 Posts |
Posted - 15 mars 2012 : 00:01:41
|
Hi Barbudor, thank you so much for your suggestions. Yes I've tested with sms mode before use with gprs mode and it works ok. Now I used another software: GPSGate Server and with this software my tracker is working very good. I guess that was some problem with GPS Tracker software but now I'm happy because my tracker is alive =) Here I have a screenshot with the software working and showing my tracker: http://www.subirimagenes.net/show-image.php?id=e6fbafdb151dc6dc87d83703867f81ff |
GPS Bolivia |
 |
|
|
jaggen
9 Posts |
Posted - 16 mars 2012 : 01:49:07
|
Hola Carlos, saludos desde Chile. estimado, vi que usas mas de un software para administrar tus gps, cual me recomendarias?. tengo un TK103-2 y no he podido sacarle provecho por no tener un soft que me apoye. agradezco de antemano. saludos Aldo. |
 |
|
|
csalazar
Bolivia
4 Posts |
Posted - 16 mars 2012 : 03:42:34
|
Hola Aldo, actualmente el software que estoy usando es el GPSGate Server, puesto que con e anterior software el GPS Tracker tuve muchos problemas ademas de que no es muy funcional. Te recomiendo el GPSGate Server que es compatible con muchos dispositivos tracker, me ha funcionado de maravilla. Saludos. |
GPS Bolivia |
 |
|
|
mykol
USA
13 Posts |
Posted - 08 avr. 2012 : 08:36:46
|
Hey, I looks like you are making your own server too, I'm trying to do the same thing as well!
But I was wondering, I just got the device communicating with my server and loading the data into my DB, but I noted that the only data going into my DB seems to be an IMEI number, that is repeated several times when testing the unit. Is there something that I am forgetting to do because the manual that came with it wasn't very helpful. |
 |
|
|
barbudor
France
1575 Posts |
Posted - 08 avr. 2012 : 10:06:34
|
Hi mykol
You probably forgot to send the command which enables the repetitive sending of position. Does 1 position get sent when you call the tracker (not by SMS but to GPRS) ?
Depending on your brand you should have a command like "fixtttscccn123456" or "tfix..." where ttt is the period in seconds of the position message and ccc is the number of time the message is sent (ccc=*** means forever). |
Modérateur Forum Traceurs GPS et Suivi GPS Temps Réel, son Index (français) et Les bons plan SIM pour traceurs GPS Moderator Forum Live GPS Tracking Systems and its Index (english) CartoExploreur3D | OziPC+OziCE(iPaq314) | TTGoLive950 | Carminat TomTom Live | Tracker Coban GPS-102 |
Edited by - barbudor on 08 avr. 2012 10:08:30 |
 |
|
|
mykol
USA
13 Posts |
Posted - 08 avr. 2012 : 23:59:45
|
| Ok, I did that and it sends locations to the authorized numbers, but it doesn't send different data to my server? It keeps sending the IMEI instead? Am I doing something wrong? |
 |
|
|
barbudor
France
1575 Posts |
|
|
mykol
USA
13 Posts |
Posted - 09 avr. 2012 : 02:50:28
|
Ya, its from the same tracker.
I have to program the device with another sim and then I switch it to the GPRS sim. Then it starts sending data but the data that I'm looking for isn't there.
|
 |
|
|
mykol
USA
13 Posts |
Posted - 09 avr. 2012 : 02:53:19
|
When I take the message from the device, all I'm getting is this
##,imei:359*********549,A;
I flipped a couple of the number for reasons, but that is all the data I get. What is wrong here? |
Edited by - barbudor on 11 avr. 2012 22:13:18 |
 |
|
|
barbudor
France
1575 Posts |
|
|
mykol
USA
13 Posts |
Posted - 09 avr. 2012 : 20:47:55
|
| ok, I see that now, I have a question though, obviously I'm going to need to use REGEX to check to see if that message is sent. Do you have one that I could use or is that message always the same (other then the IMEI number?) also is that number a fixed length? |
 |
|
|
barbudor
France
1575 Posts |
Posted - 09 avr. 2012 : 20:59:38
|
IMEI is fixed length.
This is an extract of my code, part of a larger stuff, so not usable as-is. But could give you some ideas.
bool TrackerCoban::Identify( char *_buffer, int _nbytes, char *_pId )
{
bool identified = false;
if ( _nbytes > BUFF_LEN )
_nbytes = BUFF_LEN;
if ( _nbytes < 0 )
_nbytes = 0;
if ( (_nbytes >= 16) && isdigit(_buffer[0]) && isdigit(_buffer[14]) && (_buffer[15]==';') )
{
// <imei-number>;
// heartbeat
memcpy( _pId, _buffer, 15 );
_pId[15] = '\0';
identified = true;
}
else if ( (_nbytes >= 24) && (0 == strncmp( _buffer, "##,imei:", 8 )) && isdigit(_buffer[0+8]) && isdigit(_buffer[14+8]) && (_buffer[15+8]==',') )
{
// ##imei:<imei-number>
// This is another Hearbeat, we shall answer with "LOAD"
memcpy( _pId, _buffer+8, 15 );
_pId[15] = '\0';
identified = true;
}
else if ( (_nbytes >= 21) && (0 == strncmp( _buffer, "imei:", 5 )) && isdigit(_buffer[0+5]) && isdigit(_buffer[14+5]) && (_buffer[15+5]==',') )
{
// generic command
// no fix : imei:359586015829802,tracker,000000000,13554900601,L,;
// fix ok : imei:359587010124900,tracker,0809231929,13554900601,F,112909.397,A,2234.4669,N,11354.3287,E,0.11,;
memcpy( _pId, _buffer+5, 15 );
_pId[15] = '\0';
identified = true;
}
return identified;
}
GtEvent::Type_e TrackerCoban::findType( char *_token )
{
// enum Type_e { Unknown=0, Heartbeat, Position, SOS, GeoFence, Move, Overspeed, LowBattery, Shutdown=999 };
if ( 0 == strncmp( _token, "tracker", 7 ) )
return GtEvent::Position;
else if ( 0 == strncmp( _token, "help me", 7 ) )
return GtEvent::SOS;
else if ( 0 == strncmp( _token, "stockade", 8 ) )
return GtEvent::GeoFence;
else if ( 0 == strncmp( _token, "move", 4 ) )
return GtEvent::Move;
else if ( 0 == strncmp( _token, "speed", 5 ) )
return GtEvent::Overspeed;
else if ( 0 == strncmp( _token, "low battery", 11 ) )
return GtEvent::LowBattery;
else if ( 0 == strncmp( _token, "dt", 2 ) )
return (GtEvent::Type_e)(-1);
else if ( 0 == strncmp( _token, "et", 2 ) )
return (GtEvent::Type_e)(-1);
else if ( 0 == strncmp( _token, "gt", 2 ) )
return (GtEvent::Type_e)(-1);
else if ( 0 == strncmp( _token, "ht", 2 ) )
return (GtEvent::Type_e)(-1);
else if ( 0 == strncmp( _token, "it", 2 ) )
return (GtEvent::Type_e)(-1);
else if ( 0 == strncmp( _token, "nt", 2 ) )
return (GtEvent::Type_e)(-1);
else
log( LOG_WARNING, "TkCoban%04u: Command not recognized : %s", pEndPoint->GetIdx(),(int)_token );
return GtEvent::Unknown;
}
GtEvent *TrackerCoban::Parse( unsigned char *_buffer, int _nbytes )
{
if ( _nbytes > BUFF_LEN )
_nbytes = BUFF_LEN;
if ( _nbytes < 0 )
_nbytes = 0;
// filter spurious '\x0A'
if ( (_nbytes > 0) && (*_buffer == '\x0A') )
{
++_buffer;
--_nbytes;
}
GtEvent *pEvent = GtSource::Parse( _buffer, _nbytes );
DBG1( "Parse : '%s'", (int)wrkBuff );
if ( _nbytes == 0 )
{
pEvent->type = GtEvent::Closing;
}
else if ( (_nbytes >= 15) && isdigit(wrkBuff[0]) && isdigit(wrkBuff[14]) && (wrkBuff[15]==';') )
{
// this is IMEI number, we shall answer with "ON"
pEndPoint->Send( "ON", 2 );
pEvent->type = GtEvent::Heartbeat;
}
else if ( (_nbytes >= 24) && (0 == strncmp( (char*)wrkBuff, "##,imei:", 8 )) && isdigit(wrkBuff[0+8]) && isdigit(wrkBuff[14+8]) && (wrkBuff[15+8]==',') )
{
// This is another Hearbeat, we shall answer with "LOAD"
pEndPoint->Send( "LOAD", 4 );
pEvent->type = GtEvent::Heartbeat;
}
else if ( (_nbytes >= 21) && (0 == strncmp( (char*)wrkBuff, "imei:", 5 )) && isdigit(wrkBuff[0+5]) && isdigit(wrkBuff[14+5]) && (wrkBuff[15+5]==',') )
{
// generic command
// no fix : imei:359586015829802,tracker,000000000,13554900601,L,;
// fix ok : imei:359587010124900,tracker,0809231929,13554900601,F,112909.397,A,2234.4669,N,11354.3287,E,0.11,;
char *saveptr = NULL, *token;
// imei value
token = strTok_r( (char*)wrkBuff+5, ",", &saveptr );
if ( !token ) return NULL;
// command
token = strTok_r( NULL, ",", &saveptr );
if ( !token )
{
DBG( "Parse error: command" );
delete pEvent;
return NULL;
}
pEvent->type = findType( token );
DBG1( "Command : %d", pEvent->type );
if ( pEvent->type <= 0 )
{
DBG2( "TkCoban: unknown or command acknoledgement %s '%s", (int)token, (int)_buffer );
delete pEvent;
return NULL;
}
// date
char *pDate = strTok_r( NULL, ",", &saveptr );
if ( !pDate )
{
DBG( "Parse error: date" );
delete pEvent;
return NULL;
}
if ( 10 != strlen(pDate) )
{
DBG( "Parse error: date (len!=10)" );
delete pEvent;
return NULL;
}
// unknown
token = strTok_r( NULL, ",", &saveptr );
if ( !token )
{
DBG( "Parse error: 'unknown field'" );
delete pEvent;
return NULL;
}
// fix or no-fix
token = strTok_r( NULL, ",", &saveptr );
if ( !token )
{
DBG( "Parse error: fix" );
delete pEvent;
return NULL;
}
if ( token[0] == 'L' )
{
if ( gotFix )
log( LOG_WARNING, "TkCoban%04u: Fix lost!", pEndPoint->GetIdx() );
gotFix = false;
return pEvent;
}
if ( token[0] == 'F' )
{
if ( !gotFix )
log( LOG_INFO, "TkCoban%04u: Got Fix!", pEndPoint->GetIdx() );
gotFix = true;
}
else
{
DBG1( "Parse error: fix no-L, no-F : %s", (int)token );
delete pEvent;
return NULL;
}
// time
char *pTime = strTok_r( NULL, ",", &saveptr );
if ( !pTime )
{
DBG( "Parse error: time" );
delete pEvent;
return NULL;
}
if ( 10 != strlen(pTime) )
{
DBG( "Parse error: time (len!=10)" );
delete pEvent;
return NULL;
}
// A
token = strTok_r( NULL, ",", &saveptr );
if ( !token )
{
DBG( "Parse error: 'A'" );
delete pEvent;
return NULL;
}
if ( token[0] != 'A' )
{
DBG1( "Parse error: 'A' not A : %s", (int)token );
delete pEvent;
return NULL;
}
// convert date/time
struct tm tracktm;
bzero( &tracktm, sizeof(tracktm) );
tracktm.tm_sec = atoi( pTime + 4 );
pTime[4] = '\0';
tracktm.tm_min = atoi( pTime + 2 );
pTime[2] = '\0';
tracktm.tm_hour = atoi( pTime );
pDate[6] = '\0';
tracktm.tm_mday = atoi( pDate + 4 );
pDate[4] = '\0';
tracktm.tm_mon = atoi( pDate + 2 ) - 1;
pDate[2] = '\0';
tracktm.tm_year = atoi( pDate ) + 100;
//DBG3( "Date : %04d-%02d-%02d", tracktm.tm_year+1900, tracktm.tm_mon+1, tracktm.tm_mday );
//DBG3( "Time : %02d:%02d:%02d", tracktm.tm_hour, tracktm.tm_min, tracktm.tm_sec );
pEvent->point.time = timegm( &tracktm );
//DBG1( "time_t : %d", pEvent->point.time );
#if DEBUG
struct tm *g_tm, *l_tm;
g_tm = gmtime( &(pEvent->point.time) );
DBG1( "gtime: %s", (int)asctime(g_tm));
l_tm = localtime( &(pEvent->point.time) );
DBG1( "ltime: %s", (int)asctime(l_tm));
#endif
// lat
token = strTok_r( NULL, ",", &saveptr );
if ( !token )
{
DBG( "Parse error: Lat" );
delete pEvent;
return NULL;
}
double min = atof( token+2 );
token[2] = '\0';
double deg = atof( token );
pEvent->point.lat = deg + min / 60.0;
token = strTok_r( NULL, ",", &saveptr );
if ( !token )
{
DBG( "Parse error: Lat (N/S)" );
delete pEvent;
return NULL;
}
if ( token[0] == 'S' )
pEvent->point.lat = - pEvent->point.lat;
else if ( token[0] != 'N' )
{
DBG1( "Parse error: Lat, no-N, no-S : %s", (int)token );
delete pEvent;
return NULL;
}
// lon
token = strTok_r( NULL, ",", &saveptr );
if ( !token )
{
DBG( "Parse error: Lon" );
delete pEvent;
return NULL;
}
min = atof( token+3 );
token[3] = '\0';
deg = atof( token );
pEvent->point.lon = deg + min / 60.0;
token = strTok_r( NULL, ",", &saveptr );
if ( !token )
{
DBG( "Parse error: Lon (E/W)" );
delete pEvent;
return NULL;
}
if ( token[0] == 'W' )
pEvent->point.lon = - pEvent->point.lon;
else if ( token[0] != 'E' )
{
DBG1( "Parse error: Lat, no-E, no-W : %s", (int)token );
delete pEvent;
return NULL;
}
// speed
token = strTok_r( NULL, ",", &saveptr );
if ( !token || !isdigit(token[0]) )
pEvent->point.speed = GtPoint::INVALID;
else
pEvent->point.speed = atof( token ) * 1.852;
pEvent->point.alt = GtPoint::INVALID;
pEvent->point.isValid = true;
DBG3( "Point %d, %d @ %d", (int)(1000.0*pEvent->point.lat), (int)(1000.0*pEvent->point.lon), (int)(1000.0*pEvent->point.speed) );
}
if ( pEvent && (pEvent->type > GtEvent::Position) && (pEvent->point.isValid) )
{
SendCommand( "E", 1 );
}
return pEvent;
}
// function similar to standard strtok but which parse properly empty fields
// a,,c will return "a", "", "c" (while standard strtok would return "a", "c")
char *GtSource::strTok_r( char *_string, const char *_sep, char **psaveptr )
{
char *retptr;
char *savptr = *psaveptr;
if ( _string )
savptr = _string;
retptr = savptr;
while ( savptr && *savptr && !strchr( _sep, *savptr ) )
++savptr;
if ( savptr && *savptr )
*savptr++ = '\0';
else
savptr = NULL;
*psaveptr = savptr;
return retptr;
}
|
Modérateur Forum Traceurs GPS et Suivi GPS Temps Réel, son Index (français) et Les bons plan SIM pour traceurs GPS Moderator Forum Live GPS Tracking Systems and its Index (english) CartoExploreur3D | OziPC+OziCE(iPaq314) | TTGoLive950 | Carminat TomTom Live | Tracker Coban GPS-102 |
 |
|
|
mykol
USA
13 Posts |
Posted - 10 avr. 2012 : 05:31:42
|
Ok, so I get the first message from the device saying: ##,imei:359*********549,A;
I find the ## and then send the response: LOAD
Then the transmitter sends: 359*********549,A;
I find that the first part is a list of numbers and send: OK
But then the transmitter keeps sending: 359*********549,A;
Am I doing something wrong there? Because I believe I am sending the correct information... (We could e-mail back and forth if you want to look at my VB.net code)
PS: Thanks for all that, lol, a little much but I might be able to use pieces :) |
Edited by - barbudor on 11 avr. 2012 22:13:05 |
 |
|
Topic  |
|
|
|
| This page was generated in 0,59 seconds. |
 |
|