Search Unity

why don't serial ports work properly in unity?

Discussion in 'Scripting' started by patricioaljndro, May 3, 2015.

  1. patricioaljndro

    patricioaljndro

    Joined:
    Mar 6, 2014
    Posts:
    12
    Greetings.

    I need help, I'm desperate

    During two weeks I have been working in my project, this uses serial port communication (a PIC serial board), I got to set the connection but i can not get data from the com port . I've read some forums and the cause of the problem seems to be a incomplete implementation of "System.IO.Ports" class.

    When i try to get data of the COM port, the event "SerialDataReceivedEventHandler" (Represents the method that will handle the DataReceived event of a SerialPort object.) is not called or activated. I tried to resolve it but I don't find a definitive solution. I thought to prove a external DLL but a friend told me that the problem will go on also someone recommended to me use a secondary thread although I don´t understand how to do it at all.

    I wrote a program in visual c# and everything works fine. I'm intrigued :eek:.

    I need to find a solution , some idea or good documentation.

    If there's someone knows something about it, help me please.

    I need to understand the cause of this to continue.

    Thanks for read.