简体   繁体   中英

I had Teltonika FMA120 Device with c# application , i can't send command from server to device to enable relay?

I had Teltonika FMA120 Device its working fine with my c# application , I got IMEI from device the server acknowledge the device then i got all Position data.

But i can't send any command from server to device.

If i want to enable DOUT 1 and DOUT2 , tO access relay .

I write below in my Stream

                            Library.WriteErrorLog("Sending Test Data-----------------------");

                        byte[] ReplyBytesCmd;
                        ReplyBytesCmd = new byte[] { 0x00, 0x0d, 0x8c, 0x00, 0x02, 0x00, 0xb3, 0x00, 0x01, 0x01, 0x00, 0xb4, 0x00, 0x01, 0x01 };
                        //                                  len , id  ,       prms,        1st,           , val , 2nd ,           , val

                        stream.Write(ReplyBytesCmd, 0, 15);
                        Library.WriteErrorLog("Sending Test Data" + ReplyBytesCmd.ToString());

Dout1 - Port Id 179 Dout2 - Port Id 180 as per Teltonika Protocol.

For Teltonika FMBXXX devices you have to ACK the all the position data that you receive, all of the frames (there may be multiple if it has buffered data).

Then, after you ACK the last position data frame and the device is not sending anything, it is awaiting your commands. This is why it does not close the TCP connection.

The type of message you are sending to the FMA120 is unfamiliar to me. You can however use the Codec12 protocol for sending SMS/GPRS command from the server to the device. For example you can wrap the command 'setdigout 11' in a Codec12 message.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM