Click here to Skip to main content
15,922,315 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
We have developing Vehicle Tracking System.Am Very new to Windows Forms.
We have Used GPRS Device In server.It will provide Following Input Format:
An example of typical auto report message,

24 70 80 53 01 77 00 50 24 06 01 80 22 32 96 92 00 11 35 52 42 3C 00 00 00 FF DF FB FF
00 00 00 (in Hex, but should be decoded in binary as above)

Note:
‘$’(0x24): Head, standard auto-report message;
Time:0x050316,International standard time 05:03:16;
Date:0x220902, 22/09/2002
Longitude value: 0x22128745, 22°12.8745′
Latitude Value: 0x113466574C,113°46.6574′. Its last byte(0x15) express
bit7654,the last bit of latitude value
Roadsay Technology Limited Communication Protocol for RS AVL
- 12 -

bit3, 1: East Longitude, 0:West Longitude
bit2, 1: North latitude, 0:South latitude
bit1, 1:A valid GPS data,0:V invalid GPS data
bit0,/

================================================================
My doubt Is
===========
Is dis HexaDecimal Format?If Yes Means It cannot converted to Ascii Format.
Which means Valid Ascii Out is not converted Here.
Expected Conversion Is Shown Below
=======================
example1:*RS,1234567890,C2,112233,1,0,13808833059#


May i know how to convert from This
24 70 80 53 01 77 00 50 24 06 01 80 22 32 96 92 00 11 35 52 42 3C 00 00 00 FF DF FB FF
00 00 00 To RS,1234567890,C2,112233,1,0,13808833059#...

Thx and Regards
Prabu


[edit submitter="Prabu"]
Am very New to Win Forms..May i know How to convert the Valid Output.Pls Give me Valid Output.

3.1.3 Fomat of GPRS auto report message (TCP/UDP)
Standard mode code:
No. 00 01 02 03 04 05 06 07 08 09 0A 0B
Content $ 0x1030731001 0x050316 0x220902
Notes Head Terminal serial code time date
No. 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18
Content 0x22128745 0x03 0x113466574C 0x014028
Notes Latitude value / Longitude value,N,E,AV Speed,direciton
No. 19 1A 1B 1C 1D 1E 1F
Content 0xFFFFFBFF 0x15 0x25 0x79
Notes VehStatus Usr_alarm_flag /
Record
No
An example of typical auto report message,
24 70 80 53 01 77 00 50 24 06 01 80 22 32 96 92 00 11 35 52 42 3C 00 00 00 FF DF FB FF
00 00 00 (in Hex, but should be decoded in binary as above)
Note:
‘$’(0x24): Head, standard auto-report message;
Time:0x050316,International standard time 05:03:16;
Date:0x220902, 22/09/2002
Longitude value: 0x22128745, 22°12.8745′
Latitude Value: 0x113466574C,113°46.6574′. Its last byte(0x15) express
bit7654,the last bit of latitude value
Roadsay Technology Limited Communication Protocol for RS AVL
- 12 -
bit3, 1: East Longitude, 0:West Longitude
bit2, 1: North latitude, 0:South latitude
bit1, 1:A valid GPS data,0:V invalid GPS data
bit0,/
Speed, direction: 0x014028, speed is 014 knot,direction is 028.
VehStatus: mark the vechile state in Binary.
Usr_alarm_flag: customizable alarm status.
Record No.: Record No. increases one per sms sent in Binary.
2100 Serial added milemeter function:
Mileage: mileage BCD code:D11D10D9D8D7D6D5D4D3D2.D1D0,but
D11D10D9D8D7D6D5D4 bits is valid. 0x10 saves D11D10, 0x1E and 0x1F save
D9D8D7D6,and 0x1D saves D5D4.In case user customizable alarm happens,0x1D saves
customization alarm status, or it will save D5D4. Mileage equals
D11D10D9D8D7D6D5D4*51.444(meter), Example: 03257915*51.444(meter)=
167600.18Km.
 When head is ‘M’or ‘P’, then ‘M’ packet is picture index and ‘P’ packet is picture
data.To ‘M’ packet,the lower bits in 0x10 byte express picture format and the higher
bits in 0x10 byte express picture module number, the content of 0x1E and 0x1F is
‘0xFF’ . To ‘P’ packet, the content of 0x1E byte and 0x1F byte is picture number and
block number. The ‘P’ packet data includes 32 bytes picture index and a block’s
data(512 bytes),totally 544bytes.
 When head is ‘L’, the packet data is driver’s logon data by ’C9’. then the content of
0x16~0x17 arenot speed and direction,but BCD code to express driver’s ID.
 When head is ‘R’, the packet data is driving record from flash memory by ‘C13’,’C21’.
 When head is ‘D’, the packet data is 512 bytes to record total 21 seconds data.The firt
second’s data is the same as ‘$’ packet(32 bytes), the later 20 seconds’ data is
480bytes(every second’s data is 24 bytes as 0x06-0x1Dbyte in the ‘$’ packe data. Refer
to ‘Set accident doubt data record (C12)’.
[/edit]
Posted
Updated 4-Mar-12 21:46pm
v3

1 solution

It is not possible to be certain but I am assuming that you are looking at this data in a debugger or similar program, which is why it is shown in hexadecimal. However, I am somewhat confused, since this is your system, as to why you do not understand the format of the data that it produces.
 
Share this answer
 
Comments
prabut 5-Mar-12 1:02am    
Am very New to Win Forms..May i know How to convert the Valid Output.Pls Give me Valid Output.

3.1.3 Fomat of GPRS auto report message (TCP/UDP)
Standard mode code:
No. 00 01 02 03 04 05 06 07 08 09 0A 0B
Content $ 0x1030731001 0x050316 0x220902
Notes Head Terminal serial code time date
No. 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18
Content 0x22128745 0x03 0x113466574C 0x014028
Notes Latitude value / Longitude value,N,E,AV Speed,direciton
No. 19 1A 1B 1C 1D 1E 1F
Content 0xFFFFFBFF 0x15 0x25 0x79
Notes VehStatus Usr_alarm_flag /
Record
No
An example of typical auto report message,
24 70 80 53 01 77 00 50 24 06 01 80 22 32 96 92 00 11 35 52 42 3C 00 00 00 FF DF FB FF
00 00 00 (in Hex, but should be decoded in binary as above)
Note:
‘$’(0x24): Head, standard auto-report message;
Time:0x050316,International standard time 05:03:16;
Date:0x220902, 22/09/2002
Longitude value: 0x22128745, 22°12.8745′
Latitude Value: 0x113466574C,113°46.6574′. Its last byte(0x15) express
bit7654,the last bit of latitude value
Roadsay Technology Limited Communication Protocol for RS AVL
- 12 -
bit3, 1: East Longitude, 0:West Longitude
bit2, 1: North latitude, 0:South latitude
bit1, 1:A valid GPS data,0:V invalid GPS data
bit0,/
Speed, direction: 0x014028, speed is 014 knot,direction is 028.
VehStatus: mark the vechile state in Binary.
Usr_alarm_flag: customizable alarm status.
Record No.: Record No. increases one per sms sent in Binary.
2100 Serial added milemeter function:
Mileage: mileage BCD code:D11D10D9D8D7D6D5D4D3D2.D1D0,but
D11D10D9D8D7D6D5D4 bits is valid. 0x10 saves D11D10, 0x1E and 0x1F save
D9D8D7D6,and 0x1D saves D5D4.In case user customizable alarm happens,0x1D saves
customization alarm status, or it will save D5D4. Mileage equals
D11D10D9D8D7D6D5D4*51.444(meter), Example: 03257915*51.444(meter)=
167600.18Km.
 When head is ‘M’or ‘P’, then ‘M’ packet is picture index and ‘P’ packet is picture
data.To ‘M’ packet,the lower bits in 0x10 byte express picture format and the higher
bits in 0x10 byte express picture module number, the content of 0x1E and 0x1F is
‘0xFF’ . To ‘P’ packet, the content of 0x1E byte and 0x1F byte is picture number and
block number. The ‘P’ packet data includes 32 bytes picture index and a block’s
data(512 bytes),totally 544bytes.
 When head is ‘L’, the packet data is driver’s logon data by ’C9’. then the content of
0x16~0x17 arenot speed and direction,but BCD code to express driver’s ID.
 When head is ‘R’, the packet data is driving record from flash memory by ‘C13’,’C21’.
 When head is ‘D’, the packet data is 512 bytes to record total 21 seconds data.The firt
second’s data is the same as ‘$’ packet(32 bytes), the later 20 seconds’ data is
480bytes(every second’s data is 24 bytes as 0x06-0x1Dbyte in the ‘$’ packe data. Refer
to ‘Set accident doubt data record (C12)’.
Richard MacCutchan 5-Mar-12 3:49am    
I have no idea what you mean by "valid output". You (apparently) have the documentation that explains what each message type is and how to decode its contents so what is your difficulty?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900