Virtual comm port

Hello,

I wrote a simple program in VBA to communicate with an Arduino on a USB serial port.

No problems there it worked fine.

Then I attached an xBee adaptor. I had to load FTDI drivers, but I got the xBee to connect with HyperTerminal and communicate with another xBee, so no problems so far.

Then I went back to my VBA program and tried to open the port the xBee adapter was attached to and got an error message 8002: Invalid Port Number.

It appears that the port is now a Virtual Comm Port after the installation of the FTDI drivers.

Why won't VBA communicate with the port ? Is there a workaround ?

Then I attached an xBee adaptor.

Which one? How?

I had to load FTDI drivers

For what? The XBee doesn't need FTDI drivers.

Then I went back to my VBA program and tried to open the port the xBee adapter was attached to and got an error message 8002: Invalid Port Number.

What port would that be? What code generated that error?

OK I found the problem.

The MSCOMM control only allows com port numbers up to 16. The FTDI drivers created COM21 that was attached to the xBee adapter.

The solution is fairly simple. Find a hex editor and hack the mscomm32.ocx file.

See

"For what? The XBee doesn't need FTDI drivers."

All I know is it didn't work before I loaded them, but did afterwards.

Before I loaded them the xBee appeared as an "Other device" RT232 UART or something, can remember exactly what. After I loaded the FTDI drivers from the Arduino installation it turned this into a USB Com port.

Make sense ?