Reputation: 19
I want to send SMS command over GPRS to teltonika devices fmbXXX
, I got response when I send the command getio
but other commands didn't work
Here is the script just for test
const net = require("net");
const Parser = require("teltonika-parser");
const server = net.createServer((socket) => {
console.log("Client connected:", socket.remoteAddress, socket.remotePort);
socket.on("data", async (data) => {
let parser = new Parser(data);
if (parser.isImei) {
// socket.write(Buffer.from('000000000000000D0C010500000005676574696F01000000CB', 'hex')); //getio it work
socket.write( Buffer.from( "000000000000000f0C010500000007676574696e666f0100004312","hex")); //getinfo no response
} else {
console.log(parser);
console.log("" + parser._codecReader.ByteBuffer + "");
}
});
socket.on("close", () => {
console.log("Client disconnected");
});
socket.on("error", (error) => {
console.error("Socket error:", error);
});
});
server.listen(4043, "192.168.1.21", () => {
console.log("TCP server listening ");
});
The code above works in getio
command but the other command as getinfo
or others not working
part of the compilation unit:
Upvotes: 1
Views: 1345
Reputation: 41
not all SMS commands are included in Teltonika' Codec12. Also not all commands are the same over different families of Teltonika devices (36, FM64*, FMB***).
Check this: https://wiki.teltonika-gps.com/view/Codec#Codec_12
Upvotes: 2