If you are still looking for that, there’s a complex workaround to bridge serial COM connection to UDP connection. Be warned, it’s a lot of manual setups…
tl;dr:
The idea is that you create a virtual serial COM port on your computer, let Intiface output to this virtual COM, then redirects the virtual COM outputs to your OSR device UDP destination.
Steps:
What I’ve done is to use com2com for creating the virtual COM ports, socat to redirect the COM ↔ UDP/IP communication, and since socat is a linux program I have to run it from Cygwin
- Your OSR
- Check your OSR UDP address and port. Eg it would be
192.168.123.456:8000ish, if it does come with wifi capability.
- Check your OSR UDP address and port. Eg it would be
- com2com. Creates the virtual COM ports on your PC.
- Use Version 2.2.2.0 (signed) on Win 11. (I’ve tried v3.0 did not work.)
- Require you to launch “setup” program and rename serial ports in the "Virtual Port Pair 0 ", eg rename them to COM11 and COM12.
- After setting up, you should see "
com0com - bus for serial port emulator 0 (COM11 <-> COM12)" in your Windows Device Manager.
- Cygwin. Helps running socat.
- When installing, the program will ask you what packages to include. Search and include “socat”.
- When done, run the Cygwin Terminal executable and a terminal will pop up.
- In Cygwin Terminal, type
socat -Vto make sure socat it’s installed.
- socat (SOcket CAT). This is a linux program that redirects serial port communication to UDP/IP.
- Run
socat -d -d /dev/ttyS10,raw,echo=0,b115200,cs8,parenb=0,cstopb=0 udp:192.168.123.456:8000. This will forward COM11 outputs to your OSR’s UDP destination with the same serial Baud Rate, Data Bits, etc as in this post. - If you want to stop it, type
CTRL-C
- Run
- Intiface.
- Setup Intiface to connect to virtual COM. Do exactly as this thread did except change the port name to COM12.
And you’re good to go. You might need to rerun Intiface scan or restart socat a few times.
I guess the topology looks like Intiface <-> COM12 <-> COM11 <-> SoCAT relay <-> UDP on OSR
Why this
Pro:
- IT JUST WORKS. (I mean, you don’t need to write code to integrate with existing programs supporting OSR over serial.) I’m using this only because I couldn’t find the source code to Funscript Player which talks to OSR (or Intiface → OSR if you’re on a older version) over serial and there’s a few older game integration depending on that.
- The general strategy should work for macOS and Linux as well; in fact it should be easier since you only need brew install or apt-get socat and it should just run, plus socat CAN create pseudo terminal pair (unix version of virtual COM I think?) by itself without com2com.
Cons:
- Lags. From the topology there’s a lot of relay happening slowing down the TCode round trip time. A native UDP client will run much better.
- Complex setup, and you have to manually start/stop socat every time.
My OSR2 uses TCodeESP32 running on a custom ESP32 controller and it got fried every time when I try to test motor movements through serial connection. Guess it’s because the external power supply is tuned off. I have zero electrical engineering knowledge and don’t know how to either modify the firmware to protect it from burning when power disconnected nor how to wire/solder things up so the power could be supplied by USB PD. I can’t risk that looseish USB cable getting shook off and lose another controller
.
On the other hand Intiface is too big a project I don’t think I have the knowledge or time to add OSR wifi support.
Hope this helps.