TinkerProxy modification for Windows7

April 12 2011, 10:09(+01:00)

While messing about with some of the students we hit a wall when trying to use TinkerIT's Serial Proxy ("TinkerProxy 2.0") for a project involving connecting an Arduino Bluetooth modem to a Flash program. For whatever reason, TinkerProxy2.0 doesn't seem to be able to open a connection to the Bluetooth modem in Windows7/Windows Vista, even though with the same parameters Putty works perfectly well.

I was able to locate the sourcecode for Serial Proxy version 0.13, and after hacking it a bit, got it to work. I basically exchanged the _open command in sio.c for the "Windows way" of doing it, CreateFile, which I found in this PDF.

Since CreateFile already returns a HANDLE, I omitted using _get_osfhandle() and instead passed fd directly to the hComm variable in the source code. We also found out that COM ports over 9 , for instance port 27, must be specified as \\.\COM27 in the configuration file.

Long story short though, here's the executable along with a CodeBlocks project file and a sample configuration:

etc: serproxy-tinkerproxy-013.win7.zip

Note that it seems to input some garbage to the arduino at connection time. I am unfortunately unable to debug this, so you'll have to either take it into account when coding the arduino, or find out the culprit in the source code. If you do the latter I'd appreciate if you contact me so that the fix can be included :) Also, I'm going to try contacting the TinkerIT people so that millions of hours of frustration can be avoided by incorporating this pseudofix to their version.


Thanks for your blog post.
I had some problems, when a connected program closed the connection to serproxy and tried to reopen it.
According to the Win-documentation _close should be enough, but I added:
if (sio->hComm) CloseHandle(sio->hComm);
to sio_close and it solved my problem.

Thanks - I also suffered from the serial connection not being closed and access denied on reopening. The CloseHandle change fixed this for me.


hi pls help me dont working this internet side

Go back to the blog

Name or nickname:

E-mail (protected) or your page's URL


Antiflood code:
Código antiflood
Write the code shown on the left: