Input is a bit-mask and should include your digital input bit.
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}
We don't store report id or report type.
Does this mean that I will have to change the code in order to get Report Id and Type. Or not possible at all.
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) {
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.
The reportType
contains both.
This reportType is not showing up in attributes for DIS type of messages. What to do for this plz.
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.
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.