Skylare Posted May 31, 2017 Report Share 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 Quote Link to comment Share on other sites More sharing options...
Saragani Posted June 4, 2017 Report Share 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. Quote Link to comment Share on other sites More sharing options...
dva Posted March 11, 2021 Report Share 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.