{"action":"created","issue":{"url":"https://api.github.com/repos/open62541/open62541/issues/788","repository_url":"https://api.github.com/repos/open62541/open62541","labels_url":"https://api.github.com/repos/open62541/open62541/issues/788/labels{/name}","comments_url":"https://api.github.com/repos/open62541/open62541/issues/788/comments","events_url":"https://api.github.com/repos/open62541/open62541/issues/788/events","html_url":"https://github.com/open62541/open62541/issues/788","id":175452459,"number":788,"title":"error/client\tGetEndpointRequest failed","user":{"login":"kennyc0522","id":15316646,"avatar_url":"https://avatars.githubusercontent.com/u/15316646?v=3","gravatar_id":"","url":"https://api.github.com/users/kennyc0522","html_url":"https://github.com/kennyc0522","followers_url":"https://api.github.com/users/kennyc0522/followers","following_url":"https://api.github.com/users/kennyc0522/following{/other_user}","gists_url":"https://api.github.com/users/kennyc0522/gists{/gist_id}","starred_url":"https://api.github.com/users/kennyc0522/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennyc0522/subscriptions","organizations_url":"https://api.github.com/users/kennyc0522/orgs","repos_url":"https://api.github.com/users/kennyc0522/repos","events_url":"https://api.github.com/users/kennyc0522/events{/privacy}","received_events_url":"https://api.github.com/users/kennyc0522/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-07T09:15:59Z","updated_at":"2016-09-09T03:48:33Z","closed_at":null,"body":"Hi,\r\n\r\nI encountered an issue in connecting with OPC server from Siemens 840D controller.\r\nNow, I do not try Wireshark to dump any traffic information.\r\n\r\n[ Issue ]\r\n\t\"GetEndpointRequest failed\" and \"No suitable endpoint found\".\r\n\r\n\r\n[ Environments ]\r\n\tThe OPC client was compiled and ran on the VMware machine.\r\n\tOS is Ubuntu 15.\r\n\tSDK version is v0.2-rc1 (open62541.c)\r\n\r\n```\r\n/* THIS IS A SINGLE-FILE DISTRIBUTION CONCATENATED FROM THE OPEN62541 SOURCES \r\n * visit http://open62541.org/ for information about this software\r\n * Git-Revision: v0.2.0-RC1\r\n */\r\n```\r\n\t\r\n\r\n[ Description ]\r\nSource code of Client is an example from official website, and compiled with open62541.c.\r\n```\r\n#include <stdio.h>\r\n#include <inttypes.h>\r\n#include \"open62541.h\"\r\n\r\nint main(void) {\r\n    UA_Client *client = UA_Client_new(UA_ClientConfig_standard);\r\n    UA_StatusCode retval = UA_Client_connect(client, \"opc.tcp://localhost:16664\");\r\n    if(retval != UA_STATUSCODE_GOOD) {\r\n        UA_Client_delete(client);\r\n        return (int)retval;\r\n    }\r\n\r\n    //variables to store data\r\n    UA_DateTime raw_date = 0;\r\n    UA_String string_date;\r\n\r\n    /* create a readrequest with one entry */\r\n    UA_ReadRequest rReq;\r\n    UA_ReadRequest_init(&rReq);\r\n    rReq.nodesToRead = UA_Array_new(1, &UA_TYPES[UA_TYPES_READVALUEID]);\r\n    rReq.nodesToReadSize = 1;\r\n\r\n    /* define the node and attribute to be read */\r\n    #define NS0_CURRENT_TIME 2258\r\n    rReq.nodesToRead[0].nodeId = UA_NODEID_NUMERIC(0, NS0_CURRENT_TIME);\r\n    rReq.nodesToRead[0].attributeId = UA_ATTRIBUTEID_VALUE;\r\n\r\n    /* call the service and print the result */\r\n    UA_ReadResponse rResp = UA_Client_Service_read(client, rReq);\r\n    if(rResp.responseHeader.serviceResult == UA_STATUSCODE_GOOD && rResp.resultsSize > 0 &&\r\n       rResp.results[0].hasValue && UA_Variant_isScalar(&rResp.results[0].value) &&\r\n       rResp.results[0].value.type == &UA_TYPES[UA_TYPES_DATETIME]) {\r\n        raw_date = *(UA_DateTime*)rResp.results[0].value.data;\r\n        printf(\"raw date is: %\" PRId64 \"\\n\", raw_date);\r\n        string_date = UA_DateTime_toString(raw_date);\r\n        printf(\"string date is: %.*s\\n\", (int)string_date.length, string_date.data);\r\n    }\r\n\r\n    UA_ReadRequest_deleteMembers(&rReq);\r\n    UA_ReadResponse_deleteMembers(&rResp);\r\n    UA_String_deleteMembers(&string_date);\r\n\r\n    UA_Client_disconnect(client);\r\n    UA_Client_delete(client);\r\n    return (int) UA_STATUSCODE_GOOD;\r\n}\r\n```\r\n\r\nThe Client could make connection with simulation server, but siemens controller.\r\nEndpointUrl should be correct.\r\n`UA_StatusCode retval = UA_Client_connect(client, \"opc.tcp://192.168.10.101:48020\");`\r\n\r\n\r\n[ Historical discussion]\r\n\tThread #746 UA_Client_connect do not connected, which discussed the same issue, but I didn't find an effective way to finish this issue.\r\n\r\nThanks for your help.\r\n\r\nKenny"},"comment":{"url":"https://api.github.com/repos/open62541/open62541/issues/comments/245811806","html_url":"https://github.com/open62541/open62541/issues/788#issuecomment-245811806","issue_url":"https://api.github.com/repos/open62541/open62541/issues/788","id":245811806,"user":{"login":"kennyc0522","id":15316646,"avatar_url":"https://avatars.githubusercontent.com/u/15316646?v=3","gravatar_id":"","url":"https://api.github.com/users/kennyc0522","html_url":"https://github.com/kennyc0522","followers_url":"https://api.github.com/users/kennyc0522/followers","following_url":"https://api.github.com/users/kennyc0522/following{/other_user}","gists_url":"https://api.github.com/users/kennyc0522/gists{/gist_id}","starred_url":"https://api.github.com/users/kennyc0522/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennyc0522/subscriptions","organizations_url":"https://api.github.com/users/kennyc0522/orgs","repos_url":"https://api.github.com/users/kennyc0522/repos","events_url":"https://api.github.com/users/kennyc0522/events{/privacy}","received_events_url":"https://api.github.com/users/kennyc0522/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T03:48:33Z","updated_at":"2016-09-09T03:48:33Z","body":"Please see the attached file\r\n\r\n[OpenSecureChannel.zip](https://github.com/open62541/open62541/files/463157/OpenSecureChannel.zip)\r\n\r\n\r\n"}}
{"actor":{"display_login":"kennyc0522"}}