Android to single board computer over serial error

I am trying to open a serial port on Android to communicate with a single board computer.
I load the Unity application on Android. I do the set up and it seems to work fine.

stream = new SerialPort(“COM4”, 9600);

No error so far.
But when I try to open the stream:

	try{
		if(!stream.IsOpen){
			stream.Open();
		}
	}catch(Exception f) {
		myText.text = f.Message;
	}

I get MonoPosixHelper exception
I have seen some posts on this, but I haven’t seen anybody resolve it yet.
Does anybody have any suggestions? Developed in Unity 5.3 and running on Android. I have tried it on
several different boards, Arduino, Pi, etc. etc. all the same error.
I do have .Net2.0 turned on, turned off .Net2.0 subset in player settings.

Thanks

I also have tried ttySo, ttyS1…com1, com2…etc. etc. That could be part of my problem I’m not sure which com port to use. I printed the available serial available and got ttyS0 …to…ttyS3…but none worked.

Next, I’m going to try to program an Android Plugin and see if that works…but would really like to know if anybody has got this working or knows my problem.

Thanks
absorkam

I am same as you…
do you know what happened?
if you get answer,please tell me,thank you very much
pengyuenhao@qq.com

be friends ,will?

This may be a valid workaround:

  1. Export Unity Project as Google Android Project.
  2. build libmono.so with the same version of Android Studio that make serial io work
  3. Replace libmono.so in the Google Android Project

Anyone can confirm if this is posible? @absorkam? @pengyuenhao?

It might be raising a DLL not found exception. Basically the version of .NET 2.0 running on Android doesn’t include the SerialPort class… Though why that’s the case, I don’t know.

Currently trying to figure out what the problem is.