Click here to Skip to main content
16,017,015 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
In one of our applications we provide a facility to user to transfer a file via serial port.
Every thing works fine when we use a RS232 to RS232 connection
But when we carry out the operation using a USB to RS232 converter, we observe the following
1. Number of retries in the operation become high
2. At higher baud rates there is no change in the time taken for data transfer
Is there any special provision we need to make to handle this issue
Posted

1 solution

I often use an External USB to RS232 Converter to control products with RS232 connections and I haven't noticed any problems. I use the same comms routines (using WriteFile and ReadFile) as when it is connected via RS232 directly. I can't comment on the baud rate as I use a fixed rate but I have not noticed any problems with retries.

I have the comms set to 1 stop bit, no flow control, not overlapped * baud 38400. These are the timeout settings that I use:-
MIDL
CommTimeOuts.ReadIntervalTimeout=50;
CommTimeOuts.ReadTotalTimeoutMultiplier=1;
CommTimeOuts.ReadTotalTimeoutConstant=50;
CommTimeOuts.WriteTotalTimeoutMultiplier=1;
CommTimeOuts.WriteTotalTimeoutConstant=1;


Hope that helps :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900