Skylare Posted May 31, 2017 Report Posted May 31, 2017 Hello, we have managed to integrate .NET driver to our mobile application running on the Xamarin.Android platform. When debugging the application it works just fine. The app is sending commands to the PLC. But when we try to package the app (Archive it) in a APK file, suddenly the app reports errors whenever it tries to communicate with the PLC. Error message is: Cannot communicate with the PLC with the specified UnitId! The app has all the required permission in the manifest file (INTERNET, WIFI_ACCESS, etc.). I have discovered that it has something to do with the mono shared runtime. If the app has build options "Use shared runtime" and "Fast deployment" checked, it works flawlessly. The problem is - You Cant use those settings when you want to release the app and deploy it to Android device. Note: It has nothing to do with network, thats fine. Also its not relevant to UnitID in any way. We have also tested setting PLCFactory.WorkWithXmlInternally = true; Again, with no luck.. Could somebody from the developer team please help me with this issue? I've tried to contact the support, but with no luck. Thanks a lot, Jan
Saragani Posted June 4, 2017 Report Posted June 4, 2017 Hi, We had similar problems when we developed the Remote Operator for mobile. We have found out that the communication driver must be a Portable Library project. Please try it.
dva Posted March 11, 2021 Report Posted March 11, 2021 @Saragani i have the same Probleme and try to solve it the way you mentioned. but i have Problems with referencing System.net.sockets in the portable Library. How did you solve this problem?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now