I try to track GPS device with node.js server. But server receives only IMEI in a form like this:
##,imei:359xxxxxxxxxxxx,A;
What i'm doing wrong? Here's code:
var net = require('net');
var server = net.createServer(function (socket) {
socket.on("data", function (data) {
console.log(data.toString());
});
});
server.listen(2000);
Is your GPS tracker a TK10* ? It looks like it from the message your server got. If so, you need to reply to the tracker with 'LOAD' to tell it it's logged on. It will also send a heartbeat message periodically of just the IMEI to which the server must reply with 'ON'
Take a look at this document which has all of the commands/messages documented: http://www.zhyichina.com/en/GPStracking/GPRS-Data-Protocol.xls