I have Xamarin PCL project and I try to read from serial port in Android part ("/dev/ttyS2") . When I try use SerialPort from System.IO.Ports I'm getting exception:
System.PlatformNotSupportedException: System.IO.Ports is currently only supported on Windows.
I also tried use SerialPortLib but I'm getting another exception:
System.TypeLoadException: Could not load type of field 'SerialPortLib.SerialPortInput:serialPort' (1) due to: Could not resolve type with token 01000002 (from typeref, class/assembly System.IO.Ports.SerialPort, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) assembly:System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type:System.IO.Ports.SerialPort member::
What is the best solution for reading from serial port in Xamarin Android?