Support for TK-102 clones
Hello,
Thank you for a great library! This is rather question (or two), than issue.
Does this library supports TK-102 clones or only original Xexun one? Difference is quite basic.
Original Xexun (and some limited number of clones) can send datagram via both HTTP and UDP. Most clones supports only UDP. So, my first question is -- can this library be used to listen to UDP datagrams?
Original Xexun (and some clones) broadcast datagrams, including all the information (geo, battery etc.) at once, without asking server for anything. Listening to such trafic is fairly easily.
Most clones are much harder in this area (Chineese got bored, so added this?). For example, my TK-102 clone only sends some "binary-grabage-welcome-data" (I can provide examples) and then waits for proper reply sent back from the server. If reply comes out, only then it sends geo data. If there is no reply at all or reply from the server is incorrect, it breaks connections and sends out nothing else.
So, my second question is -- does this library supports such reply-required listening?
If any of my question is answered "no", is there any change, this library will support such traffic / listening / TK clones in future releases?
Cheers, Trejder
Does this library supports TK-102 clones or only original Xexun one? Difference is quite basic.
At this moment it only supports the Xexun TK102 and I'm working on TK102-2 support. Since the latter has a much different syntax I'm changing the logic to make it easy to support more devices without the need to rewrite the main logic each time. It will have auto detection and a setting to force a certain (or set of) syntax(s).
I'm not sure if my trackers are clones. When I bought them they were labeled as Xexun's, but the IMEI check fails.. Considering the lack of proper documentation for both originals and clones, I don't think it really matters. Maybe I should not explicitly refer to Xexun in the module description.
Original Xexun (and some limited number of clones) can send datagram via both HTTP and UDP. Most clones supports only UDP. So, my first question is -- can this library be used to listen to UDP datagrams?
For now it only supports TCP, but I can look into UDP if you like. Can you provide documentation or examples of the device's communication protocol?
For example, my TK-102 clone only sends some "binary-grabage-welcome-data" (I can provide examples) and then waits for proper reply sent back from the server. If reply comes out, only then it sends geo data. If there is no reply at all or reply from the server is incorrect, it breaks connections and sends out nothing else.
So, my second question is -- does this library supports such reply-required listening?
It doesn't, but I'm very curious about this. Please tell me more!
If any of my question is answered "no", is there any change, this library will support such traffic / listening / TK clones in future releases?
I would be happy to add support for more devices, provided I won't have to spend weeks browsing forums for vague untested syntax descriptions. :)
Since, this turns out to be a private discussion, not a general issue, I've sent reply directly to your e-mail address, found at your website. Thanks and cheers.
No problem, @trejder. I post my reply here too, it may be of interest to those who follow this project.
I have been digging through TK and related tracker manuals the last couple of days and some indeed mention UDP or even HTTP, but without instructions about serverside implementation, and later on they turn out to support TCP. I consider those one of the many errors by their authors.
It almost seems like each tracking device has its own communication protocol. All the different firmware versions, hardware revisions, clone manufacturers, they make each individual device nearly unique! I think it is impossible to support all of them.
Now I'm only talking about TK102, for TK102-2 it gets worse. I now have both trackers because I want a tracker that reports the battery status to the server. My NodeJS module fully supports the specific TK102 I own, but the TK102-2 sends a much different data string (tcp). Compare this:
TK102:
sms: t030s002n123456
1203292316,0031698765432,GPRMC,211657.000,A,5213.0247,N,00516.7757,E,0.00,273.30,290312,,,A*62,F,imei:123456789012345,123
TK102-2:
sms: #fix#030s#002n#123456#
#353512345678905##1#0000#AUT#01#2040081234ab9c#510.123400,E,5211.012300,N,0.00,356.60#260313#140227.000##
And yes, there is no battery voltage indication in that string! So my TK102-2 is a bad clone. And it gets worse, when data is transmitted to my server the latitude/longitude are often just 0000.000000 and it leaves the data connection open with the server, draining the battery.
I'm going to build my own device (Raspberry Pi or Arduino), write a Node.js module for it and eventually stop work on the current 'tk102' module. It's a nice thought to support all devices, but also a nightmare to proof it.
This also means I have to change my earlier statement about supporting more devices: The module tk102 will NOT get support for more clones and hardware revisions, including the TK102-2.
I will continue work for Node.js compatibility and bug fixes.