mfc >> USB-to-serial converter problem

by Mike Shride » Thu, 27 Nov 2003 02:45:25 GMT

I have a program that receives up to 200K of serial data. To do this I
enabled "automatic" hardware handshaking by setting DCB.fRtsControl =
RTS_CONTROL_HANDSHAKE and DCB.fOutcCtsFlow = TRUE. When DCB.fRtsControl is
set, the serial port driver automatically raises the RTS signal to show that
my program is ready to receive data.

This works correctly with a normal serial port. However, when I try to use
my new USB-to-serial converter (IOGEAR GUC232A) the RTS signal is _not_
raised by the USB driver and consequently the external device thinks that my
program is not ready to receive data.

Is this normal behavior for USB-to-serial drivers? Does anyone know of a
USB-to-serial converter that behaves exactly the same as a normal serial
port?

BTW, I have the same results whether I use RTS/CTS or DTR/DSR handshaking.

Thanks,
Mike





mfc >> USB-to-serial converter problem

by Matt Claessen » Thu, 27 Nov 2003 05:19:04 GMT


Hi,



I have used a Keyspan 4 port USB to serial converter (USA-49WLC).
It supported all hardware handshaking lines in the serial interface.
Our application really needed these lines, because it used them to
control some device.
I could not get confirmation from Keyspan before buying, so I
took the chance of wasting the money.
It worked perfectly, however.
Another example of a product being much better than its sales
or support.

regards, Matt





mfc >> USB-to-serial converter problem

by Mike Shride » Thu, 27 Nov 2003 07:12:16 GMT

Matt,

Most all USB-to-serial converters claim to support hardware handshaking.
But there is a big difference between supporting "automatic" serial
handshaking versus "software" serial handshaking. I need a converter that
supports "automatic" handshaking.

Thanks,
Mike





USB-to-serial converter problem

by Matt Claessen » Thu, 27 Nov 2003 18:15:51 GMT

Mike,

Can't you just toggle the line yourself then, with EscapeCommFunction ?
Since these devices are primarily targeted at Mac users besides Windows
users, I think you will have a very hard time getting the exact capabilities
from the sales people.
You expect not only hardware compatibility, but also exact Windows driver
emulation. That seems like a tall order.
I could not even get these people to confirm any hardware line
compatibility, they probably didn't know what I was talking about. Their
device was RS-232 compliant and that was it!

regards, Matt




USB-to-serial converter problem

by Mike Shride » Thu, 27 Nov 2003 23:41:11 GMT

Matt,


I could - but I'd have to rewrite my worker thread to detect when the input
buffer starts to fill up, or empty out, and that sounds like a lot of extra
work to me. And to be honest I haven't looked at any code that manually
toggles the line to control handshaking. I just figured it would be easier
to ask the question first.

Actually, that brings up another point. I wonder if there is any way to
determine if a COM port is a "real" COM port or a USB emulated COM port.

Mike






USB-to-serial converter problem

by Matt Claessen » Fri, 28 Nov 2003 03:46:08 GMT

Hi,,



That's a tough one.
Depends on how good the emulation is.
The ports are enumerated in HKLM\hardware\devicemap\serialcomm
However, that included the virtual ports in my setup.
You could check whether the virtual ports are also included in e.g.
HKLM\hardware\description\system\multifunctionadapter\5\serialcontroller\0
where 5 stands for ISA in my machine.
Chances are that only the real ports are listed under ISA.

Sorry I can't be of more help, I don't have the Keyspan device anymore.

Good luck!

regards, Matt




Similar Threads

1. USB-to-serial converter problem

I have a program that receives up to 200K of serial data.  To do this I
enabled "automatic" hardware handshaking by setting DCB.fRtsControl =
RTS_CONTROL_HANDSHAKE and DCB.fOutcCtsFlow = TRUE.  When DCB.fRtsControl is
set, the serial port driver automatically raises the RTS signal to show that
my program is ready to receive data.

This works correctly with a normal serial port.  However, when I try to use
my new USB-to-serial converter (IOGEAR GUC232A) the RTS signal is _not_
raised by the USB driver and consequently the external device thinks that my
program is not ready to receive data.

Is this normal behavior for USB-to-serial drivers?  Does anyone know of a
USB-to-serial converter that behaves exactly the same as a normal serial
port?

BTW, I have the same results whether I use RTS/CTS or DTR/DSR handshaking.

Thanks,
Mike



2. Serial to USB - software converter

3. (OT) ISO a serial (RS232) to USB converter

Hello out there,
needing to access multiple RS232 lines at the same time we tried out
an USB to serial adapter (under XP). The requirements are not earth
shaking: Connect to a modem at 9600 Baud, 8N1, dial out and then
communicate with a device in the field.

The problem is: Communication does work at times but not always. It
could of course be a problem in my software, but since using COM1 and
COM2 works reliably, the thought occurred that the USB devices might
be at fault.
I replaced the device in question - only to find out that both seem to
come from the same vendor (Hardware Manager reports them both as
'Prolific USB to serial converter' - cited from memory, since I am
currently at a different location).

My question is: Did anyone have better experiences with an USB to
serial adapter from a different vendor?
Any hints or links will be greatly appreciated.
Best regards
Helmut Giese

4. USB to serial on USB Host of Windows Mobile - Windows CE

5. USB-WiFi adapter problem with serial communication!

Hi ctacke,
Thanks for the help. I use OHCI. Would you recommend using EHCI?
Do I need to change OHCI's code or what should i do to solve this?
Thanks...

"<ctacke/>" wrote:

> Sounds like a problem with the host controller driver.
> 
> 
> -- 
> Chris Tacke - Embedded MVP
> OpenNETCF Consulting
> Managed Code in the Embedded World
> www.opennetcf.com
> --
> 
> 
> "bunymn" < XXXX@XXXXX.COM > wrote in message 
> news: XXXX@XXXXX.COM ...
> > Hi friends!
> > I can use USR5421 USB-Wifi adapter and RS232 serial communication(with no
> > data missing problem) independently. But when i use them together I miss 
> > data
> > from the serial port.
> > Even if I do *nothing* with the adapter(no code related with wifi is used 
> > in
> > program, only that the adapter is in usb slot and the WZCConfig window is
> > open), this problem persists.
> > There is no problem with memory usage or processor(I looked the change 
> > when
> > i inserted the card but no big difference is shown on performance 
> > monitor).
> > WZCConfig is enabled and setting timeouts to infinite also doesn't help...
> > My system is ICOP6071 card with WinCE 5.0.
> >
> > Any suggestions please... Thanks... 
> 
> 
> 

6. usb to serial adapter problem

7. USB->Serial Ports

Anyone have any experience working with USB->Serial adapters??

Yes, some of us, like me, still need Serial ports!!! Drives me nuts
that it is almost impossible to still get a high end motherboard these
days that has a built in serial port...

I just found out yesterday though, using my serial boot loader for my
embedded work, that it didn't want to talk to my development board.

My boot loader is nothing more than small console C# app that first
transfers a boot loader program, syncronizes with the board, then
transfers the real program via the previous loaded boot loader app.

Nothing complicated really..works flawlessly too with an actual real
com-port.

But this USB-Serial adapter, no go...after playing around with it a
bit, figured out the following:

Sending the initial 2kb image 1 byte at a time..bad
Sending the entire 2kb in one single Write call...works..
Fine...I can live with this.

But then comes the synchronization code which has to send a single
byte back and forth for a handshake...

After playing with it I ended up having to put a 600ms delay before
sending a byte and then a 1ms delay after receiving it for things to
work!

So basically..

Wait 600ms
Send Byte
Wait 1ms
Receive byte

For this bootloader, I can live with it and things are working.

But, occasionally I actually do still have need for real-time
communication via a serial port, and having to put in such waits would
be extremely bad!

Using the System.IO.Ports.SerialPort class to do this...

Any one have any idea if there is anything I can do from the C# code
end to not need those waits? Or is it just a badly written driver for
the USB adapter and there's nothing I can do?

Thanks,

kimi no koto omoidasu hi nante nai no wa
kimi no koto wasureta toki ga nai kara

8. USB serial port - CSharp/C#