lib60870.NET icon indicating copy to clipboard operation
lib60870.NET copied to clipboard

104server Received sequence number out of range

Open McFly2017 opened this issue 2 years ago • 2 comments

When i start 104server and client connect, it's running normal. But when S num about 8500, some error occured this is the debug log: `CS104 SLAVE CONNECTION 1: SEND I (size = 18) : 68-10-AC-42-3A-00-0B-01-01-00-01-00-6E-00-00-DF-00-00

CS104 SLAVE CONNECTION 1: ------k-buffer------

CS104 SLAVE CONNECTION 1: 0 : S 8528 : time 1689817203216 : 0

CS104 SLAVE CONNECTION 1: 1 : S 8529 : time 1689817203337 : 1

CS104 SLAVE CONNECTION 1: 2 : S 8530 : time 1689817203428 : 2

CS104 SLAVE CONNECTION 1: 3 : S 8531 : time 1689817203521 : 3 CS104 SLAVE CONNECTION 1: 4 : S 8532 : time 1689817203649 : 4 CS104 SLAVE CONNECTION 1: 5 : S 8533 : time 1689817203770 : 5 CS104 SLAVE CONNECTION 1: 6 : S 8534 : time 1689817203863 : 6 CS104 SLAVE CONNECTION 1: 7 : S 8535 : time 1689817203985 : 7 CS104 SLAVE CONNECTION 1: -------------------- CS104 SLAVE CONNECTION 1: RCVD: 68-0E-3A-00-2E-04-64-01-06-00-01-00-00-00-00-14 CS104 SLAVE CONNECTION 1: Received I frame: N(S) = 29 N(R) = 535 CS104 SLAVE CONNECTION 1: Received sequence number out of range CS104 SLAVE CONNECTION 1: CS104 SLAVE: Queue contains 9 messages (oldest: 0 latest: 8) Sequence number check failed CS104 SLAVE CONNECTION 1: CLOSE CONNECTION! CS104 SLAVE CONNECTION 1: CONNECTION CLOSED! CS104 SLAVE CONNECTION 1: ProcessASDUs exit thread`

The code is examples cs104-server, just modify the send frequency `while (running && server.IsRunning())

{ Thread.Sleep(100); newAsdu = new ASDU(server.GetApplicationLayerParameters(), CauseOfTransmission.PERIODIC, false, false, 0, 1, false); var rnd = new Random().Next(0, 360); newAsdu.AddInformationObject(new MeasuredValueScaled(110, rnd, new QualityDescriptor())); server.EnqueueASDU(newAsdu); }`

McFly2017 avatar Jul 20 '23 01:07 McFly2017

What are you using as client. It seems the client is sending out of sync sequence numbers.

mzillgith avatar Jul 20 '23 11:07 mzillgith

Hi, Thanks for replay. When the error occurred, every time , the seqNo is less than 1000,and sentASDUs[newestSentASDU].seqNo is equal ( seqNo + 8000) Like, seqNo=331 and sentASDUs[newestSentASDU].seqNo=8331

This is the code before error occured @.***

从 Windows 版邮件https://go.microsoft.com/fwlink/?LinkId=550986发送

发件人: Michael @.> 发送时间: 2023年7月20日 19:30 收件人: @.> 抄送: @.>; @.> 主题: Re: [mz-automation/lib60870.NET] 104server Received sequence number out of range (Issue #27)

What are you using as client. It seems the client is sending out of sync sequence numbers.

― Reply to this email directly, view it on GitHubhttps://github.com/mz-automation/lib60870.NET/issues/27#issuecomment-1643756981, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGG7HHYJGEU6LK5QJN7T3ULXREJGNANCNFSM6AAAAAA2QW2MXA. You are receiving this because you authored the thread.Message ID: @.***>

McFly2017 avatar Jul 20 '23 13:07 McFly2017