Hi all
Again I need your help
I need to establish communication with some strange device, all I know that is communicating by TCP protocol. I already know that device react on this string: "GET 02210100F101D9D9\n"
It responds: "RSP 0E02210100F10101E83B\n"
BUT, command "GET" is used when you want to ask for some data. Command "RSP" is send back from device with data you wanted to ask.
And this is fine
The problem is when I want to set data in device. Then I must to send this: "SET 02210100F101022B4A\n".
There is starting the most important part of fun
4 last characters in SET command are the CRC code (in GET and RSP also). In this case there is "2B4A". In "SET" request the most important part are two digits before CRC part.
I using this page to calculate CRC in different cases. On this website I had to select CRC width as CRC-16, CRC parametrization as CRC16_MODBUS and CRC Input Data as String. When I copied "SET 02210100F10102" this page calculate appriopriate CRC code (which is 2B4A).
I've already read some of threads, but none of them provided an answer to my problem. Particularly interesting was the thread on the use of XMODEM method, but it's not working properly with my data...
I hope I have described my problem in sufficient detail. Thanks in advance for your help
There are some examples for testing:
GET 0221010F2201, CRC should be E2FB
GET 022101008001, CRC should be 3190
SET 02210100F10101, CRC should be 2A0A
SET 02210100F10100, CRC should be EACB