Home > Net >  C#.NET, a serial port to send data
C#.NET, a serial port to send data

Time:03-25

To send data: byte [] arrSendData byte []=https://bbs.csdn.net/topics/new
X12 {0 x10, 0 x02, 0, 0 x00 to 0 xf8, 0 x00 to 0 x00 to 0 XFF, 0 XFF, 0 x03, 0 x00 to 0 x00 to 0 x01, 0 x04, 0 x00 to 0 x00 to 0 x40, 0 x1f, 0 x00 to 0 xa8, 0 x02, 0 x00 to 0 x10, 0 x03, 0 x31, 0 x39};
2. Use a serial port debug the received data

So the two do not match the data completely, this is what causes excuse me????????????????

3. I use a serial port debugging to send data: byte [] arrSendData=https://bbs.csdn.net/topics/new byte []
X12 {0 x10, 0 x02, 0, 0 x00 to 0 xf8, 0 x00 to 0 x00 to 0 XFF, 0 XFF, 0 x03, 0 x00 to 0 x00 to 0 x01, 0 x04, 0 x00 to 0 x00 to 0 x40, 0 x1f, 0 x00 to 0 xa8, 0 x02, 0 x00 to 0 x10, 0 x03, 0 x31, 0 x39};
4. Use a serial port debug the data received and sent the same,
So trouble great spirit action

CodePudding user response:

1. Please make sure your parameters configuration is consistent (baud rate, parity, data bits, stop bit)
2. Please send your post code

CodePudding user response:

You have not set baud rate right, should be this reason, both sides to the same baud rate,

CodePudding user response:

See with ODD check for the first time, I have seen None and even,,,

CodePudding user response:

Found the reason, thank you

CodePudding user response:

reference 1st floor wanghui0380 response:
1. Please make sure your parameter configuration consistent (baud rate, parity, data bits, stop bit)
2. Please send your post code
to ask a question, how to judge the data sent out, and accept, when you don't then receive returned to go wrong, and at least more than 1 second delay, have a faster way?
  •  Tags:  
  • C#