Google
  Web www.gpspassion.com


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 : 2402




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
 Troubles with GPRS connection for TK103-2
 New Topic  Reply/Répondre
 Printer Friendly
Author Previous Topic Topic Next Topic  

csalazar

Bolivia
5 Posts

Posted - 13 mars 2012 :  18:38:38  Show Profile  Reply with Quote
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
5 Posts

Posted - 13 mars 2012 :  22:02:34  Show Profile  Reply with Quote
Here I have a screenshot of the netstat command, and the GPS Tracker running.
http://www.subirimagenes.net/show-image.php?id=8055bc33c18edcdb252fd6865df640df

GPS Bolivia
Go to Top of Page

barbudor

France
1787 Posts

Posted - 13 mars 2012 :  22:47:04  Show Profile  Visit barbudor's Homepage  Reply with Quote
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)
Using: CompeGPS Land 7 | LocusPro | Carminat TomTom Live | Tracker Coban GPS-102 | MoBAC
Used: CartoExp.3D | OziExp.PC | OziExp.CE(iPaq314)| TomTomGoLive950

Edited by - barbudor on 13 mars 2012 22:47:56
Go to Top of Page

csalazar

Bolivia
5 Posts

Posted - 15 mars 2012 :  00:01:41  Show Profile  Reply with Quote
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
Go to Top of Page

jaggen

9 Posts

Posted - 16 mars 2012 :  01:49:07  Show Profile  Reply with Quote
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.
Go to Top of Page

csalazar

Bolivia
5 Posts

Posted - 16 mars 2012 :  03:42:34  Show Profile  Reply with Quote
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
Go to Top of Page

mykol

USA
13 Posts

Posted - 08 avr. 2012 :  08:36:46  Show Profile  Reply with Quote
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.
Go to Top of Page

barbudor

France
1787 Posts

Posted - 08 avr. 2012 :  10:06:34  Show Profile  Visit barbudor's Homepage  Reply with Quote
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)
Using: CompeGPS Land 7 | LocusPro | Carminat TomTom Live | Tracker Coban GPS-102 | MoBAC
Used: CartoExp.3D | OziExp.PC | OziExp.CE(iPaq314)| TomTomGoLive950

Edited by - barbudor on 08 avr. 2012 10:08:30
Go to Top of Page

mykol

USA
13 Posts

Posted - 08 avr. 2012 :  23:59:45  Show Profile  Reply with Quote
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?
Go to Top of Page

barbudor

France
1787 Posts

Posted - 09 avr. 2012 :  00:08:47  Show Profile  Visit barbudor's Homepage  Reply with Quote
You mean that once you sent the "fix..." command, the tracker keeps on sending SMS to the authorized phone and only IMEI on GPRS ?

This is not a behavior I understand.
Normally once in GPRS mode, TK trackers send everything to GPRS.

Are you sure that the IMEI you are receiving on GPRS is from the same 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)
Using: CompeGPS Land 7 | LocusPro | Carminat TomTom Live | Tracker Coban GPS-102 | MoBAC
Used: CartoExp.3D | OziExp.PC | OziExp.CE(iPaq314)| TomTomGoLive950
Go to Top of Page

mykol

USA
13 Posts

Posted - 09 avr. 2012 :  02:50:28  Show Profile  Reply with Quote
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.

Go to Top of Page

mykol

USA
13 Posts

Posted - 09 avr. 2012 :  02:53:19  Show Profile  Reply with Quote
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
Go to Top of Page

barbudor

France
1787 Posts

Posted - 09 avr. 2012 :  12:23:51  Show Profile  Visit barbudor's Homepage  Reply with Quote
This is typically what I get from my Coban. This is the initial message.
You need to answer "LOAD" to this message (back to the tracker through the GPRS link, 4 characters, no quotation marks, no '\n' nor '\r'

Then you should start receiving the rest such as :
359*********549;

On which you should answer "ON"
The rest of the Coban protocol is here http://www.gpspassion.com/upload2/Coban_GPS102_GPRS_data_protocol.xls

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)
Using: CompeGPS Land 7 | LocusPro | Carminat TomTom Live | Tracker Coban GPS-102 | MoBAC
Used: CartoExp.3D | OziExp.PC | OziExp.CE(iPaq314)| TomTomGoLive950

Edited by - barbudor on 11 avr. 2012 22:13:13
Go to Top of Page

mykol

USA
13 Posts

Posted - 09 avr. 2012 :  20:47:55  Show Profile  Reply with Quote
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?
Go to Top of Page

barbudor

France
1787 Posts

Posted - 09 avr. 2012 :  20:59:38  Show Profile  Visit barbudor's Homepage  Reply with Quote
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)
Using: CompeGPS Land 7 | LocusPro | Carminat TomTom Live | Tracker Coban GPS-102 | MoBAC
Used: CartoExp.3D | OziExp.PC | OziExp.CE(iPaq314)| TomTomGoLive950
Go to Top of Page

mykol

USA
13 Posts

Posted - 10 avr. 2012 :  05:31:42  Show Profile  Reply with Quote
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
Go to Top of Page

mykol

USA
13 Posts

Posted - 10 avr. 2012 :  08:33:55  Show Profile  Reply with Quote
Holy Frijoles!!!!!!!

I got it working, instead of ON, I needed to write:
**,imei:359*********549,C,10s


XD

Edited by - barbudor on 11 avr. 2012 22:13:44
Go to Top of Page

mykol

USA
13 Posts

Posted - 10 avr. 2012 :  08:40:15  Show Profile  Reply with Quote
No what does this data mean?:
imei:359*********549,tracker,0809231929,13554900601,F,112909.397,A,2234.4669,N,11354.3287,E,0.11,;

Trying to comprehend it so I can know how to parse it.

Edited by - barbudor on 11 avr. 2012 22:13:51
Go to Top of Page

mykol

USA
13 Posts

Posted - 10 avr. 2012 :  10:24:07  Show Profile  Reply with Quote
Also, the :**,imei:359*********549,C,10s command isn't working right

I used:
**,imei:359*********549,C,1m

To have the device send a location every minute, but after I send that command, it hits my server with locations as fast as it can. I'm not sure what I'm doing wrong here.

Edited by - barbudor on 11 avr. 2012 22:14:08
Go to Top of Page

barbudor

France
1787 Posts

Posted - 10 avr. 2012 :  14:55:01  Show Profile  Visit barbudor's Homepage  Reply with Quote
The 1st message will stop coming after the LOAD
The 2nd message is a keep-alive and will continues coming every minutes or so, wether you send the "fix" or "nofix" command by SMS.

On my Coban, once I've sent the "fix" SMS, I get the position messages continuously.

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)
Using: CompeGPS Land 7 | LocusPro | Carminat TomTom Live | Tracker Coban GPS-102 | MoBAC
Used: CartoExp.3D | OziExp.PC | OziExp.CE(iPaq314)| TomTomGoLive950
Go to Top of Page

mykol

USA
13 Posts

Posted - 10 avr. 2012 :  16:17:40  Show Profile  Reply with Quote
I was wanting the device to send a Location every minute of so, is there a way to do that?

Also, what is the fix or nofix Text going to do? I was hoping that I could get the correct transmission by having the server talk with the device.

How do I get the position message periodically?
Go to Top of Page

barbudor

France
1787 Posts

Posted - 11 avr. 2012 :  00:40:15  Show Profile  Visit barbudor's Homepage  Reply with Quote
the "fix" command is supposed to tell the tracker to send the position message periodically

To get the position every minutes, it should be "fix060s***n123456"
(replace 123456 by the password if you changed it)

The syntax should be confirmed by your user manual :
- The number between "fix" and "s" is the number of time-unit, max is 255
- The letter after the number is the time-init : s for seconds, m for minutes (may be h for hour but not tested)
- The "***n" means forever. It could be 005n to get only 5 positions but generally forever is what you want

The "nofix" message cancel the above command and stops the tracker to send positions

Note that I am always using SMS to do this because it is simple but there are equivalent GPRS command that you can send back from the socket connection.
See line 26 column C in the excel :
**,imei:359*********549,C,1m

request the tracker to send position every 1 minute forever

and
**,imei:359*********549,D

to cancel periodc position message

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)
Using: CompeGPS Land 7 | LocusPro | Carminat TomTom Live | Tracker Coban GPS-102 | MoBAC
Used: CartoExp.3D | OziExp.PC | OziExp.CE(iPaq314)| TomTomGoLive950

Edited by - barbudor on 11 avr. 2012 22:12:23
Go to Top of Page

mykol

USA
13 Posts

Posted - 11 avr. 2012 :  08:14:30  Show Profile  Reply with Quote
##,imei:359*********549,A;
imei:359*********549,tracker,1204102259,,F,035925.000,A,3802.4708,N,08431.5625,W,0.23,152.20;
imei:359*********549,tracker,1204102259,,F,035955.000,A,3802.4719,N,08431.5621,W,0.07,34.77;;
imei:359*********549,tracker,1204102300,,F,040025.000,A,3802.4745,N,08431.5613,W,0.04,108.91;
359*********549;*549,tracker,1204102300,,F,040025.000,A,3802.4745,N,08431.5613,W,0.04,108.91;
imei:359*********549,tracker,1204102300,,F,040055.000,A,3802.4746,N,08431.5604,W,0.14,352.72;
imei:359*********549,tracker,1204102301,,F,040125.000,A,3802.4730,N,08431.5609,W,0.24,138.04;
imei:359*********549,tracker,1204102301,,F,040155.000,A,3802.4732,N,08431.5620,W,0.09,127.60;
##,imei:359*********549,A;
imei:359*********549,tracker,1204102302,,F,040225.000,A,3802.4726,N,08431.5614,W,0.06,329.77;
imei:359*********549,tracker,1204102302,,F,040256.000,A,3802.4728,N,08431.5600,W,0.15,143.43;
imei:359*********549,tracker,1204102303,,F,040326.000,A,3802.4727,N,08431.5606,W,0.11,120.16;
359*********549;*549,tracker,1204102303,,F,040326.000,A,3802.4727,N,08431.5606,W,0.11,120.16;
imei:359*********549,tracker,1204102303,,F,040356.000,A,3802.4730,N,08431.5592,W,0.05,137.44;
imei:359*********549,tracker,1204102304,,F,040421.000,A,3802.4728,N,08431.5594,W,0.04,200.39;
imei:359*********549,tracker,1204102304,,F,040451.000,A,3802.4725,N,08431.5581,W,0.06,292.61;
##,imei:359*********549,A;
imei:359*********549,tracker,1204102305,,F,040552.000,A,3802.4756,N,08431.5563,W,0.24,145.96;


That is the cycle of messages that I am receiving... not sure why ## keeps coming up
When I get ## I send LOAD
When I get 359*********549,... I send ON
When I get 359*********549,... again I send **,imei:359*********549,C,30s

When I get **,imei:359*********549... I don't send anything.

When doing this I get the data above(The TOP of this message)... Is this how it's suppose to work? Because it seems rather inconsistent.

PS: I want to have the device programmed by the server via-GPRS command.

Edited by - mykol on 12 avr. 2012 00:59:58
Go to Top of Page

barbudor

France
1787 Posts

Posted - 11 avr. 2012 :  22:15:14  Show Profile  Visit barbudor's Homepage  Reply with Quote
##,imei:359*********549,A;
-> answering LOAD to this one should stop it to come further. At least this is how it works for me - check my code
quote:
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;
}


This one should come on its own:
359*********549;
This is a keep-alive messge and will never stop even if you properly answer ON. If you don't answer ON, tracker may switch off the GPRS connection.

imei:359*********549,tracker,1204102304,,F,040451.000,A,3802.4725,N,08431.5581,W,0.06,292.61;
This is normal tracker position message. Check the XLS and my code toknow how to parse.


Also I believe that you have a problem in your receiving code.
The messages that you get should be better formatted.
However this may be a difference with TK103-2 with regards to how my TK-102 behaves.
In that case you may have to parse at character level, not at packet level.


You may not be able to do 100% of configuration through GPRS.
Setting up GPRS (adminip, etc ...) must be done by SMS
Enabling GPRS (switching from SMS mode to GPRS mode) must be done by SMS
Then from GPRS you can start and stop period location messages.
But you can't disable the keep-alive message
You can revert from GPRS mode to SMS mode, but in that case only a SMS can put you back to GPRS mode.


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)
Using: CompeGPS Land 7 | LocusPro | Carminat TomTom Live | Tracker Coban GPS-102 | MoBAC
Used: CartoExp.3D | OziExp.PC | OziExp.CE(iPaq314)| TomTomGoLive950

Edited by - barbudor on 11 avr. 2012 22:19:10
Go to Top of Page

simryc

Poland
4 Posts

Posted - 23 mai 2012 :  22:53:20  Show Profile  Reply with Quote
Hello,

I am new so hello to everyone,

I am making my own system to store data from tracker. I have coban tk103-2. I have problem with scripting server. I need deamon which would listen on a port and collect data (mysql?) from tracker. Does anyone try to write such a simple scrip in perl?

I try portlistener.pl from http://code.google.com/p/web-gpstracker/ but it doesn't support coban 'load' answer.
I try opengts,gpsgate but it is to big for me. I would like to use it to my private motocycles.

Go to Top of Page

barbudor

France
1787 Posts

Posted - 23 mai 2012 :  23:04:33  Show Profile  Visit barbudor's Homepage  Reply with Quote
I have published a C code for Linux that can answer LOAD/ON and push the tracker's message to a HTTP server through a GET or POST request.
http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=144972

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)
Using: CompeGPS Land 7 | LocusPro | Carminat TomTom Live | Tracker Coban GPS-102 | MoBAC
Used: CartoExp.3D | OziExp.PC | OziExp.CE(iPaq314)| TomTomGoLive950
Go to Top of Page

simryc

Poland
4 Posts

Posted - 24 mai 2012 :  22:44:07  Show Profile  Reply with Quote
Thank you for source
I have problem with compiling this
Maybe someone have write it in perl,php or some how simpler in c++ ?
Go to Top of Page

robertrevolver

Mexico
11 Posts

Posted - 23 juin 2012 :  19:30:58  Show Profile  Reply with Quote
I compiled the barbudor´s code with gcc/g++ compiler, if you need some help, drop me a msg.

Developer, gps , nmea, Linux, .NET

Edited by - barbudor on 23 juin 2012 19:37:16
Go to Top of Page

tonygil

Brazil
54 Posts

Posted - 16 oct. 2012 :  16:20:52  Show Profile  Reply with Quote
quote:
Originally posted by mykol

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?



@mykol the tracker expects responses from server on 2 occasions: when it logs on (##,imei:...) and when it send sends heartbeat data.

when it logs on, you must answer LOAD and when it sends heartbeat, you must answer ON.

try that. if you still cant find the problem, you might want to testrun it on my platform and i will tell you if that was the problemo.
Go to Top of Page

sousabarros@hotmail.com

Brazil
1 Posts

Posted - 13 déc. 2012 :  19:11:22  Show Profile  Reply with Quote
Tonygirl, where can I find your platform? I woul like to test it. I got the same problem while listening by a java socket server. Do you have a code sample in java with that protocol?

quote:
Originally posted by tonygil

quote:
Originally posted by mykol

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?



@mykol the tracker expects responses from server on 2 occasions: when it logs on (##,imei:...) and when it send sends heartbeat data.

when it logs on, you must answer LOAD and when it sends heartbeat, you must answer ON.

try that. if you still cant find the problem, you might want to testrun it on my platform and i will tell you if that was the problemo.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply/Répondre
 Printer Friendly
Jump To:
GpsPasSion Forums © 2002-2015_GpsPasSion/Manzanite Go To Top Of Page
This page was generated in 1,09 seconds. Powered By: Snitz Forums 2000 Version 3.4.05