Virtual COM Port in windows

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello guys,
i have an AVR connected to COM1 and another one in COM2..

i want to make a program in Visual Basic, it will create a Virtual COM3 and any programm in Windows could connect to COM3.. the data will be taken from COM1 or COM2 its not our point...

The question is how i Implement a Virtual serial COM Port (Virtual Uart) in windows using API maybe? or ActiveX? i need source code because i will implement my own software

i have found commercial programms but i need free and SOURCE code not compiled.

Thank you for your time!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kostas,

I can't specifically help with the virtual comport, but if you plan on using the COM3 port as your virtual comport, you will have to go into the machine's BOIS and disable the MODEM hardware, as most MODEMS use COM3. In addition, you will have to disable the MODEM drivers assigned to COM3 in windows ControlPanel. If you don't, you will have unexplainable problems with your operating system and the application you are trying to empliment.

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

KostasTheGreat wrote:
i want to make a program in Visual Basic, it will create a Virtual COM3...

As far as I understand it (which, admittedly, is probably not that far at all) this is not a job for Visual Basic.
I think you'll find that creating virtual ports means creating your own driver - ie, getting into the very internals of the Windoze Driver Model.

Quote:
The question is how i Implement a Virtual serial COM Port (Virtual Uart) !

Maybe a better question would be, Why do you feel the need for a Virtual COM Port?
Maybe if you explained what you're actually trying to achieve, someone could make an alternative (possibly better) suggestion...?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Let me guess... FTDI USB -> Serial or FTDI USB -> Parallel.

Speaking of FTDI, has anybody seen the new FTDI USB -> TTL single chip solution? I have ordered 10 of these babies from Parallax to evaluate them for use in my next project..

You can avoid reality, for a while.  But you can't avoid the consequences of reality! - C.W. Livingston

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I assume you use FTDI or similar..

The FTDI driver generates an Virtual Com Port.

To acces to it via VB you need the VB Professsional version. Select at the COMPONENTS the MSCOMM.

add the MSCOMM icon to your form.

write the software. (select the Port number, and MSCOMMx.portopen = true)

Klaus
********************************
Look at: www.megausb.de (German)
********************************