I have a server written in kotlin with which I am able to connect to the FMB003 chip. I receive the IMEI number, to which I repond correctly (0x01 if I remember correctly), and the server is then fed with AVLs. I respond correctly to these (the number of records received, which I believe means how many commands the AVL consisted of). After the last AVL has been received by the server, and appropriately responded to, I receive a -1. Then the code exits the AVL loop, and sends the GPRS message. The GPRS message is written in the codec 12 protocol, and is the getinfo command. The command looks like this:
val request = byteArrayOf(
0x00, 0x00, 0x00, 0x00, //Zero bytes
0x00, 0x00, 0x00, 0x0F, //Data size
0x0C, //Codec ID (12)
0x01, //Command quantity 1
0x05, //Command type
0x00, 0x00, 0x00, 0x07, //Command size
0x67, 0x65, 0x74, 0x69, 0x6E, 0x66, 0x6F, //Command (getinfo)
0x01, //Command quantity 2
0x00, 0x00, 0x43, 0x12 //CRC-16
)
Which is a copy of one of the example requests from the documentation page for GPRS. However, when I send this to the chip, it always responds with "-1". What am I doing wrong?