mkjeff / secs4net

SECS-II/HSMS-SS/GEM implementation on .NET
https://mkjeff.github.io/secs4net/
MIT License
443 stars 195 forks source link

Parsing packet error #91

Open hsia-summerboy opened 1 year ago

hsia-summerboy commented 1 year ago

Hello, I downloaded version 2.2.1 but found the following problems. I encountered that if I receive an error packet, I will no longer be able to parse the packet correctly. To verify the correctness, I used Wireshake to monitor network packets.

1.Receive Error Packet. 2023/11/16 12:29:37.619 → <-- [0x20202020] 'S32F32' Error msg

2.Reply S9F1 2023/11/16 12:29:37.635 → --> [0x580C5BB5] Unrecognized Device Id:'S9F1' <B [10] 0x20 0x20 0x20 0x20 0x00 0x20 0x20 0x20 0x20 0x20> . Reply_S9F1

3.No receive packet but still decoder. 2023/11/16 12:29:37.635 → <-- [0x20202020] 'S32F32' <B [0] > .

4.Reply S9F1 again. 2023/11/16 12:29:37.635 → --> [0x580C5BB6] Unrecognized Device Id:'S9F1' <B [10] 0x20 0x20 0x20 0x20 0x00 0x20 0x20 0x20 0x20 0x20> . Reply_S9F1_Again

5.Send S1F1 2023/11/16 12:29:45.102 → --> [0x580C5BB7] :'S1F1'W Send S1F1

6.Wirshake have get correct packet but SecsDevice.exe decoder a error packet. 2023/11/16 12:29:45.196 → <-- [0x80000102] 'S0F0' <L [0]

. Receive S1F2