logo

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline Ahmed Ghumman  
#1 Posted : Wednesday, August 5, 2015 5:00:45 PM(UTC)
Ahmed Ghumman

Rank: Newbie

Joined: 8/5/2015(UTC)
Posts: 3

Thanks: 1 times
Hi.

I installed OPC UA SDK on linux (Ubuntu 14.04 32 bit version). When I run pre-compiled executable for opc ua client, the example asks for ip address, endpoints selection, encryption options. But then it halts where it says "Enter the Username: ". Whatever I put, it never asks me the password and doesn't go forward.
The IP address of this linux computer is 192.168.2.88. I'm trying to connect it to Windows computer which has Kepware server running and is at 192.168.2.188. I can ping each other.

Can someone please explain why the pre-compiled example client program is not running.
Does anyone have any success making Matrikon OPC UA Client on linux communicate to any server on Windows side?

Thanks.
-Ahmed.
Offline Patrick Griffiths  
#2 Posted : Thursday, August 6, 2015 7:52:13 AM(UTC)
Patrick Griffiths

Rank: Advanced Member

Joined: 11/28/2014(UTC)
Posts: 37

Was thanked: 13 time(s) in 11 post(s)
Hi Ahmed,

Does an anonymous connections with no security enabled succeed?

You could also try stepping through the code to see what's going on.

Also, make sure the machines can all resolve each others names, either by using DNS or fake it with host entries.

Patrick
Offline Ahmed Ghumman  
#3 Posted : Thursday, August 6, 2015 12:19:30 PM(UTC)
Ahmed Ghumman

Rank: Newbie

Joined: 8/5/2015(UTC)
Posts: 3

Thanks: 1 times
Thanks Patrick for replying.

I didn't get any success from using Matrikon OPC UA Client either pre-compiled or the ones which I compiled after making changes in the code to connect to any server running on Windows even when no security is enabled.

But I'm able to connect to Kepware Server running on Windows using Ignition software and Softing OPC Toolkit Clients both running on Linux.

I tried going through the code and what I don't understand is that in Main.cpp you're using cin and in UaClient.cpp where it says 'Enter the Username' you use wcin. I don't think you can use both cin and wcin in a program. I tried to output this m_userName on terminal but it is always blank. I tried using getline(cin, m_userName), but for some reason never able to write to m_userName.

Patrick what should happen ideally when it asks "Enter the Username: "? Whatever I put, should it not go to "Enter the Password:"? It's not doing that.


And I don't understand when you say "Machines can all resolve each others names, either by using DNS or fake it with host entries". Both machines can ping each other using IP addresses. My linux computer is not able to ping Windows machine by computer name, i think that's how linux works.


Thanks.
-Ahmed.
Offline Patrick Griffiths  
#4 Posted : Thursday, August 6, 2015 12:35:11 PM(UTC)
Patrick Griffiths

Rank: Advanced Member

Joined: 11/28/2014(UTC)
Posts: 37

Was thanked: 13 time(s) in 11 post(s)
Hi Ahmed, I'll check with the rest of team to see if there are any known issues with that sample. In the meantime, can you please try to connect using anonymous with no security, just to see if you can get a connection at all with the sample.

The cin/wcin thing is not an issue.

With the name resolution, the idea is that all the computers should be able to resolve each other's DNS names. If there is no DNS, you can use the hosts file on Linux.

Patrick
thanks 1 user thanked Patrick Griffiths for this useful post.
Offline Ahmed Ghumman  
#5 Posted : Thursday, August 6, 2015 1:19:47 PM(UTC)
Ahmed Ghumman

Rank: Newbie

Joined: 8/5/2015(UTC)
Posts: 3

Thanks: 1 times
Patrick, sorry my bad. I was not using the right command. Instead of putting ./SampleUAConsole IP Adress:Port, I was just saying ./SampleUAConsole. Thanks for your support.
Offline Patrick Griffiths  
#6 Posted : Thursday, August 6, 2015 1:29:22 PM(UTC)
Patrick Griffiths

Rank: Advanced Member

Joined: 11/28/2014(UTC)
Posts: 37

Was thanked: 13 time(s) in 11 post(s)
Ok, glad you got it sorted out. BTW, the sample console app is really a very basic sample to show how to do some basic tasks with the SDK. It's not intended to be a generic client.

Just to close the loop on this: we checked the sample against a number of OPC UA servers and they all worked except for for the ProSys demo server. We'll put investigating what the problem might be in our backlog.

Cheers,
Patrick
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Matrikon Subscribe  |   Matrikon Unsubscribe  |   Global Unsubscribe  |   Privacy Statement  |   Do Not Sell My Personal Information   |   Cookie Notice