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 !
Note: there is a parallel version of SerialProxy named TinkerProxy that is being maintained by Tinker.it. I really do not know how different it is from the one on this page but if you are having trouble you can always give it a try.
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.
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.
Hi Jean. This is really usfull. I’m running an Arduino and flash workshop this weekend. I’m sure this will help all the people with massive bluetooth com stacks. I will be uploading all my workshop notes to http://arduino.benarent.co.uk I will give you some link love. Cheers Ben
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.
Thanks a lot man you did a great a job and saved my life.
BIG UP 🙂
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.
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”
Can serialproxy take hardware flow control ?
Thank you so much, works like charm! Exactly what I’ve been looking for! Thank you for your improvement of serproxy! 😀
Howdy this is somewhat of off topic but I
was wondering if blogs use WYSIWYG editors or if you have to manually code
with HTML. I’m starting a blog soon but have no coding skills so I wanted to get advice from someone with experience. Any help would be greatly appreciated!
Most blogs use some sort of backend software. I use WordPress for mine. You do not have to do any coding and its quite easy to use.
HI I’m hoping you might be able to help.
I am struggling to get Flash & an Arduino Leonaro to communicate in windows (xp or win 7).
I have managed to make it work on my mac so I know all the components work.
I can talk to the Arduino (on the windows machine) via the uplink software (v1.0.5) all though the board doesn’t appear to respond to hitting Send in the Serial Monitor (on either the mac or PC) (although this may be explained here? (http://arduino.cc/en/Guide/ArduinoLeonardoMicro?from=Guide.ArduinoLeonardo#toc3) , the serproxy appears to load up correctly (is there a way to test this on it’s own?). Cmd line says “Serproxy – (c)1999 Stefsno Busti, (c) 2005 Davis A. Mellis – Waiting for clients”
When I then run a flash exe (from the as3glue_bundle_v2.0 download ) I get a message in Serproxy saying “Server thread launched” “server(4) – thread started)
The flash exe reports that a “Connection with Serproxy established. Wait one moment”
and that’s where it all ends. everything carrys on running but nothing else happens.
below is my Serproxy cfg file;
# Config file for serproxy
# See serproxy’s README file for documentation
# Transform newlines coming from the serial port into nils
# true (e.g. if using Flash) or false (I’VE TRIED THIS BOTH TRUE & FALSE)
newlines_to_nils=false
# Comm ports used
comm_ports=4
# Default settings
comm_baud=57600
comm_databits=8
comm_stopbits=1
comm_parity=none
# Idle time out in seconds
timeout=300
net_port4=5331
The only things I can currently think is either I need to put the com & net files in a specific place on the windows machine or that I have to install a full version of flash. (this is the only thing that I think is different from my mac<other than the OS obviously 🙂 )
Both seem implausable but I'm running out of culprites 🙂
I am computer literate, however new to the ardunio & serial comms.
Thanks for any help you can offer.
Regards
nik
Nik,
Did you check my other post on interfacing Flash and Arduino ? It’s got a bunch of troubleshooting tips at the end.
I got what you imply, many thanks for posting.
I am blissful to find this website through search engines.
Frederic
I don’t know whether it’s just me or if perhaps everybody else
experiencing issues with your blog. It appears as though some of
the written text on your posts are running off the screen. Can someone else please provide feedback and let
me know if this is happening to them as well? This may be a issue
with my web browser because I’ve had this happen previously.
Kudos
You are the first to report this problem…
hello,
I used ser2net to communicate (read and write) with a USB dongle. This works well but the problem is that I can not create two connections to the same device.
I just tried to use serproxy, it seems possible to create two connections at the same time. However I have a problem returning data (data read). My data are sent and it works, but I get no data return. Whether through the shell “nc” command or with my php script.
With ser2net when I connect via the command “nc 127.0.0.1 3000”, I can then type a command to send such “xx xxx” and then I hit the keyboard keys CTRL + D that allows me to send my command. And I get back data display by USB dongle “OK” display on my screen.
I try to do the same with serproxy but the combination of CTRL + D does not work? do you know why I can not receive the data? I tried with newlines_to_nils = true and false does not change anything …
thanks
Obviously, serproxy is capable of both sending and receiving. However, I do not know why it isn’t working in your scenario. I do not have access to a Windows box right now. If I have the chance I’ll try later today.
If I can help you to resolve this problem or configuration, just ask me. I can open to you an access if you want make tests…
Does anyone know how to turn serproxy into an .ane for use with Adobe Animate CC ?
I’m afraid I cannot help you with this…
Facing these errors when compiling ” main.c” SerialProxy v0.1.4 using Visual C++ Express 2008.
Can anyone helpme.
Loaded ‘C:\Users\vicky\Documents\Visual Studio 2008\Projects\try\Debug\file1.exe’, Symbols loaded.
Loaded ‘C:\Windows\SysWOW64\ntdll.dll’
Loaded ‘C:\Windows\SysWOW64\kernel32.dll’
Loaded ‘C:\Windows\SysWOW64\KernelBase.dll’
Loaded ‘C:\Windows\WinSxS\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcr90d.dll’
The thread ‘Win32 Thread’ (0xd678) has exited with code 0 (0x0).
The program ‘[67068] try.exe: Native’ has exited with code 0 (0x0).