Xexun Implement SOS Alarms

Tiago Marques6 years ago

Hi,

Is it possible to implement SOS alarms for the xexun protocol?
Here is a sample of a decoded SOS event message (imei and msisdn edited):

190326011801,+351911212121,GPRMC,011801.000,A,3843.8760,N,00919.8215,W,0.00,36.62,260319,,,A*41,F,help me, imei:868728033123456,08,119.0,L:3.69V,0,147,35280,268,06,2044,1705

Notice the "help me" string! only occurs when the sos button is pressed, how can I make use of this field?

I tried creating a Notification of type Alarm with SOS Alarm in it but it does not work!

Thanks in advance for all your help!

Keep up the awesome work!

Anton Tananaev6 years ago

You need to enable extended version of the protocol using xexun.extended to true.

Tiago Marques6 years ago

Also tried using the "Computed Attributes" but probably did something wrong, as I couldn't get anything of that to work.
Read the documentation and searched this forum already but haven't found any solution!
Could you guys help me out please?

Tiago Marques6 years ago

Hi Anton,
Thanks for your reply.
The extension is already activated.

<entry key='xexun.port'>5006</entry>
<entry key='xexun.extended'>true</entry>
Anton Tananaev6 years ago

It means it's not supported at the moment.

Tiago Marques6 years ago

I'll live with that for the time being.
Thanks again for your help!

Tiago Marques6 years ago

After looking into this again (and sleeping a bit in between) I found out what may be the cause of this problem in this method here:
https://github.com/traccar/traccar/blob/61d4c1f15b645aa06c84905933108437e1ade92a/src/org/traccar/protocol/XexunProtocolDecoder.java#L68-L94

In the case sentence, it tries to match "help me!" but according to the protocol manual and my personal experience with a original xexun, it should be only "help me".

According to what I found out "help me!" string is actually an sms command to acknowledge the SOS on some coban tk103b clone devices (witch will send an help message recurringly until it is acknowledged).

Anton Tananaev6 years ago

Those values are taken from real devices, but feel free to send a pull request if you want to add another case to the switch.

Tiago Marques6 years ago

Hi,

So I was 90% sure about what I said previously, but with the Chinese stuff it is hard to be 100% sure on what is "genuine" or not!
And because you said that the values coded in the xexundecoder were taken from real devices, I became suspicious, so I took a step back and tried to confirm if it was really a xexun device.

I ran the IMEI on the TK103-2 I talked earlier trough imei.info website and it stated it as being a simcom (model: SIM800A) which according to the internet is a xexun device.

But because I had another xexun device arriving (XT107) I waited a couple days, for it to arrive, so that I could test it too.

So here is the message from the Xexun XT107:

190329194243,,GPRMC,194243.000,A,3843.8764,N,00919.8349,W,000.0,244.4,290319,,,A*75,F,help me, imei:861508031031212,08,123.5,F:3.99V,0,135,28323,268,06,2044,1705

( last 4 digits of IMEI where edited 1212)

Running the imei at imei.info also reported a simcom device (model: SIM900A).

So I guess there is really an typo in that xexun decoder code.
I'll give it my best at trying to submit a pull request on github (never done so before!)

Tiago Marques6 years ago

Hi,
Sorry for the long wait, I've made the pull request, here:
https://github.com/traccar/traccar/pull/4270

I was trying to compare the xexun protocol to the "gps103", ignition doesn't seem to work also, and there are some missing features like the intrusion alarm, etc.

Regards
Tiago

Tiago Marques6 years ago

correct pull request url is: https://github.com/traccar/traccar/pull/4271

as I was saying there seem to be a lot of functionalities in the gps103 protocol that the xexun supports too (as in the poweon/off messages, fences, etc), when I have some spare time I'll try to find out more about it.