Vous êtes sur la page 1sur 13

SimplifiedcomunicationprotocolofBCEgenericdevices

SockettypeTCP(Firststring#BCE#/r/n)orUDP
DeviceSendStack(Historyfromflash)
FROMMDLtoSRV
IMEI[64bits]
8bytes

LEN[16bits]
2bytes

ServiceID[8bits]
1byte
0xA5

Device
number

Countofbytes
AsyncStack
withoutIMEI,LENand
CS

ConfirmationKeyA[8bits]
1byte

DaraBytes
Nbytes

CS[8bits]
1byte

EachtryofsendingStack
Keyisincremented

Datastructures

Sumofallpacket
bytesexceptCS

examplepacket(afb7ac79f03f01000900a58106d67a765100f0f7)

IMEI(351777042773935)

LEN(9bytes) Data(AsynsStack)

CS

afb7ac79f03f0100

0900

f7

a58106d67a765100f0

Service

Key

Datastruct

a5

81

06d67a765100f0

Sumof
allpacket
bytes
except
CS

FROMSRVtoMDL
IMEI[64bits]
8bytes

LEN[16bits]
2bytes

ServiceID[8bits]
1byte
0x19

Device
number

Countofbytes
StackConfirm
withoutIMEI,LENand
CS

ConfirmationKeyB[8bits]
1byte

CS[8bits]
1byte

ConfirmationKeyB=
ConfirmationKeyA&0x7F

Sumofallpacket
bytesexceptCS

examplepacket(afb7ac79f03f010002001901d7)

IMEI(351777042773935)

LEN(2bytes)

Data(StackConfirm)

CS

afb7ac79f03f0100

0200

1901

d7

Service

Key

19

01

Sumof
allpacket
bytes
except
CS

TimeTrigeredPacketWithoutConfirmation

ROMMDLtoSRV
IMEI[64bits]
8bytes

LEN[16bits]
2bytes

ServiceID[8bits]
1byte
0xA0

Device
number

Countofbytes
TimeTrigered
withoutIMEI,LENand Packet
CS

PADbyte[8bits]
1byte

DaraBytes
Nbytes

CS[8bits]
1byte

PADbytealways0.

Datastructures

Sumofallpacket
bytesexceptCS

examplepacket(afb7ac79f03f01000900a08106d67a765100f0f2)
IMEI(351777042773935)

LEN(9bytes) Data(AsynsStack)

CS

afb7ac79f03f0100

0900

f2

a08106d67a765100f0

Service

PAD

Datastruct

a0

00

06d67a765100f0

Sumof
allpacket
bytes
except
CS

Outputcontrol
FROMSRVtoMDL
IMEI[64bits]
8bytes

LEN[16bits]
2bytes

ServiceID[8bits]
1byte
0x41

Device
number

Countofbytes
OutputControl
withoutIMEI,LENand
CS

OutputID[8bits]
1byte

UniqueID[8bits] OutputData
1byte
Nbytes

CS[8bits]
1byte

0x00OUT1
0x01OUT2
0x02OUT3
0x0AVirtual
signalS1
0x0BVirtual
signalS2
0x1EDataover
RS232

UniqueID
Outputdata
generatedy
Structures
servereachtime
sendingoutput
controlservice

Sumofall
packetbytes
exceptCS

FROMMDLtoSRV
IMEI[64bits]
8bytes

LEN[16bits]
2bytes

ServiceID[8bits]
1byte
0xC1

Device
number

Countofbytes
OutputControlAck
withoutIMEI,LENand
CS

OutputID[8bits]
1byte

CS[8bits]
1byte

0x00OUT1
0x01OUT2
0x02OUT3

Sumofallpacket
bytesexceptCS

Examples
RAWDATAPACKET(hex)
B0,8,48,D9,4,41,1,0,23,0,A5,E4,20,A7,B7,E3,54,3,80,48,0,F,7C,AB,41,9B,F8,27,42,0,27,59,E,1,0,0,0,0,80,0,7,10,50,
6C,1,A1
PARSING
B0,8,48,D9,4,41,1,0,(imei)
23,0,(len)
A5,(AsynckStack)
E4,(ConfimrationKey)
20,(len)
A7,B7,E3,54,(Timeandstrucutretype)
3,80,(Mask1)
48,0,(Mask2)
F,7C,AB,41,9B,F8,27,42,0,27,59,E,1,0,0,0,0,(Coord.group1)
80,0,(Digitalinputsstatus)
7,(J1939Fuellevel)
10,50,6C,1,(J1939Totalvehicledistance)
A1(CS)

Output1controlexample(1secondpulsetoground):
B0,8,48,D9,4,41,1,0,
06,00,(len)
41,(Outputcontrolservice)
00,(OUT1)
cc,(UniqueIDnonrepeatable,oneachoutputcotrolnewvaluemaybealwaysincrementing)
01,(FormIdpulsetype)
64,00,(1seclongpulse)
xxCS

Output2controlexample(5secondpulsetoground):
B0,8,48,D9,4,41,1,0,
06,00,(len)
41,(Outputcontrolservice)
01,(OUT1)
cc,(UniqueIDnonrepeatable,oneachoutputcotrolnewvaluemaybealwaysincrementing)

01,(FormIdpulsetype)
F4,01,(5seclongpulse)
xxCS
StaticsignalS1ONcontrolexample:
B0,8,48,D9,4,41,1,0,
05,00,(len)
41,(Outputcontrolservice)
0A,(S1)
cc,(UniqueIDnonrepeatable,oneachoutputcotrolnewvaluemaybealwaysincrementing)
00,(FormIDpadByte)
55,(ON)
xxCS
StaticsignalS1OFFcontrolexample:
B0,8,48,D9,4,41,1,0,
05,00,(len)

41,(Outputcontrolservice)
0A,(S1)
cc,(UniqueIDnonrepeatable,oneachoutputcotrolnewvaluemaybealwaysincrementing)
00,(FormIDpadByte)
00,(OFF)
xxCS

packedarrivedthroughUDPorTCP
"085a629c834601008600a59b41c760ed5c0bc0d39204201909de41f95a5742001c72e400000000008000ed030101010903570b00300000004011
0583040d001200001f0c1a03c605004d690b0000416766ed5c0bc0d39204201909de41f95a5742001b72e400000000008000ee030101010903570
b003000000040110583040d001200001f0c1a03c605004d690b0000a0"
Packetparsing

085a629c83460100(IMEI0x146839c625a08=359006055062024)
8600(packetlen0x86=134bytes)
a5(ServiceFlashStack)
9b(Service0xA5confirmationkey)
###(Startofstructure#1inpacket)
41(structurelen65bytes)
c760ed5c(DT=7Time=0x5ced60c*0x02+0x47798280=0x53172E98=1394028184="GMT:Wed,05Mar201414:03:04GMT")
##(startofparsingdetectedDT=7structureMasks)
0bc0(Mask10xC00B=0b1100000000001011)
d392(Mask2,becasuemostsignificantbitinMask1set,Mask2present0x92d3=1001001011010011)
0420(Mask3,becasuemostsignificantbitinMask2set,Mask3present0x2004=0010000000000100)
##(EndodMask,becausemostsignificantbyteisnotsetinlastmask)
##MASK1BEGIN
(Mask1bit0=1>"Coord.group1"17bytes)
1909de41f95a5742001c72e40000000000
(Mask1bit1=1>"Digitalinputsstatus"2bytes)
8000
(Mask1bit3=1>"ADC2"2bytes)
ed03
(Mask1bit14=1>"GSMInfoGroup"9bytes)

0101010903570b0030
##MASK1END
##MASK2BEGIN
(Mask2bit0=1>"J1939Wheelspeed"2bytes)
0000
(Mask2bit1=1>"J1939Accelerationpedalposition"1bytes)
00
(Mask2bit4=1>"J1939EngineSpeed"2bytes)
4011
(Mask2bit6=1>"J1939Totalvehicledistance"4bytes)
0583040d
(Mask2bit7=1>"1939EngineCoolanttemperature"1bytes)
00
(Mask2bit9=1>"1939J1939Engineload"1bytes)
12
(Mask2bit12=1>"J1939AmbientAirTemperature"2bytes)
0000
##MASK2END
##MASK3BEGIN
(Mask3bit2=1>"J1939Axleweight"3bytes)
1f0c1a
(Mask3bit13=1>"J1708Group1"9bytes)
03c605004d690b0000
##MASK3END
###(Endofstructure#1inpacket)
**
###(Startofstructure#2inpacket)
41(structurelen65bytes)
6766ed5c(DT=7Time=0x5ced666*0x02+0x47798280=0x53172F4C=1394028364="GMT:Wed,05Mar201414:06:04GMT")

0bc0(Mask10xC00B=0b1100000000001011)
d392(Mask2,becasuemostsignificantbitinMask1setMask2present0x92d3=1001001011010011)
0420(Mask3,becasuemostsignificantbitinMask2setMask3present0x2004=0010000000000100)
##(EndodMask,becausemostsignificantbyteisnotsetinlastmask)
##MASK1BEGIN
(Mask1bit0=1>"Coord.group1"17bytes)
1909de41f95a5742001b72e40000000000
(Mask1bit1=1>"Digitalinputsstatus"2bytes)
8000
(Mask1bit3=1>"ADC2"2bytes)
ee03
(Mask1bit14=1>"GSMInfoGroup"9bytes)
0101010903570b0030
##MASK1END
##MASK2BEGIN
(Mask2bit0=1>"J1939Wheelspeed"2bytes)
0000
(Mask2bit1=1>"J1939Accelerationpedalposition"1bytes)
00
(Mask2bit4=1>"J1939EngineSpeed"2bytes)
4011
(Mask2bit6=1>"J1939Totalvehicledistance"4bytes)
0583040d
(Mask2bit7=1>"1939EngineCoolanttemperature"1bytes)
00
(Mask2bit9=1>"1939J1939Engineload"1bytes)
12
(Mask2bit12=1>"J1939AmbientAirTemperature"2bytes)
0000
##MASK2END

##MASK3BEGIN
(Mask3bit2=1>"J1939Axleweight"3bytes)
1f0c1a
(Mask3bit13=1>"J1708Group1"9bytes)
03c605004d690b0000
##MASK3END
###(Endofstructure#2inpacket)
**
(CS)
a0

Vous aimerez peut-être aussi