Board index » Visual Studio » Changing Serial Baud Rates

Changing Serial Baud Rates

Visual Studio317
I've got a remote Bluetooth device that I'm trying to connect to, but its

baud rate will be unknown when the application starts.



There are only 5 baud rates that I can select from, so I can try each in

succession until I get a response.



What needs to be done on my end to change a baud rate?



On HyperTerminal, whenever I change a baud rate in the settings, I have to

close HyperTerminal and reopen it in order for those settings to take.



Should my code disconnect/reconnect (i.e. CloseHandle/CreateFile), or is

SetCommState all I need?



Thanks for your help!

~Joe


-
 

Re:Changing Serial Baud Rates

SetCommState will work without closing and reopening the handle.



Hyperterm will not allow you to change the baud rate while connected. You

have to disconnect if already connected, change the Baud rate, then connect,

but the HyperTerm application should not need to be closed and reopened.



Okie



"jp2code" wrote:



Quote
I've got a remote Bluetooth device that I'm trying to connect to, but its

baud rate will be unknown when the application starts.



There are only 5 baud rates that I can select from, so I can try each in

succession until I get a response.



What needs to be done on my end to change a baud rate?



On HyperTerminal, whenever I change a baud rate in the settings, I have to

close HyperTerminal and reopen it in order for those settings to take.



Should my code disconnect/reconnect (i.e. CloseHandle/CreateFile), or is

SetCommState all I need?



Thanks for your help!

~Joe







-