TinkerProxy modification for Windows7April 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:
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.
- September 08 2011, 04:28 by Michael Krause
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.
- November 28 2011, 15:49 by G-guy [mail not shown]
- March 26 2012, 12:23 by TZO [mail not shown]
- March 28 2013, 22:22 by prakash [mail not shown]