Teltonika GPS 第一个 ACK 使用 JAVA
Teltonika GPS first ACK using JAVA
我正在为 Teltonika GPS 编写监听程序。如您所知,Teltonika 从第一次发送他们的 IMEI,然后服务器需要响应“01”以接受完整的原始数据。所以,我无法响应 GPS,这是我的部分代码:
DataOutputStream outToServer = null;
outToServer = new DataOutputStream(this.TCPSocket.getOutputStream());
byte[] msg = new byte[]{0x01};
outToServer.write(msg, 0, msg.length);
outToServer.flush();
没有任何反应,GPS 继续向我发送 IMEI
供日后参考。
二进制中的01等于字节值1。
byte[] msg = new byte[]{1};
outToServer.write(msg, 0, msg.length);
outToServer.flush();
我正在为 Teltonika GPS 编写监听程序。如您所知,Teltonika 从第一次发送他们的 IMEI,然后服务器需要响应“01”以接受完整的原始数据。所以,我无法响应 GPS,这是我的部分代码:
DataOutputStream outToServer = null;
outToServer = new DataOutputStream(this.TCPSocket.getOutputStream());
byte[] msg = new byte[]{0x01};
outToServer.write(msg, 0, msg.length);
outToServer.flush();
没有任何反应,GPS 继续向我发送 IMEI
供日后参考。
二进制中的01等于字节值1。
byte[] msg = new byte[]{1};
outToServer.write(msg, 0, msg.length);
outToServer.flush();