You are on page 1of 5

Protocol Documentation: The device tries to establish a TCP connection to the one of the registered IP addresses.

When a connection is established, device sends following command to the server: +USR [User Name],[Password],[Device ID],,BIN (CR)(L ) !"am#le: $%&R lfg,lfg'(,))*'+,,,IThe server sho.ld send /01cr21lf2 res#onse to the device. When the res#onse is received b3 the device, the bl.e 4T& led will be t.rned on. Periodic #osition message: 5evice sends following #osition message to server. (6ll n.mbers are b3te). 6 message #ac7et ma3 contain .# to 8 messages. &erver sho.ld send /01cr21lf2 res#onse to the device. 0x89 0xAB <package length 0xB! <da" <month <"ear <ho#r <min#te <second <stat#s <speed <direction! <direction$ <lat! <lat$ <lat% <lat& <lon! <lon$ <lon% <lon& <no' () satellites <temp! <temp$ ''' <da" <month <"ear * Package length: Length in b3tes of the whole data #ac7age. -.mber of messages in the #ac7age will be calc.lated .sing following form.la: +o#nt,-packagelength.&/0$! Day, Month, Year: 5ate from 9P&. !"am#le: or :th ;a3 )'+*, 5a3:'"':, ;onth:'"'(, <ear: '"'d our, Minute, Secon!: Time from 9P&. !"am#le: or: +::*=:8(, >o.r:'"+', ;in.te:'")?, &econd:'")d Statu": 1bit '2: 1bit +2: 1bit )2: 1bit *2: 1bit (2: +@2vehicle sto##ed +@2vehicle started moving +@29P& Lost +@2&#eed violation '@2There is no ignition switch information +@2 Ignition switch information e"ists 1bit 82: +@2 switch on, '@2 switch off

S#ee!: &#eed of vehicle in 7mAh. Direction: +:bit .nsigned integer. val.eB direction+ $ direction)11C ('@*(=)

$at: $on:

val.eBlat+ D lat)11C D lat*11+: D lat811)8 (*)bit integer) LatBval.eA+''''''' (float) val.eBlon+ D lon)11C D lon*11+: D lon811)8 (*)bit integer) LonBval.eA+''''''' (float)

No% &' Satellite": -.mber of 9P& satellites. (em#: Tem#erat.re, if a tem#erat.re sensor e"ists. /therwise alwa3s '. Tem#B((tem#+ E '"?f)11C D tem#))A+' If bit ? of tem#+ is + Tem#B@Tem# 0!!P 6LI4!: &erver sho.ld send 1PP<cr <l) command to the device #eriodicall3. If the device co.ld not receive the command in )' min.tes, server connection will be re@established. 6fter receiving the command, the device will send following res#onse. 0x89 0xa2 0x0& 0x03 C/;;6-5 LI&T: 6cce#ted commands from server are following. 6ll commands sho.ld be ended with CR L ('"'5 '"'6). Re#l3 format details: '"C= '"6, 1length2 1res#onse code2 1#arameters...2 $CI [gsm number] &;& reF.est. 5evice will send an &;& to s#ecified 9&; n.mber. $GP 9P& &tat.s reF.est. 5evice will re#l3 it as follows: '"C= '"ab '"'c '"a( 19P& i"2 G,3te, ' is not fi"ed, non Hero fi"ed 1-o of satellites2 G,3te, n.mber of 9P& &atellites 1;in. -o of sat.2 G,3te, minim.m n.mber of 9P& satellites from config.ration 19P& da32 G,3te 19P& month2 G,3te 19P& 3ear2 G,3te, 3earB19P& 3ear2$)''' 19P& >o.r2 G,3te 19P& ;in.te2 G,3te $PS ReF.est latest 9P& #osition.

$II Information reF.est. 5evice will send device information as follows: '"C= '"6, '"*? '"6: 15evice I5 Low ,3te2 15evice I5 >igh ,3te2 G5eviceidB>ighI)(:$Low 19PR& version2 G+' b3tes string 19R& version2 G+' b3tes string 1serial2 G+' b3tes string 1board t3#e2 G+' b3tes string 1;a".&#eed Low2 1;a".&#eed >igh2 G;a".&#eedB>ighI)(:$Low 1;otion.Intv.Low21;ot.Intv.>igh2 G;otionIntervalB>ighI)(:$Low 1&till.Intv.Low21&t.Intv.>igh2 G&tillIntervalB>ighI)(:$Low 1;a".&#eed 5.r.Low21;a".&#eed 5.r.>igh2 G;a".&#eed 5.rationB>ighI)(:$Low '"'' $I2 Connection information reF.est. 5evice will send the information as follows: '"C= '"6, 1length2 '"6= 16ctive 6P-2 GJero terminated string 19PR& %ser -ame2 GJero terminated &tring 19PR& Password2 GJero terminated string 1&I; Card Pin2 GJero terminated string 1>ost 6ddress +2 GJero terminated string 1>ost Port +2 GJero terminated string 1>ost 6ddress )2 GJero terminated string 1>ost Port )2 GJero terminated string 1>ost 6ddress *2 GJero terminated string 1>ost Port *2 GJero terminated string 1Login .ser name2 GJero terminated string 1Login #assword2 GJero terminated string 1C.stomer code2 GJero terminated string 1In#.t mode +2 Gb3te 1In#.t mode )2 Gb3te 1In#.t mode *2 Gb3te $RS Restart reF.est. $SF Clear log memor3.

$SGSM [operator code],[APN],[user name],[password],[msg Center] &et 6P-, .ser name, #assword and message center of o#erator. If the o#erator code e"ists, it will be modified, if not, o#erator code will be added. 5evice will send a stat.s code as follows: '"C= '"ab '"'( '"ac 1stat.s code2 !"am#le: K&9&; )C:'+,internet,g#rs,g#rs,$='(*)='+''''

$SGSM [operator code],!"#"$",,, 5elete s#ecified o#erator code from config.ration. 5evice will send a stat.s code as follows: '"C= '"ab '"'( '"ac 1stat.s code2 !"am#le: K&9&; )C:'+,5!L!T!,,, $SPS% [user name],[password],[customer code] &et .ser name, #assword and c.stomer code for 4T& server connection. !"am#le: K&P&W lfg,lfg'(, $SSR[ser&er no] ['ost address ()R# or IP*],[port] &et 4T& &erver address. !"am#le: K&&R+ ats+.7arsoft.com,::?? $IM+! [,nput no],[mode] &et in#.t mode for s#ecified in#.t #ort. ' means nothing connected to #ort. ;odes are: ': -one +: Ignition switch t3#e + ): Ignition switch t3#e ) !"am#le: Ignition switch is connected to in#.t #ort + KI;/5 +,) $SR# [output port][&a-ue (./0*] &et o.t#.t val.e of device (digital). This val.e will be stored in flash memor3 and set again in case of restarting device. 5evice will send following res#onse. '"C= '"ab '"'a '"ab /%T+ /%T) '"') '"') '"') '"') !"am#le: K&RL ++ $CGP [no o1 m,n sat ] &et minim.m n.mber of 9P& satellites. !"am#le: KC9P 8

$CNA [..002222334455] Change device settings. 004 !!4 $$4 %%4 &&4 994 ::4 Device ID 5ow Device ID 6igh 7oving Period 5ow 7oving Period 6igh 8tationar" Period 5ow 8tationar" Period 6igh 7axim#m 8peed

I) the val#es are ;;< the" will 2e sta" #nchanged' !"am#le: /nl3 set ma"im.m s#eed to =' 7mAh. 1+NA ;;;;;;;;;;;;9A

You might also like