I need to stream serial data to and from a C# Windows PC application at 2-3 mbps. C# winforms doesn't seem very happy with it.
openFileDialog.Filter =
@"Image Files(*.bmp;*.jpg;*.jpeg;*.gif)|*.bmp;*.jpg;*.jpeg;*.gif|All files (*.*)|*.*";
if (openFileDialog.ShowDialog() != DialogResult.OK) return;
var image = Image.FromFile(openFileDialog.FileName);
serialPort1.Open();
// Now send the image at 2-3 mbps
...
BaudRate = 115200 works. BaudRate = 230400 causes System.IO.IOException.
Open up device manager and expand out "ports".
double click on COM1 and go to the "Port Settings" tab
Under "Bits per second" lists values you can enter in the proprieties field for your com port. If you want higher than what your hardware allows you need other hardware or use something other than a serial port to transfer between the two devices.
If you would post in the comments what is the other device you are connecting to, we may be able to suggest a better way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With