[Unofficial] moonlight-embedded

@TheNoor, so just downgraded back to 20.4 and restored my 20.4 backup and then install your Moonlight again (the one you posted in the early hours of the morning) and I can pair no problem.

I’m going to upgrade to 21B3 again and then install the one you posted earlier on and will try again and see if it fails.

EDIT:

So upgraded to 21B3 again and then removed Luna/Moonlight & then a fresh install of the latest zip, and it’s back to the same error for me. Seems something fundamentally is preventing proper communications to pair properly on CE21.

That’s a shame, I was hoping it would be seamless, but it never is… Probably not all dependencies have been added to the 21 repo’s yet since it’s still in beta. Guess we’ll just have to wait a while. Didn’t get any build errors though… :man_shrugging:

@Adam86
I briefly updated to the latest CE 21 nightly yesterday and you’ll be happy to know that I’m experiencing all the same bugs you mentioned :smile: I was eventually able to pair though, the not-so-elegant-solution is to just keep trying… The annoying thing was that you couldn’t because the client kept saying you’re already paired, which is BS. Anyway, I put in a little workaround so if pairing does fail, you can try again right away. I was able to pair after three tries. Still don’t know what the actual culprit is though. Or if/how the actual streaming will go. Give it a whirl:

script.luna-2.7.0.8bbfbd4-then00r-ce21-ne.zip (2.7 MB)

Hi @TheNoor, I gave it a shot, but unfortunately I can’t seem to progress any further on the pairing front, I must have tried it 100 times and still just got the same error.

Thanks for your efforts though, hopefully like you say the situation may change when CE21 leaves beta.

No problem man, just so you know, I used the above build on that latest nightly I linked in the same post, perhaps that changes anything? Cheers!

I’ll give the latest nightly a try just in case and report back :slight_smile:

Yep i have the same problem on C21 as @Adam86 . I compiled latest moonlight with common week ago. But on pairing i get:

Failed to pair to server: Failure when receiving data from the peer

Both error on NE or NO version, at start i thought its fault that i compiled from NE source, cause NO is not published already. But on fresh install of NE i have the same problem.

As i remember on 21 NG version it was working, when i compiled it some months ago.

Yeah, I know it aint pretty, but just to show you what i meant with “keep trying” I’ve included a video. I guess I forgot to mention that for the above build with workaround to work, you’ll need to pair via the Luna GUI.

Hope it helps!

Unfortunately not working for me :confused:

Has anyone resolved this issue? I’m on an Ugoos AM6b+, CE21 latest nightly, and have been getting the same “Failed to pair to server: Failure when receiving data from the peer” again and again (tried pairing over 50 times, I counted). This is with the latest nightly Sunshine.

It will pair when I turn on gamestream in GFE but when I do that, Luna isnt sending any analog inputs over the gamestream, just 6 face buttons and start/select.

@TheNoor are you still working on this project?

I’ve installed NG version on AM6B+ and connected successfully to Sunshine but after starting Desktop or Steam Big Picture Kodi is showing only frozen menu.

I’m actually still on CoreELEC 20 NE. Haven’t used Luna in a while. I seem to remember that most frozen screens on my end were often because the audio device in kodi needs to be changed and also manually chosen device in moonlight-embedded settings.

Thank you!

Actually, I can hear Steam interface sounds.
The issue is problably connecter with image itself.

Anyone has working Moonlight on CoreElec?

Yes, even though I mentioned audio devices, I’m not referring to audio problems. For the video stream to initiate properly I also had to select the right audio device in kodi and the right audio device in moonlight-embedded settings through the Luna interface. My Vontar X4 is still running 20.5 up to the latest commit including some cherry-picking to get rid of the h264 cropping bug when using hardware acceleration, but I’m not planning on upgrading anytime soon. So I don’t really have a 21 box available for testing rn.

I don’t have any means to test on CE21, but please see if these builds are any good:

script.luna-2.7.0.8bbfbd4-then00r-21-ne.zip (2.7 MB)
script.luna-2.7.0.8bbfbd4-then00r-21-ng.zip (2.7 MB)

Thank you. Now it connects like a charm but I can’t find right audio combination.

All combinations cause AM6B to freeze and need to turn it off and on.

AM6B is connected to TV by HDMI.

Luna shows only 4 audio devices:

  • card0: AMLAUGESOUND [AML-AUGESOUND], device 0: SPDIF-B-dummy dummy-0
  • card0: AMLAUGESOUND [AML-AUGESOUND], device 1: TDM-B-es8388 es8388-1
  • card0: AMLAUGESOUND [AML-AUGESOUND], device 2: SPDIF-A-dummy dummy-2
  • card0: AMLAUGESOUND [AML-AUGESOUND], device 3: TDM-C-dummy dummy-3

Kodi shows 6 devices:

Do you have any tips?

The combination that works on my s905x4 soc (on CE20) is alsa:aml-augesound, hdmi in kodi settings and hw:0,3 in Luna, which corresponds to the tdm-c dummy device.

My best bet though, is that my launch script is not compatible with CE21. I don’t know if the decoders used in the vfm map are different. If I find the time I’ll throw CE21 on a SD card and see what’s up. In the meantime you could try and comment some of the stuff out from my launch script regarding the codec usage it writes to /sys/class/vfm/map. Using potentially outdated decoder references will probably screw things up if it’s at all different in CE21.

Unfortunately still nothing.
I’ll try file editing next week.

I did a dirty upgrade from CE20 to CE21 and the already installed Luna for CE20 still worked without problems. I upgraded Luna to the above version with the fixed pairing from my last post and it also still worked. Could it be that you didn’t follow the readme? Did you manually choose launch scripts again after upgrading to the new Luna? Otherwise the binary and scripts won’t have the right permissions and you’ll get a situation like what you described. If I have the time I’ll compile a final version for CE21 with different launch scripts for different purposes. Both my scripts are now optimized for getting 7.1 PCM surround sound on my system. In the meantime, if you comment out the curl commands your audio should be left as is.

The GNU domain was dead for a while, so I had to compile these from the sources I had saved prior, but they seem to work fine. Hopefully these builds will last throughout the CE21 life cycle.

script.luna-2.7.0.1.00ee40f-then00r-ne-aarch64-21.zip (2.7 MB)
script.luna-2.7.0.1.00ee40f-then00r-ng-arm-21.zip (2.7 MB)