none
Access Serial Port

    Question

  • Hello 

    I am working on serial port i am using this code but i cant receive data received signal.

                    serialPort2.Open();
                    serialPort2.Handshake = Handshake.RequestToSendXOnXOff;
                    byte[] data = HexStringToByteArray("0230D0313030313030305203");
                    serialPort2.Write(data, 0, data.Length);

                    serialPort2.DataReceived += new SerialDataReceivedEventHandler(serialPort2_DataReceived);

     Thnx for advance 

    Thursday, December 20, 2012 11:01 AM

All replies

  • Hi Mohammad khizar hasan,

      Welcome to MSDN Forum Support.

    You are more likely to get more efficient responses to .NET Framework Networking and Communication issues at http://social.msdn.microsoft.com/Forums/en-us/netfxnetcom/threadswhere you can contact .NET Framework Networking and Communication experts,so I would like to redirect you to appropriate forum for better responses.

      Sincerely,

      Jason Wang

      

    Jason Wang [MSFT]
    MSDN Community Support | Feedback to us

    Friday, December 21, 2012 2:53 AM
  • Do you use a blocking method in the DataReceived method?  Does it timeout?  What is the value of ReadTimeout?
    Friday, December 21, 2012 5:31 AM
  • no idont use a blocking method ReadTimeOut is 1000
    Friday, December 21, 2012 12:22 PM
  • no idont use a blocking method ReadTimeOut is 1000
    How do you know the DataReceived event isn't firing?
    Friday, December 21, 2012 1:00 PM
  • in debug mode ididnt get any response
    Sunday, December 23, 2012 10:53 AM
  • "no idont use a blocking method ReadTimeOut is 1000"

    "How do you know the DataReceived event isn't firing?"

    "in debug mode ididnt get any response"

    I didn't either.

    Sunday, December 23, 2012 10:57 AM