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

No visable assets in fledge when using report control block #37

Open
JakobVogelsang opened this issue Feb 12, 2024 · 17 comments
Open

No visable assets in fledge when using report control block #37

JakobVogelsang opened this issue Feb 12, 2024 · 17 comments

Comments

@JakobVogelsang
Copy link

I am currently working with the SCL file below and am I simulating using IEDScout 5.20. Below the configuration of the plugin.
I do the communication in the sniffer also following the trigger options in the report. No of it is visible in the assets. When I take the same server and remove in the config anything related to the report and simply poll the data I so see assets being added.

Config

{
 "protocol_stack": {
  "name": "iec61850client",
  "version": "0.0.1",
  "transport_layer": {
   "ied_name": "IED1",
   "connections": [
    {
     "ip_addr": "192.168.0.67",
     "port": 49152,
     "tls": false
    }
   ]
  },
  "application_layer": {
   "polling_interval": 5000,
   "datasets": [
    {
     "dataset_ref": "IEDLDevice/LLN0.SwitchGear",
     "entries": [
      "IEDLDevice/XCBR1.Pos.stVal[ST]",
      "IEDLDevice/XCBR1.Pos.q[ST]"
     ]
    }
   ],
   "report_subscriptions": [
    {
     "rcb_ref": "IEDLDevice/LLN0.BR.SwitchGear",
     "dataset_ref": "IEDLDevice/LLN0.SwitchGear"
    }
   ]
  }
 }
}
{
 "exchanged_data": {
  "datapoints": [
   {
    "pivot_id": "TS1",
    "label": "TS1",
    "protocols": [
     {
      "name": "iec61850",
      "objref": "IEDLDevice/XCBR1.Pos",
      "cdc": "DpsTyp"
     }
    ]
   }
  ]
 }
}

PCAP:

WorkingReportControl.pcap.zip

Server definition
TestIED (2).scd.zip

LOG:
grafik

@mzillgith
Copy link
Collaborator

I cannot reproduce it. Maybe it has been fixed in the meantime. Can you try again with the latest code in the "develop_mz" branch?

@JakobVogelsang
Copy link
Author

I did test that with 1.0.0-rc1, sorry. Will retest and report back

@JakobVogelsang
Copy link
Author

No, unfortunately, I still can reproduce this scenario. Report are visible in the bus, but there are no assets generated. To check the proper exchanged_data config, I just remove all datasets and report_subscriptions and assets are bing generated.

@JakobVogelsang
Copy link
Author

Actually there seem to be a new error with SetBRCBValues such that the trigger options are not set correctly.

@jude-adam
Copy link

When testing with the provided SCD files and configurations, I also noticed that there was a SetRCBValues error. I think this was caused by the "rcb_ref" value being wrong, it works with IEDLDevice/LLN0.BR.SwitchGear01, not IEDLDevice/LLN0.BR.SwitchGear. Also, it was also noted that sending assets for the quality attribute reports was not yet implemented. This has now been fixed and will be pushed soon to the develop_mz branch.

@JakobVogelsang
Copy link
Author

Once you have it going I would love it when you share with me a configuration that I can test, either with a new SCL file or any other SCL file that you are using for testing.

@jude-adam
Copy link

The fix has been pushed to the develop_mz branch.

Configuration :
The SCL file I used was the one you provided.
Here is the config I used:

{
 "protocol_stack": {
  "name": "iec61850client",
  "version": "0.0.1",
  "transport_layer": {
   "ied_name": "IED1",
   "connections": [
    {
     "ip_addr": "192.168.0.134",
     "port": 102,
     "tls": false
    }
   ]
  },
  "application_layer": {
   "polling_interval": 0,
   "datasets": [
    {
     "dataset_ref": "IEDLDevice/LLN0.SwitchGear",
     "entries": [
      "IEDLDevice/XCBR1.Pos.stVal[ST]",
      "IEDLDevice/XCBR1.Pos.q[ST]"
     ],
     "dynamic": false
    }
   ],
   "report_subscriptions": [
    {
     "rcb_ref": "IEDLDevice/LLN0.BR.SwitchGear01",
     "dataset_ref": "IEDLDevice/LLN0.SwitchGear"
    }
   ]
  }
 }
}
{
 "exchanged_data": {
  "datapoints": [
   {
    "pivot_id": "TS1",
    "label": "TS1",
    "protocols": [
     {
      "name": "iec61850",
      "objref": "IEDLDevice/XCBR1.Pos",
      "cdc": "DpcTyp"
     }
    ]
   }
  ]
 }
}

Here is the Logger Output (Sends readings for stVal and q reports):

image

@jude-adam
Copy link

@JakobVogelsang Any updates on testing so that the issue can be closed please.

@JakobVogelsang
Copy link
Author

I am sorry but no I cannot confirm the report is being processed correctly. :( I see repots being activated and data is exchanged between the server and the client, but the information is not being processed correctly in the fledge instance. The assets are not showing any new incoming information.

Btw I am directly pulling from the branch develop_mz. Is there a way how I can see a new version being used?

@JakobVogelsang
Copy link
Author

What do I need to do to see the log message you have shown above?

@jude-adam
Copy link

Did you set the plugin's logger level to debug?

@JakobVogelsang
Copy link
Author

Hi @jude-adam,

@mzillgith has had the winning hint. The plugin at the moment assumes that report references on the wire are the not indexed. Which means that it is expecting the above report control block reference to be as such:
IEDLDevice/LLN0$BR$SwitchGear

In my case however the simulation tool is indexing the report and the reference is changed to:
IEDLDevice/LLN0$BR$SwitchGear01

As a result, the references do not match and therefore the plugin does not receive reports.

I personally think that the report control block reference indexing is correct. How else would you be able to differentiate between IEDLDevice/LLN0$BR$SwitchGear01 and IEDLDevice/LLN0$BR$SwitchGear02.

See my simple fix here JakobVogelsang@327410a

@Sander3003
Copy link

Great investigation!

@JakobVogelsang
Copy link
Author

@mzillgith has this been fixed now?

@mzillgith
Copy link
Collaborator

Hi @JakobVogelsang
It doesn't seem to be fixed in the main branch. Your fix JakobVogelsang@327410a seems to be correct.
I suggest you merge it into main.

@JakobVogelsang
Copy link
Author

JakobVogelsang commented Jan 21, 2025

@mzillgith I did and would be happy about a review. BUT how did this work on your side, up until now. Do we not break something on the other side with this fix?

@mzillgith
Copy link
Collaborator

I don't think that it's breaking anything on the "other side" when you mean the server as the other side.

The only thing it could break as I see are the reporting related test cases. Need to check this.

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

4 participants