Magnetic door sensor - Queclink GV200 - gl200

MH7 years ago

Magnetic door sensor is connected to the gps device and I was advised to check for "Digital Input 2" to get its reading.
In the ATTRIBUTES i can see "input" and "output" but cannot find DigitalInput2.

Link to device protocol document: http://www.voxtrail.com/assets/company/Queclink/protocol/QuecLinkGV200protocol.pdf

Please advice. Thanks.

ID  	PROTOCOL  	DEVICEID  	LATITUDE  	LONGITUDE  	FIXTIME  	DEVICETIME  	SERVERTIME  	SPEED  	ATTRIBUTES  
32132	gl200	492	0	0	25569	43403.9574	43404.29047	0	{"ignition":false,"motion":false,"rssi":10,"battery":3.71,"charge":false,"adc1":"0","input":"02","output":"00","index":11910,"type":"INF","distance":0.0,"totalDistance":0.0}
155419	gl200	2726	0	0	25569	43399.30113	43404.29148	0	{"ignition":false,"motion":false,"rssi":30,"battery":4.01,"charge":false,"adc1":"0","input":"00","output":"00","index":13033,"type":"INF","distance":0.0,"totalDistance":0.0}
263359	gl200	3900	0	0	25569	43399.97995	43404.29229	0	{"ignition":false,"motion":false,"rssi":31,"battery":3.87,"charge":false,"adc1":"0","input":"00","output":"00","index":19193,"type":"INF","distance":0.0,"totalDistance":0.0}
2793316	gl200	4810	28.444002	46.037236	43404.3611	43404.36317	43404.36318	0	{"ignition":false,"motion":false,"rssi":29,"battery":4.11,"charge":false,"adc1":"0","input":"08","output":"00","index":51841,"type":"INF","distance":0.0,"totalDistance":813.52}
3249562	gl200	6711	25.014114	37.270808	43404.39956	43404.40387	43404.4039	0	{"ignition":true,"motion":true,"rssi":31,"battery":4.15,"charge":false,"adc1":"0","input":"03","output":"00","index":42513,"type":"INF","distance":0.0,"totalDistance":4884052.21}
3249564	gl200	962	28.280378	45.955136	43404.39948	43404.40389	43404.4039	0	{"ignition":false,"motion":false,"rssi":31,"battery":4.16,"charge":false,"adc1":"0","input":"08","output":"00","index":60291,"type":"INF","distance":0.0,"totalDistance":5816280.83}
3249573	gl200	5291	28.408917	36.537646	43404.36492	43404.40389	43404.4039	0	{"ignition":false,"motion":false,"rssi":31,"battery":4.18,"charge":false,"adc1":"0","input":"00","output":"00","index":7836,"type":"INF","distance":0.0,"totalDistance":5040618.6}
3249711	gl200	4514	28.442414	46.033092	43404.40006	43404.4039	43404.40391	0	{"ignition":false,"motion":false,"rssi":27,"battery":4.12,"charge":false,"adc1":"0","input":"00","output":"00","index":796,"type":"INF","distance":0.0,"totalDistance":7431.16}
3249782	gl200	3392	26.454086	50.03382	43404.39955	43404.40385	43404.40391	0	{"ignition":true,"motion":true,"rssi":31,"battery":4.1,"charge":false,"adc1":"0","input":"09","output":"00","index":25859,"type":"INF","distance":0.0,"totalDistance":6110877.24}
3249788	gl200	1127	17.566045	44.218007	43402.13896	43402.14131	43404.40392	12.5809981	{"ignition":true,"motion":true,"rssi":29,"battery":4.19,"charge":true,"adc1":"0","input":"03","output":"00","index":2964,"type":"INF","distance":0.0,"totalDistance":5223345.15}
3249792	gl200	2997	24.087775	38.090801	43404.40363	43404.4039	43404.40392	11.0691185	{"ignition":true,"motion":true,"rssi":28,"battery":4.07,"charge":false,"adc1":"0","input":"01","output":"00","index":49664,"type":"INF","distance":0.0,"totalDistance":8093.76}
Anton Tananaev7 years ago

Input is a bit-mask and should include your digital input bit.

MH7 years ago

Thanks for your reply. I need some more clarification as per below please.

As per the protocol document, a message will be sent to the back end server when there
is a logical change on one of the Digital Inputs by +RESP:GTDIS. (Page No's. 32 & 104).

Example for GTDIS.

+RESP:GTDIS,040100,135790246811220,,,20,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,2000.0,20090214093254,11F0$

Description of +RESP:GTDIS message is below (pg.105 & 106):

+RESP:GTDIS,
040100,				//Protocol Version
135790246811220,	//Unique ID IMEi
,					//device name
,					//reserved
20,				//report id/report type
1,					//number
1,					//gps accuracy
4.3,                //speed
92,                 //azimuth
70.0,               //altitude
121.354335,         //longitude
31.222073,          //latitude
20090214013254,     //utc
0460,               //mcc
0000,               //mnc
18d8,               //lac
6141,               //cellid
00,                 //reserved
2000.0,             //mileage
20090214093254,	//sendtime
11F0                //countnumber
$                   //tail character

I am receiving the following message on traccar when type is GTDIS ("type":"DIS").
It does not show up anything about the Report Id/Report Type.

{"hdop":1,"odometer":2626700.0,"batteryLevel":0,"type":"DIS","distance":0.0,"totalDistance":5252.57,"motion":false}
{"hdop":1,"odometer":2489900.0,"batteryLevel":0,"type":"DIS","distance":0.2,"totalDistance":12513.7,"motion":false}
{"hdop":1,"odometer":3795300.0,"batteryLevel":0,"type":"DIS","distance":0.0,"totalDistance":19497.74,"motion":true}
{"hdop":1,"odometer":4477400.0,"batteryLevel":0,"type":"DIS","distance":0.0,"totalDistance":24328.07,"motion":false}
{"hdop":1,"odometer":6250800.0,"batteryLevel":0,"type":"DIS","distance":1.32,"totalDistance":5028438.62,"motion":true}
{"hdop":1,"odometer":7824700.0,"batteryLevel":0,"type":"DIS","distance":562.37,"totalDistance":5020608.16,"motion":true}
{"hdop":1,"odometer":6051600.0,"batteryLevel":0,"type":"DIS","distance":9016.99,"totalDistance":53921.55,"motion":true}
Anton Tananaev7 years ago

We don't store report id or report type.

MH7 years ago

Does this mean that I will have to change the code in order to get Report Id and Type. Or not possible at all.

MH7 years ago

I found related code in a method at line no 962 Gl200TextProtocolDecoder.java.

Method :
private Object decodeOther(Channel channel, SocketAddress remoteAddress, String sentence, String type) {

Line no's. 974 & 975

            position.set(Position.PREFIX_IN + reportType / 0x10, reportType % 0x10 == 1);

If the type is DIS there is some extraction of reportType; but this isn't showing up in the attributes? or these lines not working.

Thanks.

Anton Tananaev7 years ago

The reportType contains both.

MH7 years ago

This reportType is not showing up in attributes for DIS type of messages. What to do for this plz.

Anton Tananaev7 years ago

As I already said, it's not stored in attributes. I'm not sure why we are going in circles with this conversation. If you want to store, you need to change the code.