In experimenting with FreeBASIC I find Open COM activates DTR on open, and I can control the width of that pulse with a later command to de-assert DTR, but I cannot find a way to avoid that initial assert ?
Ideally, I want to connect to a port and some time later assert DTR
I have C and Pascal pgms that can open serial without this effect, so I know it is possible. ie not a HW or Windows dictate
The change log has only this single mention of DTR, way, way, back in Version 0.17 Beta:
- Serial driver on windows was not setting DTR high when opening the device (jeffm)
Some may want this feature, but it would be more useful to have user control over this at open com time ?
Open Com activates DTR, how to avoid ?
Re: Open Com activates DTR, how to avoid ?
Simple, you go and read FB-Manual: Open Com (statement).
Scroll down to the "extended_options" (table).
Scroll down to the "extended_options" (table).
Re: Open Com activates DTR, how to avoid ?
Not quite. Those options do not control the assert of DTR, they only control the default width.MrSwiss wrote:Simple, you go and read FB-Manual: Open Com (statement).
Scroll down to the "extended_options" (table).
What I am looking for is a way to not assert DTR at all, on open. DSn does not provide that.
Re: Open Com activates DTR, how to avoid ?
In the win32 API you can control this with SetCommState. But you need a handle to an open port before you can use SetCommState... so I'm not sure how it would be possible. What if you open the port as write-only??