-
Notifications
You must be signed in to change notification settings - Fork 17
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
Method call without input or output arguments is not showing expected behaviour #34
Comments
Thanks for question.
|
Hi Andrew, Many thanks for the quick reply. Although I'm fairly certain I tried it that way already, I'll double check on Monday and will post the results here. |
Is it possible you are connecting with different security mode or user identity? Also, I have a S7-1500. I don't see the ServerConfiguration node. I'll have to do some reading :( |
Hi Andrew, I've just created a pull request with some GDS push example code. A connected PLC should be in provisioning mode, which can be achieved after following section 2.3 in this Siemens guide: The endpointURL and UserNameIdentitiy should probably be modified in cmd/testGDSPush/main.go, but all required certificates should generate automatically. A hint on where the issue might originate from is that the method call returns BadInvalidState when executed from the example code. However, this should not be the case. The fact that the method can be successfully called from UA Expert and Python after OpenWriteCloseAndUpdate() demonstrates that the function call should execute successfully using Go too. Let me know if this is of any help! |
Hey @awcullen have you had a chance to look into the issue since the last comment? |
I moved the TestGDSPush code to a branch 'GDSPush'. I tested with UnifiedAutomation's UACPPServer.
Note: Initially the server would not accept the client connection until I added the ca cert to its trust list manually. I don't believe we need to perform Step 7 if the ca cert doesn't change. |
Hi Andrew, |
I got to test with a Siemens 1500 and found the encoder prefers arrays (slices) of zero length (instead of nil). I have updated branch 'GDSPush'. Let me know if it works for you and I will update main branch. |
Hi Andrew, that did the trick! Thanks for checking with the Siemens PLC and directly providing the solution. |
Hi Andrew,
As the final step in push certificate management on a GDS server, I am calling the ApplyChanges method from a client application currently being set up using Go. Unfortunately, nothing really happens, whereas the method call using UaExpert or a python implementation yields the expected results. As the certificate writing, signing and updating otherwise works perfrectly fine using Go, I'm unsure where to start looking.
A selection of the trace looks as follows:
2024/05/30 15:49:18 CallRequest{ "AuthenticationToken": "i=3041481013", "Timestamp": "2024-05-30T15:49:18.8335444+02:00", "RequestHandle": 5, "ReturnDiagnostics": 0, "AuditEntryID": "", "TimeoutHint": 15000, "AdditionalHeader": null, "MethodsToCall": [ { "ObjectID": "i=12637", "MethodID": "i=12740", "InputArguments": null } ] } 2024/05/30 15:49:18 CallResponse{ "Timestamp": "2024-05-30T13:49:25.9168499Z", "RequestHandle": 5, "ServiceResult": 0, "ServiceDiagnostics": {}, "StringTable": null, "AdditionalHeader": null, "Results": [ { "StatusCode": 0, "InputArgumentResults": null, "InputArgumentDiagnosticInfos": null, "OutputArguments": null } ], "DiagnosticInfos": null }
The method call is set up as:
req := &ua.CallRequest{ MethodsToCall: []ua.CallMethodRequest{ { ObjectID: ua.ObjectIDServerConfiguration, MethodID: ua.MethodIDServerConfigurationApplyChanges, }, }, }
It doesn't really seem to matter whether InputArguments is nil, an empty ua.Variant slice, or omitted altogether.
Would you have any suggestion on where to start looking, or on what other information to share?
The text was updated successfully, but these errors were encountered: