Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement more commands for the watch protocol (Techkoo) #2702

Closed
amenk opened this issue Dec 18, 2016 · 30 comments
Closed

Implement more commands for the watch protocol (Techkoo) #2702

amenk opened this issue Dec 18, 2016 · 30 comments

Comments

@amenk
Copy link
Contributor

amenk commented Dec 18, 2016

What I did: Connected with telnet to the control server

telnet 52.28.132.157 8001

Then I "authenticated" as a watch using the debug output from traccar.

Now I can send commands using the SeTracker android app.

Replace $ID$ with the ID.

Upload Interval in seconds 60 min

[3G*$ID$*000b*UPLOAD,3600]

1 min
[3G*$ID$0009UPLOAD,60]

SOS Number 1, 2, 3

[3G*$ID$*001e*SOS,$NUMBER1$,$NUMBER2$,$NUMBER3$]

Phone Book (00710071 seems to be an encoded name)
[3G*$ID$*0053*PHB,1111111,0066007200690065006e00640031,2222222,0066007200690065006e00640032,,,,,,]

 1111111,0066007200690065006e00640031   # number1 = 111111  name2 = "friend1" (simply hex encoded string)
 2222222,0066007200690065006e00640032 # number2 = 2222222   name2 = $fiend2)

up to 10 friends from the app, but sends only 10 - probably it is waiting some kind of "okay"

 [3G*$ID$*006b*PHB,111111,0066007200690065006e00640031,2222222,00660032,333333,00660033,44444444,00660034,5555555,00660035]

Let the watch ring

[3G*$ID$*0004*FIND]

Set timezone: (GMT +1)

[3G*$ID$*0007*LZ,0,+1]

Plus GMT+8:30 summer time

[3G*$ID$0009LZ,0,+9.5]

Language + Timezone (5 = German)

[3G*$ID$*0009*LZ,5,+11.5]

Seems to use 0007 for full-hour offset and 0009 for .5

Set silence time

[3G*$ID$*002f*SILENCETIME,00:02-06:22,22:00-23:00,18:00-19:02]

Power off

[3G*$ID$*0008*POWEROFF]

Monitor call back

[3G*$ID$*0016*MONITOR,$NUMBER$]

Save-zone does not send anything to the app (but traccar can do the same)

Set Hearts

[3G*$ID$*0008*FLOWER,2]
@amenk
Copy link
Contributor Author

amenk commented Dec 18, 2016

I was able to set the timezone via traccar :-) awesome stuff

@amenk
Copy link
Contributor Author

amenk commented Dec 18, 2016

Really interesting would be of course to be able to send and receive voice messages as well :-)

@tananaev
Copy link
Member

You don't need to reverse engineer it. There is official documentation available.

@amenk
Copy link
Contributor Author

amenk commented Dec 18, 2016

Where?

@tananaev
Copy link
Member

You can find the link on the documentation page on the website:

https://www.traccar.org/protocols/

@amenk
Copy link
Contributor Author

amenk commented Dec 19, 2016

Thank you - but my findings are slightly different (SOS Number, additionally the ability to set the time zone).
How can this be implemented? I do not think we need a different "watch2" protocol handler, right? Just adding the commands?

@tananaev
Copy link
Member

If you want to add new command, just add them to existing protocol encoder.

@amenk
Copy link
Contributor Author

amenk commented Dec 19, 2016 via email

@tananaev
Copy link
Member

What do you mean by customizable? It's possible to do anything in the source code.

@amenk
Copy link
Contributor Author

amenk commented Dec 19, 2016

:-D

But is it already easily possible to define in the commands which input types they expect from the GUI?

@tananaev
Copy link
Member

I think it's fairly simple because there are already some examples.

@amenk
Copy link
Contributor Author

amenk commented Dec 19, 2016

Okay, that's what I wanted to hear ... let's see if I can do it. Thank you :)

@amenk
Copy link
Contributor Author

amenk commented Dec 19, 2016

But I think the voice recording and receiving thing would be a bit complicated, right? (also does not really belong in that piece of software, but would be interesting)

@tananaev
Copy link
Member

Yes, it would be more complicated, but it's still possible to implement. We can store it in a blob in the database. I plan to implement similar functionality for images.

amenk added a commit to AddisMap/traccar that referenced this issue Dec 19, 2016
amenk added a commit to AddisMap/traccar that referenced this issue Dec 19, 2016
Problem: Positive time zone needs to be + prepended, custom formatter does not seem to be called
@amenk
Copy link
Contributor Author

amenk commented Dec 19, 2016

@amenk
Copy link
Contributor Author

amenk commented Dec 19, 2016

Strange ... the clock currently has a 0.5hrs offset. i.e. when I set 1.5h I get UTC+1

@amenk
Copy link
Contributor Author

amenk commented Dec 19, 2016

@tananaev What about saving state on the traccar server, for example the phone book, as I have to transmit always the full phone book. Or the current language, as Setting the time zone goes with setting the language.
I think there are custom attributes for that. Was this done for other devices already?

@tananaev
Copy link
Member

No, it hasn't been done for other devices. I guess it's possible to save it in device attributes, but I'm not sure if it's the best idea.

@amenk
Copy link
Contributor Author

amenk commented Dec 19, 2016

What would be the disadvantage? What are the device attributes originally meant for?

@tananaev
Copy link
Member

Attributes are meant to store any additional information. I guess the main disadvantage I can think of is that data can before out of sync with what is set up on the device.

amenk added a commit to AddisMap/traccar that referenced this issue Dec 19, 2016
… value formatter

+ not needed anyways, I was experiencing some bug in the watch
amenk added a commit to AddisMap/traccar that referenced this issue Dec 20, 2016
@amenk
Copy link
Contributor Author

amenk commented Dec 20, 2016

Sure, data could be out of sync, but practically will not be (at least in the case of that watch), because you are not able to set the parameters in another way then SMS and DataCenter (Traccar).
If we call the attribute "LastSendState" it should all be fine.
I believe the stock-app is working the same way.

amenk added a commit to AddisMap/traccar that referenced this issue Dec 20, 2016
@tananaev
Copy link
Member

Maybe it's fine. I can't think of any other issues.

@tananaev
Copy link
Member

By the way, I noticed that your commits are not linked to your GitHub account. I guess you are using different email.

amenk added a commit to AddisMap/traccar that referenced this issue Dec 20, 2016
amenk added a commit to AddisMap/traccar that referenced this issue Dec 21, 2016
tananaev added a commit that referenced this issue Dec 21, 2016
@amenk
Copy link
Contributor Author

amenk commented Jan 21, 2017

Concerning the custom commands: Currently we enter the full command which contains the watch's ID and the command Character count in Hex.
What do you think about generating the ID and length automatically and only input the "payload" part of the custom command in the web interface?

But this would be a backwards-compat breaker of course.

@tananaev What do you think?

@tananaev
Copy link
Member

I think it makes sense. That's how many other custom commands work.

@amenk
Copy link
Contributor Author

amenk commented Jan 22, 2017

Okay, will implement if I find a time. Just caring about backwards-compat ... maybe I switch to the old (current) way if the command starts with [

amenk added a commit to AddisMap/traccar that referenced this issue Jan 22, 2017
@tananaev
Copy link
Member

I don't think it's worth including any backward compatibility.

@guerrab
Copy link

guerrab commented May 23, 2018

How remove phone book by custom command

[3G*$ID$*0053*PHB,1111111,0066007200690065006e00640031]

@matthiasmo
Copy link

matthiasmo commented Sep 30, 2018

This file lists commands for the watch protocol. https://github.com/tananaev/traccar/files/213814/3g.elec.comm.protocol.docx
Most of these work per SMS too. (Tested on RF-V28)

Most importand would be:

  • CR# to start tracking for a period of time set by WORKTIME,x#

  • gprsgps,x,x# to activate data and/or continuous gps tracking.

  • upload,x# to set the update interval in continuus mode.

Also it sends LBS data, which is ignored by traccar, even though it would be supported in general.
for example:

2018-08-11 00:29:26 DEBUG: [c00dd42f: 5093 < ip] HEX: 5b33472a323731363334313236392a303030392a4c4b2c302c302c32305d

2018-08-11 00:29:26 DEBUG: [c00dd42f: 5093 > ip] HEX: 5b33472a323731363334313236392a303030322a4c4b5d

2018-08-11 00:29:26  INFO: [c00dd42f] id: 2716341269, time: 2018-08-10 13:40:00, lat: 0.00000, lon: 0.00000, course: 0.0

2018-08-11 00:32:16 DEBUG: [c00dd42f: 5093 < ip] HEX: 5b33472a323731363334313236392a303036442a55442c3131303831382c3030333231342c562c30302e3030303030302c4e2c20302e303030303030302c452c302e30302c302e302c302e302c302c3130302c32362c302c302c30303030303030302c312c302c3233322c332c31323035322c393135312c3136342c302c302e305d

2018-08-11 00:32:16  INFO: [c00dd42f] id: 2716341269, time: 2018-08-11 00:32:14, lat: 0.00000, lon: 0.00000, course: 0.0

@edanemayer
Copy link

bonour ,Pouvez-vous me dit comment cacher le clavier munerique de composition de numero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants