Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Not able to connect to OPC UA server from android client
September 11, 2019
10:16, EEST
Avatar
Galla
Member
Members
Forum Posts: 4
Member Since:
September 11, 2019
sp_UserOfflineSmall Offline

Hi ..

I am trying to communicate with OPC UA sever though android client.
I created server and one client application with the help of following link : https://github.com/lucazanrosso/OPCUAClient/blob/master/OPCUAClient%20guide.pdf

Server is running in the windows(windows 10) desktop.

First i ran my application android emulator, that time i could able to connect the server and read /write the data.
Next same application i ran in my android device and tested that time i am getting connection exception.
com.prosysopc.ua.client.ConnectException: Failed to retrieve endpoints. The server is not available: opc.tcp://BLSL00926.ties.com:53530/opcserver ServiceResult=Bad_ConnectionRejected (0x80AC0000) “Could not establish a network connection to remote server.”

Both sever and client are connected to same network (same router).

Can any one provide your inputs…

Thanks in advance!!

September 11, 2019
13:08, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

The error message means the connection cannot be made, i.e. nothing replies on the other side. You will need to check that network works between the 2, i.e. firewalls, port forwarding on the router etc.

Based on the exception message I would assume you are using our Java SDK, but the linked Github repo uses the raw stack level. So I sort of would need more explanation how that has anything to do with this.

September 12, 2019
10:18, EEST
Avatar
Galla
Member
Members
Forum Posts: 4
Member Since:
September 11, 2019
sp_UserOfflineSmall Offline

Hi ,
Thanks for the reply!!
now i am getting different exception i just changed tcp url DSN name with server device IP address once it’s connected and worked. next agin i tried in different system. now i am getting the following error.

org.opcfoundation.ua.common.ServiceResultException: Bad_ConnectionRejected (code=0x80AC0000, description=”2158755840, socket failed: EACCES (Permission denied)”)
can you please help me on this .

September 12, 2019
11:59, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Please note that this is not a general programming help forum, i.e. we do not generally cover basic java or android programming.
As this is not related to this application but for the SDK (sort of, but generally this is basic android programming question), better place would be in https://forum.prosysopc.com/forum/opc-ua-java-sdk/.

The error has something to do with android permissions, see e.g. https://stackoverflow.com/questions/11273197/error-message-java-net-socketexception-socket-failed-eacces-permission-denie or https://stackoverflow.com/questions/27687808/android-java-net-socketexceptionsocket-failed-eacces-permission-denied

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

TimK: 41

Member Stats:

Guest Posters: 0

Members: 682

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1