Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

104server Received sequence number out of range #27

Open
McFly2017 opened this issue Jul 20, 2023 · 2 comments
Open

104server Received sequence number out of range #27

McFly2017 opened this issue Jul 20, 2023 · 2 comments

Comments

@McFly2017
Copy link

McFly2017 commented Jul 20, 2023

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);
}`

@mzillgith
Copy link
Contributor

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

@McFly2017
Copy link
Author

McFly2017 commented Jul 20, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants