I have a GrovePi board, attached to my Raspberry PI 2. I want to read the GPS sensor, using the RPISER port on the GrovePi in my Universal Windows App (Windows 10 IoT Core), but it fails with the following exception:
System.ArgumentException: The given port name does not start with COM/com or does not resolve to a valid serial port. Parameter name: portName at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate, Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32 writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable, Boolean discardNull, Byte parityReplace) at System.IO.Ports.SerialPort.Open() at Nebulus.IoT.Gateway.GrovePiBridge.StartupTask.d__1.MoveNext()
I tried with all COMx (1-10) combinations, but have the same exception every single time.
This is the code I use. Any idea on the issue? (I have enabled serial port communication in the app manifest)
SerialPort sp = new SerialPort("/dev/ttyAMA0", 115200, Parity.None, 8, StopBits.One); sp.Open();