Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to use a serial port at 2-3 mbps?

Tags:

c#

serial-port

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.

enter image description here

like image 985
jacknad Avatar asked Dec 01 '22 08:12

jacknad


1 Answers

Open up device manager and expand out "ports".

enter image description here

double click on COM1 and go to the "Port Settings" tab

enter image description here

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.

like image 103
Scott Chamberlain Avatar answered Dec 02 '22 21:12

Scott Chamberlain