Git Product home page Git Product logo

nodejs-tk102's Issues

don't parse GPS data TK102b !

Hello I buy a GPS tracker on Amazon but I did not expect it to be so complicated.

But we will say that we like it in the computer!

I followed launching in first demo.js and I simply received the IMEI of my tracker

Event: connection
{address: '0.0.0.0',
  family: 'IPv4',
  port: 1337,
  remoteAddress: '37 .171.230.59 ',
  remotePort: 63500}

Event: data
(087079484741BP00352887079484741HSOP47) '
DATA: (087079484741BP00352887079484741HSOP47)

Event: fail
{Error: Can not parse GPS data from device
    at Socket. <anonymous> (/root/gpsAl/node_modules/tk102/tk102.js:174:19)
    at emitOne (events.js: 96: 13)
    at Socket.emit (events.js: 188: 7)
    at readableAddChunk (_stream_readable.js: 176: 18)
    at Socket.Readable.push (_stream_readable.js: 134: 10)
    at TCP.onread (net.js: 559: 20)
  reason: 'Can not parse GPS data from device',
  input: '(087079484741BP00352887079484741HSOP47)',
  connection:
   {address: '0.0.0.0',
     family: 'IPv4',
     port: 1337,
     remoteAddress: '37 .171.230.59 ',
     remotePort: 63500}}

By analyzing the issues I have therefore tried a resolution by adding a library "time-sleep" and using the exemple.js

By launching the code I received this:

DATA(087079484741BR00190406V4314.0199N00533.1265E009.1190937000.00,00000000L00000000)

I find it positive but I try by all means to decrypt this frame but I find only this documentation on the internet that does not bring me much.

it's been days that I'm looking for solutions help me!

Unreadable data

Got a other TK102 fake. What can I deliver to decode this? (packet trace? other logging?)
Looks like a homebrew sockets implementation to me...

Event: data
'(087076826183BP00HSO)'

Event: fail
{ Error: Cannot parse GPS data from device
at Socket. (/var/www/tk102/node_modules/tk102/tk102.js:152:17)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:547:20)
reason: 'Cannot parse GPS data from device',
input: '(087076826183BP00HSO)',
connection:
{ address: '0.0.0.0',
family: 'IPv4',
port: 5000,
remoteAddress: 'x.x.x.x',
remotePort: 38267 } }

Support for TK103?

Will you consider support for TK103 units?

These were purchased from http://www.amazon.com/Real-Time-Portable-GPS-Tracker/dp/B001FYQO3W?ie=UTF8&psc=1&redirect=true&ref_=oh_aui_detailpage_o04_s00 and seem to use TK103, which is decodable by Traccar via port 5002. Follows format as listed in https://raw.githubusercontent.com/tananaev/traccar/master/tools/test-integration.py.

Incoming data: (027043828342BR00160419A4402.8913N09138.2201W000.60051110.000000000000L00000000)
{ [Error: Cannot parse GPS data from device]
  reason: 'Cannot parse GPS data from device',
  input: '(027043828342BR00160419A4402.8913N09138.2201W000.60051110.000000000000L00000000)',
  connection:
   { address: '0.0.0.0',
     family: 'IPv4',
     port: 1337,
     remoteAddress: '172.56.X.Y',
     remotePort: 37867 } }
Incoming data: (027043828342BP00000027043828342HSO)
{ [Error: Cannot parse GPS data from device]
  reason: 'Cannot parse GPS data from device',
  input: '(027043828342BP00000027043828342HSO)',
  connection:
   { address: '0.0.0.0',
     family: 'IPv4',
     port: 1337,
     remoteAddress: '172.56.X.Y',
     remotePort: 37867 } }

Not an Issue - Newby Question

-"node" installed: node version: v0.8.20
-downloaded and installed(make/make install): nodesjs-tk102

I execute the following command: node tk102.js

I get no error message or indication that anything is running..
(using nmap, netstat..I don't see any listening ports)

How can I check the running status?
Any pointers on this?

Error handling

Implement proper error handling with Error instances.

support for GPS103A?

when I connect my device GPS103A just answer me this.

Logs:
ubuntu-0 Event: data
ubuntu-0 '##,imei:8686830534662313142206,A;'
ubuntu-0 Event: track
ubuntu-0 '##,imei:8686830534662313142206,A;'
ubuntu-0 Event: timeout
ubuntu-0 { address: '0.0.0.0',
ubuntu-0 family: 'IPv4',
ubuntu-0 port: 5001,
ubuntu-0 remoteAddress: '132.184.84.145',
ubuntu-0 remotePort: 52399 }

some help?

Please, change fixGeo function

My tracker sent longitude as 06900.9999 if first sign is 0, parseInt thinks that 'radix = 8' (octal)
Please, change in fixGeo function from:
var degrees = parseInt( one.replace( minutes, '' ) )
to:
var degrees = parseInt( one.replace( minutes, '' ), 10 )

question about methods to secure

I'm working with something similar and you mention this has "no security built in". I wanted to ask what techniques would even be possible to limit other users from uploading.

I can see the following helping by limiting uploads by IMEI, IP or other unique identifiers, does anything else exist?

Support TK102-2

Adding support for TK102-2 trackers.

  • Battery voltage
  • Altitude
  • Num satellites
  • Cell ID
  • MNC/MCC codes
  • LAC code

Licence

The project appears to be missing a licence. I've got several similar trackers. I'd like to participate, especially if you chose the Apache 2.0 licence.

Trace: { [Error: uncaught exception]

Hello,
i tried your server, but i get often this error ?

Trace: { [Error: uncaught exception]
error:
{ [Error: Socket error]
reason: 'Socket error',
socket:
{ _connecting: false,
_handle: null,
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_maxListeners: 10,
_writableState: [Object],
writable: false,
allowHalfOpen: false,
onend: null,
destroyed: true,
bytesRead: 26,
_bytesDispatched: 0,
_pendingData: null,
_pendingEncoding: '',
server: [Object],
_idleTimeout: -1,
_idleNext: null,
_idlePrev: null,
_idleStart: 1431944307470,
_monotonicStartTime: 16494237665,
pipe: [Function],
addListener: [Function: addListener],
on: [Function: addListener],
pause: [Function],
resume: [Function],
read: [Function],
_consuming: true },
settings: { ip: '0.0.0.0', port: 5030, connections: 10, timeout: 10 } } }
at process.tk102.createServer.tk102.settings.(anonymous function) (/srv/tk102-gw/daemon/tk102.js:79:11)
at process.emit (events.js:95:17)
at process._fatalException (node.js:301:26)

can you help me ?

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

Package is deprecated

Hey guys,

After 6 years, 4 bricked TK-102’s, a TK-102B and a TK-103, I’m stepping out of this project. The cost of those cheap trackers is actually pretty high when you count the replacements and amount of time you have to invest to get it working in a useful way. It appears only the first batches of TK-102’s have a consistent data format while everything that came after is just random. Even the bidirectional communication is far from reliable. It’s also becoming really difficult to distinguish between the original and the fake devices. Some are even too cheap to be good for the workers; you can see the rush job when you take it apart. Soldered only one strand of the too short antenna wire, for example. One bad bounce on the ground it breaks, then the tracker has no cell reception anymore.

To cut the story short, I have recently switched over to a Tractive GPS tracker which is doing more than everything I intended this Node package for, but without the trouble of coding it myself. Personally I no longer have a need for this package anymore. Combined with the backlog and low quality hardware, I’m loosing motivation to keep it maintained.

It was an interesting ride, I learned a lot about GPS tech and hardware diversity, but the people who are still using the ‘tk102’ package deserve a coder who’s dedicated to make it all work.

If someone wishes to take over this repo and the package on npm, please let me know here.

Add chaining

This would allow simple implementation in other code, example:

require('tk102').createServer({port:1337}).on('track', storeData)

Unreadable data

I tried using this source to parse data from a tk102 device. The received data is always unreadable, for Example 1:
connected
UH� t"3�T

UH� t"3�T

xx 04���[��<�R�w�3vQ

Example 2:

63.143.78.70 wrote:
UH� t"'�

63.143.78.67 wrote:
UH� t"'�

63.143.78.69 wrote:
UH� t"(A

63.143.78.65 wrote:
UH� t"(A

63.143.78.67 wrote:
UH� t"(A

63.143.78.67 wrote:
UH� t")P�

63.143.78.70 wrote:
UH� t")P�

63.143.78.68 wrote:
UH� t"*b

63.143.78.68 wrote:
UH� t"*b

63.143.78.68 wrote:
UH� t"*b

63.143.78.66 wrote:
UH� t"+s�

63.143.78.69 wrote:
UH� t"+s�

63.143.78.65 wrote:
UH� t"+s�

63.143.78.70 wrote:
UH� t"-�

63.143.78.65 wrote:
UH� t"-�

63.143.78.67 wrote:
UH� t".$0

63.143.78.67 wrote:
UH� t".$0

63.143.78.69 wrote:
UH� t".$0

63.143.78.70 wrote:
UH� t"/5�

63.143.78.65 wrote:
UH� t"/5�

63.143.78.65 wrote:
UH� t"/5�

63.143.78.66 wrote:
UH� t"0

63.143.78.67 wrote:
UH� t"0

63.143.78.69 wrote:
UH� t"0

63.143.78.70 wrote:
UH� t"1

63.143.78.65 wrote:
UH� t"1

63.143.78.70 wrote:
UH� t"1

63.143.78.69 wrote:
UH� t"3

63.143.78.66 wrote:
UH� t"3

63.143.78.69 wrote:
UH� t"3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.