SerialProxy v0.1.4 can use COM ports above 9

SerialProxy (aka serproxy.exe) v0.1.3 or lower cannot use COM ports above 9 on Windows (due to a weird syntax issue in Microsoft’s API). If, like me, you ever faced that same problem, there was no easy solution… until today !

Important update : I believe the fix to the issue discussed here has been integrated in the latest version of TinkerProxy. TinkerProxy 2.0 is an update to SerialProxy 0.1.4 (serproxy.exe). It works in the same way as did serproxy.exe and uses the same configuration syntax. From now on, please use TinkerProxy 2.0.

I looked all over the web for a solution to this problem. I first found the source code and a hint at a solution on an Arduino forum post. However, I could not successfully patch and re-compile the linked source code until a fellow Arduino enthusiast clued me in to the fact that one of the Visual C++ project file was erroneously using Unix line-endings. Fixing that made it possible to patch and compile the original C code using Microsoft’s Visual C++ Express 2008.

The result, which I am making available in this post is SerialProxy v0.1.4. Using that version, you can specify COM ports greater than 9 the same way as usual. Here is an example serproxy.cfg file:

comm_ports=11,12
net_port11=5331
net_port12=5332

comm_baud=57600
comm_databits=8
comm_stopbits=1
comm_parity=none

timeout=300
newlines_to_nils=false

Shall you ever want to play with it, I am also providing the revised C source code. You will find a Visual C++ Express 2008 project file in the win32 folder.

If you would like to prevent the FTDI VCP driver from creating new COM ports each time it encounters a new Arduino, you can check my other post entitled SerialProxy vs COM10 : The ultimate deathmatch.

Please note that I am not affiliated with the original serproxy project at all. It was originally (1999) developed by Stefano Busti and later (2005) updated by David A. Mellis. However, since the project seems to now be abandonware and is GPL-licensed, I took the liberty of making it available here for those it could help (like me).

Hope it helps you too.

8 comments

  1. HB

    Nice. I’ll be using your 0.1.4 on a restaurant point-of-sale system shortly, and probably on a lot of future projects. Until I recently "discovered" serproxy I’d been using a hackish solution involving ActiveX and hidden IE windows… I could have definitely used it (with your update) on an ATM project I’ve been on over the last year or so.

    • jpcote

      I’m glad it could help someone. I was stuck on this for quite a while… Thanks for the linkback. By the way, I also teach a class on Arduino and Flash. I will try to put some more stuff on this topic on my blog when I get the chance.

  2. Anonymous

    I could not get this to run under srvany as a service. I have used srvany for many programs, but this one just doesn’t want to play along. The service starts and stays running, but the executable does not stay running. Nothing in the event viewer that I can see.

    System is XP SP3.

    • Anonymous

      Fixed. It needs to have the config file specified in the command line because it’s looking in the windows folder when running as a service. Use this for the Parameters\Application value:

      C:\Program Files\Serproxy\serproxy.exe “C:\Program Files\Serproxy\serproxy.cfg”

  3. Kaori

    Thank you so much, works like charm! Exactly what I’ve been looking for! Thank you for your improvement of serproxy! :D

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>