-
Notifications
You must be signed in to change notification settings - Fork 37
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
Error when subscribing data from PLC.. #5
Comments
Hi @yltsa, fist of all can you update the nuget packet to reference the latest version of BACnet client library? These examples are a bit outdated and not maintained, so that might be one cause for the issue. If this doesn't help, can you provide a wireshark dump from this situation where PLC subscribes and you get this issue? Best would be if the dump was filterer to only contained BACnet related traffic (capture filter on interface: |
There is an open abandoned pull request that updates the library reference, adjustes code to new namespacing and fixes a problem with Analog Object, but code review was not addresses. If you want you can start from there and later. |
Hello.. I have the newest nuget packages. Have also tried with the version 2 BACnet lib but the same result. Here is a wireshark dump file (I use it first time). This file should contain three subscriptions and the following sequence: Add BBMD This is OK. From Yabe software running in 10.102.0.20 IP address This is from PLC in 10.102.0.17. Does not work: This is from the same PLC. Does not work: |
Hi.. I downloaded the 1.0.20 beta Examples and tried Analog Object from that code. But the same result.. |
Hi, this works now with the PLC. My colleague made some changes to the following two functions in BacnetActivity class:
|
@yltsa thank you for the feedback, I will check the changes and update the examples so that others don't have same problem |
@gralin Yes.. but please be careful. It was working before with Yabe. This was a quick fix for us that we get the PLC compatibility. Maybe we have broken something else. I put the BaCSharp code into own assembly which is referenced from our application. BaCSharp is a nice layer above the BACnet library: |
@yltsa sure I will see why it works in Yabe, it could be that it was fixed after the codebases diverged and was never synced back. Question, I see you also have the source of BACnet library in your solution. Was there a reason to do it like that instead of using NuGet package? |
@gralin Hi, I used the BACnet source code only for debugging and also made some useless trials before. The NuGet package works too. I tested also the BACnet ver. 2 from this site. Today a quick test with the ver. 2 was not OK. Other error when making the subscription. I made some new properties for the BACnet 1 so can switch quickly between the libs. Other small work was to get Yabe source code and modify it to use the BACnet lib. directly. I can send this project for you if you want.. |
My changes are marked with //XXXIR string in BACnet lib. The code is here: |
@yltsa thank you. If you have time would you be willing to check what has been broken in v2 that it's not working for you? There is one unmerged PR you can also check, but it's mainly refactor and tests so shouldn't be much different from v2.
|
@gralin Yes, I play later with the BACnet lib v2. I can try test it with my colleague on the next Tuesday. |
@yltsa great thank you. If you find the problem and submit a fix, later v2 will be already working for you. |
Hi, I am not so good in BACnet. But here is the problem.
I am using the SubscriptionManager from these examples (AnotherStorageImplementation).
We have a PLC which is trying to subscribe AnalogValue parameters from a Windows service which is based on BacnetActivity classes.
The problem is that the server decodes an error after bacnetClient.Notify function. The error comes in this function in BacnetClient class:
private void OnRecieve(IBacnetTransport sender, byte[] buffer, int offset, int msgLength, BacnetAddress remoteAddress)
The buffer[] contains the following data:
[0] 129
{1] 10
[2] 0
[3] 13
[4] 1
[5] 0
[6] 80
[7] 1
[8] 1
[9] 145
[10] 5
[11] 145
[12] 7
The offset parameter is 6 which points to 80 => Error
The subscribing works with Yabe.. but not with the PLC.
The text was updated successfully, but these errors were encountered: