Change BaudRate on Condition

Joined
Mar 18, 2008
Messages
1
Reaction score
0
In my task I have to change the baudrate after having a specified string received but send an ACK before.
I'm trying to do this by placing the following line into "private void DataReceived":
this.Invoke(new EventHandler(Change_BaudRate));

Where Change_BaudRate closes the port, reconfigures and reopens it.

BUT the program crashes at the change, I guess because it is illegal to "call" a method that closes the port on DataReceived event.

I can't figure out how to do this,
thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top