Go Down

Topic: Two software using the same serial port (Read 2342 times) previous topic - next topic

nadabro

Hi..

I want to receive the Arduino serial data with two different softwares, just receive not sending. Is there a software/freeware (preferable freeware :) ) which allow two different softwares using the same com port from the Arduino?

Thanks

cmiyc

You need something to act as a virtual serial port, since most operating systems only let one process use the real one at a time.

Depending on what software you are trying to connect, "serproxy" might work for you.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

mowcius

Most software can't do this unless you pay for an upgraded version etc.

I'd be interested if you find one.

cmiyc

For what it is worth, google search of "virtual serial port" took me to wikipedia, which lead me to this open source project:

http://com0com.sourceforge.net/
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

nadabro

#4
May 14, 2011, 05:04 pm Last Edit: May 14, 2011, 05:08 pm by nadabro Reason: 1

For what it is worth, google search of "virtual serial port" took me to wikipedia, which lead me to this open source project:

http://com0com.sourceforge.net/


Thats the solution :)

It´s a bit tricky, but i managed to get it working, i now its not the correct way..but its a good start point.

Download
com0com-2.2.2.0-x64-fre (x64)
or
com0com-2.2.2.0-i386-fre (x86)

In Windows7 x64, you need to enable test signing in cmd, restart.
Code: [Select]
bcdedit.exe -set TESTSIGNING ON

Install it..windows will install the drivers automatically.

-Start Setup in Com0Com under Windows Startup menu
-In Virtual Port Pair 0, Enable Baud Rate for both
-Add a new Pair (enable baud rate for the new pair too)

-Start cmd (windows dosbox), go to Hub4Com folder..type "hub4com" for help in command list.

In my case, i want to redirect the data sent by the Arduino for two software at the same time..
Code: [Select]
hub4com --route=0:ALL --baud=57600 \\.\COM3 --baud=57600 \\.\CNCA0 --baud=57600 \\.\CNCA1
Keep the cmd window always open

-Start Software1..choose  CNCB0 port
-Start Software2..choose CNCB1 port


*Using that command, i´m routing the COM3 data to CNCA0 and CNCA1, but i receive the data from CNCB0 and CNCB1 ports..
*hub4com always use 19200 baudrate has default, you have to set your correct baudrate for each port in the command..

Go Up