英文:
How send SMS command over GPRS to teltonika devices fmbXXX
问题
我想通过GPRS向Teltonika设备fmbXXX
发送SMS命令,当我发送getio
命令时,我收到了响应,但其他命令没有起作用。
以下是仅供测试的脚本:
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 ");
});
上述代码在getio
命令中工作,但其他命令如getinfo
或其他命令不起作用。
英文:
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:
答案1
得分: 1
Teltonika Codec12中未包含所有SMS命令。不同系列的Teltonika设备(36,FM64*,FMB***)的命令也不完全相同。
请查看此链接:https://wiki.teltonika-gps.com/view/Codec#Codec_12
英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论