Cannot "cast" to Plexamp Headless to control remotely

Hi! I installed Plexamp Headless on WSL2/WSLg on Windows 10. I know this isn’t the use case this app was designed for but it works great! That is, as long as I control it through the web browser. For some reason I cannot get it “casting” for remote control working with my Android phone. I am on version 4.8.3 of the app on my phone and 4.8.3 for Plexamp Headless.

When I attempt to “cast” from my phone to Plexamp Headless, I get a message displayed on my phone which says “Cannot Connect To Remote Player”. Strangely when I hit the cast icon and see my list of available players, I can see Plexamp Headless and I can see what song is playing. I can even hit the dropdown there and use the basic forward, backward, play, and pause.

This appears to be the relevant logs but I don’t know if it’s detailed enough to see what’s going on. My Plexamp Headless instance is called “Desk”:

Sep 14, 2023 22:15:40.926 [0xbdf3ccb0] DEBUG - Networking: Completed request 37: (GET http://100.115.92.14:41577/resources) with code -28 (have 0 bytes) in 5001 ms.
Sep 14, 2023 22:15:40.928 [Javascript] WARNING - DEVICE: Player connection http://100.115.92.14:41577 didn’t work for Android: HTTP status -28
Sep 14, 2023 22:15:40.928 [0xbdf3ccb0] DEBUG - Networking: Completed request 38: (GET http://100.115.92.2:41577/resources) with code -28 (have 0 bytes) in 5004 ms.
Sep 14, 2023 22:15:40.928 [0xbdf3ccb0] DEBUG - Networking: Completed request 39: (GET http://192.168.169.83:32500/resources) with code -28 (have 0 bytes) in 5003 ms.
Sep 14, 2023 22:15:40.930 [Javascript] WARNING - DEVICE: Player connection http://100.115.92.2:41577 didn’t work for Android: HTTP status -28
Sep 14, 2023 22:15:40.930 [Javascript] WARNING - DEVICE: Connection testing failed for Android
Sep 14, 2023 22:15:40.930 [0xbdf3ccb0] DEBUG - Networking: Completed request 40: (GET http://192.168.56.1:32500/resources) with code -28 (have 0 bytes) in 5003 ms.
Sep 14, 2023 22:15:40.930 [Javascript] WARNING - DEVICE: Player connection http://192.168.169.83:32500 didn’t work for Desk: HTTP status -28
Sep 14, 2023 22:15:40.930 [Javascript] WARNING - DEVICE: Connection testing failed for Desk
Sep 14, 2023 22:15:40.931 [Javascript] WARNING - DEVICE: Player connection http://192.168.56.1:32500 didn’t work for WinDesktop: HTTP status -28
Sep 14, 2023 22:15:40.931 [Javascript] WARNING - DEVICE: Connection testing failed for WinDesktop
Sep 14, 2023 22:15:42.358 [Javascript] INFO - [Navigation] Settings > Settings (Device) > Settings (Debugging)

Again, I know I am not using this as designed, but I would appreciate any advice that could be provided.

almost certainly a networking issue, the android phone needs to be able to connect directly to the headless Plexamp.

the next/prev shipping can go via the cloud, and the playing status doesn’t require a direct connection which is why those things work.

1 Like

OK, thank you. I’ll play around with it.

Thank you. I was able to get this to work by using the iptables command on my dd-wrt router to forward requests made to the WSL ip address to my window PC’s ip address instead:

iptables -t nat -A PREROUTING -d (wsl ip address) -j DNAT --to-destination (ip address of windows machine)

1 Like

For anyone discovering this thread via Google, I just saw that in this month’s WSL pre-release for September 2023 Microsoft has included something called network mirroring that sounds like it will give WSL the same IP address as the host computer which I believe will resolve this routing issue. Unfortunately I am unable to test since it currently requires Windows 11 and I am still on Windows 10.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.