Are serial events with Mono 2.6 supported?

I’ve been trying to find out whether Mono 2.6 that will be coming with Unity 4.x supports serial events (RS-232). The current mono version doesn’t support events, rather you need to use polling to snag the data coming in. Some details off the mono site:

http://www.mono-project.com/HowToSystemIOPorts

I did find on the Unity compatibility page:

Class: SerialDataReceivedEventArgs (namespace System.IO.Ports, assembly System)

I’ve been trying to dig around and find out whether this means the new Mono version supports the events. Does anybody familiar with Mono 2.6 know whether events are supported now?

Thanks,
Kyle

With 4 out and some extra time, I came back to trying to get events working with serial.

As mentioned above, the Namespace System.IO.Ports section of the Mono Compatability docs page seems to be telling me that all of the serial port aspects are supported. (Green for 2.0 means supported correct?)

using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.IO.Ports;
using ControllerInterface;

void Awake()
{
	try
	{
		SerialPort comPort = new SerialPort("COM2", 115200, Parity.None, 8, StopBits.One);
		comPort.ReadTimeout = 500;
		comPort.ReceivedBytesThreshold = 1;
		comPort.DataReceived += new SerialDataReceivedEventHandler(comPort_DataReceived);
	}
	catch (Exception e)
	{
		Debug.Log(e.ToString());
	}
}

void comPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
	
}

This throws an exception:

System.NotImplementedException: The requested feature is not implemented.
at System.IO.Ports.SerialPort.set_ReceivedBytesThreshold (Int32 value) [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.IO.Ports.SerialPort:set_ReceivedBytesThreshold (int)

Is this an issue with mono 2.6 still not supporting these, or some other setting I’m missing somewhere? As far as player options that I have for the windows deployment, it remains 2.0 and 2.0 subset.

Hi,

Did you fix this? i have the same issue.