Question SerialPort.Write more than 64 bytes

tnn

New member
Joined
Oct 17, 2019
Messages
2
Programming Experience
10+
Hi,

a kindly confirmation ...

with this code can I send more than 64 bytes?

VB.NET:
SerialPort1.Write(CommandByte, 0, CommandByte.Length)
 
Yes, WriteBufferSize defaults to 2048 bytes, and default BaudRate 9600 bits means 1200 bytes can be transmitted per second. Compare that with your actual communication properties.
 
One of the best ways I know to troubleshoot or test serial communications is to (if your PC has two serial ports) use a null modem cable. Connect the null modem cable to each of the two ports on your PC and then test I've coded and played around with serial communications using vb.net and a null modem cable. The basic stuff I did (sending and receiving text) worked extremely well. Well above the 64k you mention.
 
Back
Top