attributes - alarms - Identifcation

jaimzj8 years ago

Dear Anton,

In many cases the alarm value is 'true', however there is no way to identify what alarm it is.

Any help on this would be appreciated, currently two protocols commonly used is gps103, and gt06 by me.

Anton Tananaev8 years ago

GPS103 protocol decodes alarm type, so it should be available in attributes. GT06 protocol doesn't include any alarm type info as far as I know.

jaimzj8 years ago

Not sure if this will help, but

protocol

Page 18 onwards says, 5.3.1.14 (Alarm type is available).

Anton Tananaev8 years ago

I have added status flag to attributes for GT06 protocol. Here is a new build:

https://www.dropbox.com/s/cgmlansv32j3ii0/tracker-server.jar?dl=0

jaimzj8 years ago

Thanks a lot, Will try, its 3.3 version right.

Anton Tananaev8 years ago

Yes, you need to install it on top of version 3.3.

jaimzj8 years ago

Testing it now, Will update you on the outcome.

jaimzj8 years ago

Okay here is the status Anton, I was able to simulate certain scenarios with actual devices.

I got the below values in Status.

For SOS - Status: 36
For Cut off - Status: 16

I am sure the others will work too, just a matter of testing, and identifying the status number to the alarm. any suggestion on how I can identify the number to the alarm type? as the document has bit values in it.

Anton Tananaev8 years ago

You need to apply bit-mask to get alarm type.

jaimzj8 years ago

Thanks a lot Anton, Hope for Gt06 protocol This status in attribute will be available in the future release.
Thanks once again.

Anton Tananaev8 years ago

Yes, this modification will be included in the next official release.

jaimzj8 years ago

Dear Anton,

I have one query and one information below, When statu's messages are updated without GPS (the last co-ordinates are populated) In such case address / reverse geo-coding is not done, I believe it would be great idea to insert last address also in status messages.? Use Case: Applications where users rely on last PositionID's Address value.

Query.

You mentioned using bitmask to identify Alarm type, I am not sure how to do that (I am using php), and In no way I am able to convert the documentations message samples. any help will be appreciated.

Anton Tananaev8 years ago

If the location is marked as "valid", it should get address for it. Even if it's a status message with old location info.

As for bitmask, I don't know much about PHP, but there must be a way to apply mask (bitwise AND operation) on a value.

jaimzj8 years ago

I think, I will be able to do that part of applying masks bitwise etc on a value.

I would need a little help on identifying or co-releating status Number to a specific alarm type? if possible an easy way to co-relate.

Anton Tananaev8 years ago

In Java I would do something like this:

int alarm = (status >> 3) & 0x07;

Result values for alarm variable:

0 - normal (I guess it means no alarm)
1 - shock alarm
2 - power cut alarm
3 - low battery alarm
4 - SOS