 |
|
|
Topic: RTSenable seems not to work during run-time
|
By: Marcel | Posted on: Jan 11 2016 at 03:31:27 PM | I need to use the RTS line in a certain application.
If I set the .RTSenable property during design time in VB6, the line does change
as soon as I open the port in run-time.
Changing the value of .RTSenable during nothing happens and the line will remain in the state that was choosen during design time.
Am I overlooking something? | |
By: Marcel | Posted on: Jan 12 2016 at 11:54:41 AM | To add some additional info, I'm using Win 10, VB6 and a Microchip MCP2200 as a USB to UART bridge. I have checked if I can toggle the RTS line on a Win XP machine with the original MSComm32.ocx and that is working. Using the sComm32.ocx, I cannot toggle RTS. So in other words, it is not working in Win 10 or Win XP.
I have upgraded another project in Win10 with your sComm32 and that is working great. But that one just uses standard no-handshake bidirectional comms. If you have a solution, I will definitely buy the full version.
Kind regards, Marcel | |
By: Support | Posted on: Jan 12 2016 at 10:00:22 PM | Thank you Marcel. We're not aware of any problem with the RTSEnable property.
Do you have any other type of serial port that you can do the same test with? If it only fails with the MCP2200 then we'd take a closer look at that device.
| |
By: Marcel | Posted on: Jan 13 2016 at 06:00:25 PM | Hi Support, thanks for looking into this. I have a few different USB-UART bridges laying around, so I will test these.
One of them is the popular FTDI cable. The MCP2200 uses the standard USBSER.sys driver by the way.
Will let you know in a few minutes... | |
By: Marcel | Posted on: Jan 13 2016 at 06:47:50 PM | Ok, I just check the FTDI cable. .RTSenable works like a charm. Also used Realterm to double check.
Used another (el-cheapo) USB-UART adapter and that one worked fine as well. Both with .RTSenable and Realterm.
However, I double checked the MCP2200 again. And this one is not working with Realterm either...
Weird thing is that it is working on an XP machine with the original Comm32.ocx.
Hmmm... I'm going to experiment a bit more. | |
By: Marcel | Posted on: Jan 13 2016 at 07:10:59 PM | Got it working now. I have to set both .RTSenable AND .DTRenable to change the RTS state.
Seems to be a known issue in the USBSER.sys driver.
So I guess both the FTDI and el-cheapo cable I checked have different drivers... | |
By: Support | Posted on: Jan 13 2016 at 08:57:53 PM | Thank you Marcel for testing that with a few different USB devices.
Good to know it works correctly with other adapter and the problem seems to be something in the MCP2200 drivers.
| |
By: Marcel | Posted on: Jan 13 2016 at 09:27:01 PM | You're welcome! Well, Microchip does use the Microsoft USBSER.sys and that is where the problem is.
The bug seems to be there since 2011...
Here's the link.
Link
| |
By: Guest | Posted on: Jan 14 2016 at 09:39:54 PM | When you insert a USB/RS232 adapter windows will usually detect it and install device drivers.
In many cases the device driver installed by windows is wrong. Not sure if its because windows detects the device incorrectly or simply because microsoft has duff driver.
In any case i would always recommend going to the manufacturer's website and getting the latest device drivers from there instead of relying on the one installed by MS | |
By: Pierre | Posted on: Jan 20 2016 at 08:57:18 AM | Thanks a lot Marcel !
I'v been stucked for a long time trying to make and arduino board working together with VB6 on Windows 10. And you provided me the way to the solution.
The issue concerned only boards using an Atmega 16U2 on the USB, while it worked perfectly on any other board with FTDI chip or even the chinese one CH340G. By the way it also worked on versions of Windows up to 8.2 with previous usbser.sys. But in W10, usbser.sys was "re-written"...
On this only board (16U2) MSCOMM32 does no work at all, while SCOMM32 seems to send no data.
Solution:
Both RTSenable AND DTRenable are set true at design time, and return to false as soon as the port is opened. And it does the job great !
| |
|