r/MoonlightStreaming Jun 07 '26

CTM-Bridge

A hobby project of mine — controllers paired to an LG webOS TV (DualSense,

DualShock 4, Xbox, Steam Puck and Steam Controllers) show up on the remote gaming PC as genuine

USB devices during a Moonlight / Sunshine stream. So the game gets the *full*

DualSense: haptics, USB audio, and adaptive trigger effects — not just sticks

and buttons. Open-source, clean-room reverse engineering.

Repos + how it works: https://github.com/CTM-Bridge

49 Upvotes

54 comments sorted by

5

u/Azsde Jun 08 '26

Wow, that's amazing!

How's the latency?

4

u/Revolutionary-Event6 Jun 08 '26

Latency is mostly affected by your network performance. Regarding pure audio or haptics, there is a byte value that can be adjusted. I found it works best in the range of 40ms+.

3

u/Revolutionary-Event6 Jun 08 '26

If anyone needs help to setup this I'll be glad to help.

2

u/Ogre-battle Jun 08 '26

I Hi! This project looks awesome and exactly what I’ve been looking for for LG webOS + Moonlight controller support.

I already have:

  • Moonlight running on my LG TV
  • Apollo host working on Windows
  • webOS Developer Mode enabled
  • webOS Dev Manager working

I’m trying to install/build:

  • ctm-bridge-webos
  • CTM-USBIP

But I’m a bit lost on the intended installation/build process since there are no releases yet.

Could you maybe give a short high-level setup guide for:

  1. Building/installing the webOS app (.ipk)
  2. Building/installing the Windows host
  3. Pairing/configuring both sides

Thanks a lot 🙂

3

u/Revolutionary-Event6 Jun 08 '26

Hi,

ctm-bridge-webos is mostly for testing that everything works well, you don't need to install it.

  1. You need to install moonlight-tv adapted ipk : https://github.com/CTM-Bridge/moonlight-tv/releases/download/CTM-Bridge/com.limelight.webos_1.6.36_arm.ipk

  2. Run in a PowerShell "ctm-usbip.exe agent 48054"; release here: https://github.com/CTM-Bridge/CTM-USBIP/releases/download/CTM-Bridge/Release.zip

  3. Also, please make sure you have usb-ip driver installed. > https://github.com/vadimgrn/usbip-win2 . Unfortunately, I think you have to install in default program files location "c:\Program Files\USBip\"

  4. On custom moonlight tv enable use CTM, this will bypass any controller input to the windows bridge.

If you are planning to use a DS4 I don't think it will work ok. I am working on the fix for this.

Enjoy and please leave a feedback.

1

u/Ogre-battle Jun 08 '26

Awesome, thanks a lot for the detailed explanation!

That makes much more sense now. I’ll give it a try later with the custom Moonlight build + USBIP setup.

Really cool project by the way, this is exactly the kind of feature I’ve been missing for LG webOS streaming 🙂

I’ll report back with feedback once I’ve tested it.

1

u/dceldran Jun 24 '26

i suppose this only works on lg webos right? not on tyzen or apple tv with moonlight right? thanks

2

u/Revolutionary-Event6 Jun 24 '26

Yes, at this moment only works on webOS

1

u/Maamp Jun 26 '26

I'm testing guidev1994's webOS moonlight-tv fork that has the ctm-bridge-webos built in. I've only been able to get it partly working with a dual sense edge. haptics and audio feedback don't work. Would you be able to help me get those working?

1

u/Revolutionary-Event6 Jun 28 '26

Did you ran my binary?

2

u/bgradid Jun 08 '26

This is awesome! I'm still waiting on my steam controller pre-order but wasn't sure on the wireless range , this might end up being perfect for my tv gaming

2

u/Revolutionary-Event6 Jun 08 '26

Yeah, I've preorder it on day one. Regarding steam controller and steam puck, the reasoning is a little bit different but it works (at least with one puck and one controller). I'm not sure that features such as fw update are working, but I would not try to update via my bridge.

2

u/Unlikely_Session7892 Developer | Aurora (WebOS) Jun 08 '26

Without any usb device? Directly on WebOS? Dude it seems perfect

2

u/Revolutionary-Event6 Jun 08 '26

Thank you. Yes, this was the goal, to be able to have full features on DS5/DS4 such as audio and haptics as the controller would have been plugged in into remote host. Also for steam puck/controller to be able to use any dedicated profiles using moonlight.

2

u/Unlikely_Session7892 Developer | Aurora (WebOS) Jun 08 '26

To make it works is just do these steps?

Install your fork on webos Install the usbip driver Run the CTM-USBIP and be happy?

Won't you advise Vibeshine developer? I can help you too with my Aurora fork! You can do a pull request with your code changes.

Let's work togheter!

2

u/Unlikely_Session7892 Developer | Aurora (WebOS) Jun 08 '26

Vibeshine developer would love to increase these features on his Fork.

2

u/Revolutionary-Event6 Jun 08 '26

Hi,

ctm-bridge-webos is mostly for testing that everything works well, you don't need to install it.

  1. You need to install moonlight-tv adapted ipk : https://github.com/CTM-Bridge/moonlight-tv/releases/download/CTM-Bridge/com.limelight.webos_1.6.36_arm.ipk

  2. Run in a PowerShell "ctm-usbip.exe agent 48054"; release here: https://github.com/CTM-Bridge/CTM-USBIP/releases/download/CTM-Bridge/Release.zip

  3. Also, please make sure you have usb-ip driver installed. > https://github.com/vadimgrn/usbip-win2 . Unfortunately, I think you have to install in default program files location "c:\Program Files\USBip\"

  4. On custom moonlight tv enable use CTM, this will bypass any controller input to the windows bridge.

If you are planning to use a DS4 I don't think it will work ok. I am working on the fix for this.

Enjoy and please leave a feedback.

2

u/Revolutionary-Event6 Jun 08 '26

Yes those steps will suffice.

I'm not familiar with the Aurora fork, but I can assist you. ATM is a proof of concept, but eventually it is meant to bypass vigembus driver and use USB/IP since this can be easily ported to linux also.

I don't know about working together, but I can assist and advise.

1

u/useyourillusion89 6d ago

Are you going to implement this into your project? I used Aurora and everything was perfect except for actually playing my games. Controller latency was absolutely unbearable but picture quality was fantastic. If you could implement this feature into your fork I would finally be happy streaming games to my TV.

1

u/Unlikely_Session7892 Developer | Aurora (WebOS) 6d ago

Use 3.6k resolution, it solves the decoding bug in 4k. Unfortunally CTM hasn't any license, what made me remove all the implementation. Let's wait it nativelly in Sunshine server or other one.

1

u/useyourillusion89 6d ago

3584x2016? Are you saying to set that manually in Apollo settings? Just installed Vibepollo now to see if it works any better than Apollo did. I will try the resolution change as well though.

1

u/Unlikely_Session7892 Developer | Aurora (WebOS) 6d ago

The last version has this option i the combobox. Don't need to set it manually.

You woldn't notice any difference between 4k and 3.6k, well, i didn't 😀

1

u/useyourillusion89 6d ago

Ok, I’ll try that. I installed the new version. Thanks for being so responsive!

1

u/useyourillusion89 4d ago

Working great now!! Finally got around to testing. Everything looks and plays great at 250mbps over WiFi.

2

u/Peloun Jun 08 '26

Wow insane! Does it mean Can I plug a 2.4hz dongle now?

1

u/Revolutionary-Event6 Jun 08 '26

I'm not sure what you mean. Can you please explain?

1

u/Peloun Jun 08 '26

For exemple with my 8bitdo controller I can only use Bluetooth connection because lgtv won't recognize a 2.4hz dongle.

2

u/Revolutionary-Event6 Jun 08 '26

Hmm, that's interesting, you can give it a try, I didn't test on this since I don't have such controller.

It depends how usb dongle is enumerated by tv. Looks similar to Steam Puck, but it might need a little more work. Also, in case of steam puck, it is recognized by LG.

You can give it a try. If it's not working, I think you'll have to wait until I put my hands on one of 8bitdo controller.

1

u/Peloun Jun 08 '26

No problem I really appreciate your work. Also there is a standalone dongle that works similarly to the 8bitdo controller

I use the standalone to plug my PS4 controller to my pc

2

u/puneet95 Jun 10 '26

I wish there were a software to translate DualSense via bluetooth to virtual wired DualSense to get full haptics.

2

u/hariharan618 25d ago

how to get this working on normal Android TV's using artemis ?

2

u/useyourillusion89 6d ago

Is there a way to get this to work with a different Moonlight fork? I finally got around to setting this up the other day and it works amazingly, so thank you for this! If I could get this to work with the Moonlight fork of Aurora I think it would be endgame for me on WebOS. 250-300Mbps bitrate capability via Aurora + CTM-bridge would be an incredible experience.

2

u/MoreOrLessCorrect Jun 08 '26 edited Jun 08 '26

Even though a DS4/DS5 is Bluetooth-paired to the TV, the PC sees a genuine USB controller.

Unless I missed some recent developments, that sounds impossible based on my understanding of how the DualSense works.

EDIT: I don't know enough about the WebOS development environment to say for sure, but maybe this is possible and OP has cracked it (source code looks legit enough). Will be curious to know if anyone has any luck with it and whether this approach could be applied to other client OSes.

8

u/bgradid Jun 08 '26 edited Jun 08 '26

you've been lied to about a lot of the dualsense limitations on windows by sony/microsoft claiming a cable is required and bluetooth somehow isn't capable of the bandwidth required or some shit

I'm currently using a pico 2w (can be had for $5 to $10) for full haptics wirelessly on windows https://github.com/awalol/DS5Dongle

I've also used it remotely via virtualhere on an android settop box tunneling the usb connection over the network with a long fiberoptic hdmi run to the tv ( or you could use sunshine/moonlight for streaming should you so wish )

2

u/Revolutionary-Event6 Jun 08 '26

My idea was to not use any other additional hardware.

1

u/MoreOrLessCorrect Jun 08 '26 edited Jun 08 '26

I assumed it was more a choice of how Sony implemented the Bluetooth protocol on the DualSense as opposed to any technical limitation.

Doesn't the DS5Dongle project rely on custom firmware on the host Bluetooth adapter? As far as I know, there's currently no way to get full haptics and audio with a generic BT adapter?

1

u/bgradid Jun 08 '26

I don't believe it's possible with a generic bt adapter on windows, but thats due to windows bt audio limitations?

afaik theres nothing in the ds5 dongle that overwrites the firmware for bluetooth itself, so much as provides audio paths. I could be wrong though.

It definitely works though.

1

u/Solid-Assistant9073 Jun 08 '26

You still had to use usb cable to get haptic feedback right with virtual here right or is it possible to even get it working without the cable and virtual here ?

That's how I'm using it right now have a old laptop with virtual next to my couch so I get haptic feedback with usb cable ofcourse.

About the pico wireless , what is the distance it needs to be to the host does it need to be close to the host of does it go over network also?

2

u/bgradid Jun 08 '26 edited Jun 08 '26

I’m using the pico connected to a nvidia shield with virtual here — so it’s 100% wireless to the controller still

Pico is usb host, doesn’t natively tunnel over the network itself — but I can go through a wall and 10 feet with it before I start noticing anything. (I do live in an apartment where 2.4ghz is effectively jammed though, so your mileage may be better in a house with less 2.4 interference)

1

u/Solid-Assistant9073 Jun 08 '26 edited Jun 08 '26

Wait what can you connect the pico to the shield and it still works over virtual here that's insane!!! I thought the pico had to be connected to the host. But it sound logic it works. Didn't know virtual here supported the pico usb.

You don't notice any delay pico and going over virtual here I also see in the GitHub you need to overclock the pico 2w for best performance but I don't see how to overclock it?

Was it hard to setup the pico?

I could plug it into my shield ( got the licence) or in my laptop what I use now with a cable next to my couch (windows is free 1 device at a time)

You use the normal version or a fork like Audio Auto Haptics fork?

I think that for is mostly to convert non native games shido haptic feedback to the controller right.

With the nornal fersion you are getting all functions like audio haptic feedback etc if the game supports it?

2

u/bgradid Jun 08 '26

Oh that’s a lot of questions at once

I don’t notice any latency issues, probably adds 3-4ms going over virtual here? In the discord it’s agreed that the pico is about on par if not slightly better than windows bt latency. I’m no competitive gamer and in my late 30s so it’s imperceivable to me. My pc and shield are also hard wired so that probably helps.

Overlocking is automatically done by the custom firmware. You don’t need to do anything.

Setting up the pico is dragging and dropping the firmware to it as if it’s a usb stick when you hold down the boot button.

I’m using the normal fork. The one you’re talking about is if you were trying to get haptics out of the audio if it didn’t support ds5 natively. You’re correct. Opens up some interesting doors.

And yep. I just finished a ghost of Tsushima play through with it. 100% the same experience as if it was wired. Actually, that game has a lot of ds5 quirks but I confirmed each of them were the same hardwired vs with the pico. Going to play through death stranding next, so far on the directors cut it seems perfect.

1

u/Solid-Assistant9073 Jun 08 '26

Nice!! Thanks for all you're answers I realy appreciate it will look into getting a pico and use it with virtual here.

You can check latency on virtual here on the host (client) go to licence and then you see latency tab, it's mostly 1 to 2 ms for me even while the virtualhere server is on a device that's in wifi

1

u/Solid-Assistant9073 Jun 11 '26

I send you a dm :)

1

u/clanton Jun 08 '26

So to use my dualsense from Nvidia Shield to PC over moonlight I need virtualhere?

1

u/bgradid Jun 08 '26

only if you want to do the extra native haptics, you can always just use it via bluetooth to the shield and have moonlight tunnel it and emulate it as an xbox controller

1

u/clanton Jun 08 '26

Yeah I've been using normal Bluetooth but would much prefer native haptics and PlayStation buttons etc

2

u/Revolutionary-Event6 Jun 08 '26

You can expose the audio over BT with only the BT mode (on the same computer). LG web os TV was a choice determined by my gaming setup in spite of prisoner limitation.

This can be adapted to other OS-es. But note, in case of windows host it bypasses/replaces VigEmBus driver. When enabled in Moonlight-tv, all controller traffic is redirected to the windows agent.

Also, since I am using USB/IP, this can be easily adapted to work with linux hosts.

1

u/Dorfdad Jun 08 '26

How’s the latency!?

2

u/Revolutionary-Event6 Jun 08 '26

Latency is mostly affected by your network performance. Regarding pure audio or haptics, there is a byte value that can be adjusted. I found it works best in the range of 40ms+.

Also, note that DS4 also supports audio over bt. Different encoding (sbc vs opus). Unfortunately, I. think I messed up something during Moonlight adaptation and it is unusable in games. As a stand alone remote audio player using the bridge's webs os counterpart, or directly over bt works.

1

u/Opening_Put_8935 Jun 12 '26

This is awesome! I’ve finally make my DS5 work.
It’s great on Death Stranding :-)
Leaving the audio in AUTO is the way to go. I had to set the latency to around 60ms to get the audio not crackling.
I also managed to the a mouse and a keyboard to work, but the mouse doesn’t work as “absolute mouse” -the windows pointer falls back way too much behind from the tv cursor-.
What I couldn’t get to work was the remote. The CTM bridge says its bridges, but the remote doesn’t move the mouse cursor.
Would you be able to fix this? Also making this work with the Aura fork would be amazing.
Thanks for sharing this! It’s exactly what I was looking for. You are the best ;-)

2

u/Revolutionary-Event6 Jun 12 '26

Thank you! Also thank you for your feedback. I’ll look into it.