EMX Dev-Board Com-2 | Optical-probe issue

Hi, I want to run a optical probe in the com-2 port off my emx-dev-board.

Thats the optical probe:

The problem is, when I plug the probe in the rs232 (com-2) port of the dev-board nothing happends, no power, nothing.

The probe should work with 3.3V so it should work. It is passively powered by the DTR and/or RTS signal.

Hope any one can help me.

Best regards

Did you try to instantiate SerialPort in the code?

The RS232 connector on EMX dev board does not support pin 4 DTR.

There might be an issue with the power driving capabilities of the RTS pin.

My Code is following:

using System.IO;
    using System.IO.Ports;
    using GHIElectronics.NETMF.Hardware;
    using GHIElectronics.NETMF.IO;
    using Microsoft.SPOT;
    using Microsoft.SPOT.Hardware;

    public class Program
        internal const int bufferSize = 256;
        internal static PersistentStorage storage;
        internal static FileStream writerFile;
        internal static byte[] buffer = new byte[bufferSize];
        internal static SerialPort com2 = new SerialPort("COM2");
        internal static string data = string.Empty;

        public static void Main()
            if (PersistentStorage.DetectSDCard())
                storage = new PersistentStorage("SD");

                InputPort button = new InputPort(EMX.Pin.IO30, false, Port.ResistorMode.PullUp);


                writerFile = new FileStream("\\SD\\powerLog.txt", FileMode.Append);

                com2.DataReceived += new SerialDataReceivedEventHandler(com2_DataReceived);
                com2.ErrorReceived += new SerialErrorReceivedEventHandler(com2_ErrorReceived);


                byte[] test = System.Text.UTF8Encoding.UTF8.GetBytes("/?!\r\n");
                com2.Write(test, 0, test.Length);

                while (button.Read() == true)




        static void com2_ErrorReceived(object sender, SerialErrorReceivedEventArgs e)

        static void com2_DataReceived(object sender, SerialDataReceivedEventArgs e)

            int byteRead = 0;

            byteRead = com2.Read(buffer, 0, bufferSize);
            writerFile.Write(buffer, 0, byteRead);

Like Mike says the pin 4 is always low, thats my problem. Is there a workaround, or whats the problem?

Best regards

I am not sure if it was fixed in MF 4.2, but with 4.1 you have to register for serial port events after you have opened the port.

Ok, but this doesn’t change the fact that pin 4 (DTR) is all the time low. Is there a way to geht it manualy high? Is it connected, the schematic confuses me a bit, pin 4 (DTR) looks like a input pin and not outgoing.

Best regards

According to the schematic for V1.3 of the EMS development system, pin 4 of the X1, the RS232 connector , is not connected to anything.

You could solder a jumper wire between pin 4 and and the 3.3v

Mike, thanks, your solution worked!

Best regards