Forums - AllPlay service Implementation

21 posts / 0 new
Last post
AllPlay service Implementation
dotMorten
Join Date: 4 Feb 16
Posts: 14
Posted: Fri, 2016-06-10 21:29

I've implemented an AllPlay media player service using Windows UWP and it even runs great on a $35 Raspberry using Windows IoT Core. It implements the interfaces net.alljoyn.MCU, net.allplay.ZoneManager, net.allplay.MediaPlayer and org.alljoyn.Control.Volume, and matches the behavior of my Gramofon player.

I even built an app for the Gramofon that controls this service just fine as well, all via AllJoyn.

However... none of the official AllPlay apps discovers my AllPlay service. I'm wondering what other trickery is going on that is used by these apps? Can anyone shed some light on this?

I did notice that my Gramofon exposes two separate devices - no idea why that is - but the second device seems to be more related to system maintenance like firmware update, wifi config etc.

Btw for those who are interested, I've shared the code here:

AllPlay media player service:

    https://github.com/dotMorten/AllPlayMediaPlayer

Client application for controller AllJoyn devices including AllPlay players:

     https://github.com/dotmorten/alljoynclientlib

 

  • Up1
  • Down0
m0
Join Date: 15 Jun 16
Posts: 2
Posted: Thu, 2016-06-16 04:10

Really great service that you built there. Hopefully you get your open questions answered by qualcomm or any other experienced developer.

  • Up0
  • Down0
daniel.tai Moderator
Join Date: 19 Oct 15
Location: San Jose
Posts: 32
Posted: Thu, 2016-06-16 11:32

Hi dotMorten,

This is very cool!  I would like to help you why your service is not discoverable AllPlay apps.  Unfortunately, Qualcomm gives us Windows machine that can compile your code (Virtual Studio), but disable network discovery such as multi-cast, upnp.  I have another Windows 10 machine, but it does not have Visual Studio, and acquiring one will take forever.  Do you mind putting a compiled version somewhere so I may download it and try it on the machine and see why AllPlay apps can't discover it?

Thanks!

Daniel

  • Up0
  • Down0
dotMorten
Join Date: 4 Feb 16
Posts: 14
Posted: Thu, 2016-06-16 16:12

Thanks for following up!

After chatting with Microsoft's AllJoyn team, they're telling me that they only support AllJoyn Descovery v2. Could it be that the AllPlay apps are still using v1?

I've uploaded the app package here: http://www.sharpgis.net/_temp/AllPlayMediaPlayer_1.0.0.0_Test.zip

Just right-click the "Add-AppDevPackage.ps1" and select "run with powershell". Note: You might have to enable developer mode on your PC first (in the control panel).

Btw, on a side-note you could install the free Community edition of Visual Studio 2015.

  • Up1
  • Down0
daniel.tai Moderator
Join Date: 19 Oct 15
Location: San Jose
Posts: 32
Posted: Tue, 2016-06-21 19:25

Hi dotMorten,

AllJoyn was developed by Qualcomm initially, and I guess we do have 2 main discovery for WiFi.  Version 1 is using multi-cast, and AllJoyn team and customers (AllPlay is considered a customer, even though we are part of Qualcomm), found that it was unreliable.  Version 2 is using Multicast DNS, which is much more reliable.  Apple's Bonjour and Spotify Connect both use Multicast DNS.  AllPlay have both versions of discovery protocol implemented, so we ensure backward compatibility with older firmwares and apps.

As for your service, I was also not able to discover it.  Checking AllPlay's logs, we never got the announcement from About service.  AllPlay SDK do filter for net.allplay.MediaPlayer interface for announcement, so AllPlay do not pick up other services.  I am not familiar with C# and AllJoyn's C# APIs, but looking at your service code, it does not look like you have create the interface or announce your interfaces through About service.  You did setup About, but you never announced it.  For example for a server service, please look into 

https://git.allseenalliance.org/cgit/core/alljoyn.git/tree/alljoyn_core/...

You can use the same sample's AboutClient to see about receiving the announcements.

I hope this will help.

Thanks

Daniel

  • Up0
  • Down0
dotMorten
Join Date: 4 Feb 16
Posts: 14
Posted: Wed, 2016-06-22 13:09

Thanks for checking this out and confirming which interface AllPlay looks for.

I am indeed announcing net.allplay.MediaPlayer. Other AllJoyn clients have no problem discovering the device including the AllJoyn's AboutClient sample (modified to discover this or any interface of course). The WinRT API's AllJoynBusAttachment class does this automatically for you.

Did you run your tests on the same machine? By default UWP apps doesn't allow network loopback, so that either needs to be enabled, or you should be performing the discovery on a separate PC.

I assume the main issue here is why it doesn't receive the about announcement?

  • Up0
  • Down0
ric0
Join Date: 12 Jun 16
Posts: 1
Posted: Thu, 2016-06-30 11:22

dotMorten,

I am also thinking about implementation of a UWP application to control my Panasonic Allplay devices (just for fun).

Unfortunately the do not provider a Windows library. I had also the idea to implement the interfaces on top of Alljoyn.

Your AllPlay service is big help for me.

Did you succeed with the device discovery problem by implementing the About interface ?.

Many thanks

 

 

 

  • Up0
  • Down0
daniel.tai Moderator
Join Date: 19 Oct 15
Location: San Jose
Posts: 32
Posted: Thu, 2016-06-30 14:14

Hi dotMorten,

Sorry for the late response, but have been busy with AllPlay development.  Please allow me more time to take a look.  I have decided to try out VS 2015 Community and see where I can get from there.  I will also install Android version of AboutClient and see if I can discover the service.

Let you know soon.

Thanks

Daniel

  • Up0
  • Down0
dotMorten
Join Date: 4 Feb 16
Posts: 14
Posted: Sat, 2016-07-02 20:38

@ric0

My code will find other AllPlay speakers just fine. Just use this library here: https://github.com/dotmorten/alljoynclientlib

I've only tested it with Gramofon, but I assume it works with Panasonic as well (let me know if it does/doesn't).

The discovery issue I have is for building your own speaker/player (for instance a raspberry plugged into your TV). That's where the Qualcomm libraries won't find my player (however my own library linked above discovers it just fine).

 

  • Up1
  • Down0
dotMorten
Join Date: 4 Feb 16
Posts: 14
Posted: Mon, 2016-07-04 00:13

Just an update: I fixed my media player implementation. Turns out the casing on the object path was important. All the allplay clients can now find my media player. That's a $35 wifi music player right there ;-)

  • Up0
  • Down0
Martin L.
Join Date: 9 Dec 14
Posts: 10
Posted: Tue, 2016-09-20 14:00

Hey Morten, hello Daniel,

these days I began to develop an AllPlay-renderer based on the Android-SDK of the Alljoyn Protocol.

I had high hopes the renderer will be displayed inside Spotify as on Morten's C#-project, he mentions the AllPlay-renderer is compatible with Spotify for Android/iOS.

As far as I can see now, this is a FALSE information.

It's only available inside native AllPlay-apps like the AllPlay Jukebox/Radio, AirAudio etc.

 

Spotify seems to NOT support AllPlay, but the AllPlay-SDK given to hardware-developers by Qualcomm seems to support Spotify Connect instead.

 

So my questions:

@Morten: Can you confirm if your C#-implementation is working with Spotify?

@Daniel: We have been in touch several times in the past.. can you deliver informations about how we might optain a license to implement AllPlay with Spotify Connect? Maybe via PM?

 

Thanks for your time and kind regards from Germany,

Martin Lehmann, IsSend Communications

  • Up0
  • Down0
dotMorten
Join Date: 4 Feb 16
Posts: 14
Posted: Tue, 2016-09-20 14:12

No I can't confirm that. I assumed since it worked with the other AllPlay clients. I tried it but I couldn't even get the spotify client to connect to my Gramofon, so just figured the Spotify app was broken on my device.

  • Up1
  • Down0
Martin L.
Join Date: 9 Dec 14
Posts: 10
Posted: Tue, 2016-09-20 14:17

Thanks Morten for the quick clarification.

I've also analyzed the (decompiled) sources of the Spotify-app but found nothing about "allplay".

Hope Daniel can bring some additional light into this :)

 

Cheers & kind regards,

Martin Lehmann

  • Up0
  • Down0
daniel.tai Moderator
Join Date: 19 Oct 15
Location: San Jose
Posts: 32
Posted: Tue, 2016-09-20 14:19

Hi Martin,

Morten's implementation will not discovery Spotify Connect, as it is a different protocol than AllPlay.  The underlaying discovery protocol may be similar, but they don't work together.

I am not sure if you want to control Spotify Connect via your app or make your own speaker with AllPlay and Spotify Connect?

It is not possible to control Spotify Connect such as accessing Spotify Contents and requesting play commands to play Spotify Contents.  However, you can group speakers using AllPlay and use Spotify app and stream to the group.  Basic controls of AllPlay such as play/pause/previous/next/stop and volume requests will also affect Spotify.  

From speaker's point of view, most AllPlay speakers have Spotify Connect built in.  This requires a firmware update to the speaker after Spotify themselves of certified it.  If you are interested in the speaker firmware, I can get you in contact with the right people.

Let me know if you have more questions.

Thanks

Daniel

  • Up0
  • Down0
Martin L.
Join Date: 9 Dec 14
Posts: 10
Posted: Tue, 2016-09-20 14:53
Hi Daniel,
 
thanks for all the details.
 
I had high hopes Spotify might support the AllPlay-protocol.
If that would have been the case (wrong information of the AllPlayMediaPlayer-C#-project), then Spotify would have detected my Android-app as a receiver.. like all AllPlay-enabled apps are doing right now.
 
 
 
I'm interested in implementing a relay-app which acts as a Spotify Connect-enabled receiver (=eg. via the AllPlay-protocol which isn't working). That app would get all AirPlay-, AllPlay-, HEOS-, DLNA-enabled receivers, all FireTVs & ROKUs compatible with Spotify (I doubt this would match Spotify's business-plan :-/ ).
 
 
 
Any help is really appreciated, I believe a "connected experience" should be possible somehow!
 
Best regards,
 
Martin Lehmann, IsSend Communications 

 

  • Up0
  • Down0
mishule007
Join Date: 15 Feb 17
Posts: 2
Posted: Wed, 2017-02-15 12:06

Hi dotMorten, 

this might be an older thread, but still very interesting. Is your player with raspberry pi and windows IOT working only via wifi or also on LAN ?

thx and regards

  • Up0
  • Down0
dotMorten
Join Date: 4 Feb 16
Posts: 14
Posted: Wed, 2017-02-15 13:41

Either or both will work

  • Up0
  • Down0
pr3d1ction
Join Date: 27 Feb 17
Posts: 2
Posted: Mon, 2017-02-27 02:25

Hi dotMorten,

your solution look squite promising for me.

Im looking for a way to include my AV Receiver into my allplay (Panasonic) multiroom solution.

This is possible by installing your solution into my raspberry, right?

 

If yes, is there a detailed installation instruction? I don't really know how to do this in detail.

 

Thanks!

  • Up0
  • Down0
pr3d1ction
Join Date: 27 Feb 17
Posts: 2
Posted: Mon, 2017-02-27 12:38

I finally did it :) !

Unfortunately, the device is not appearing in the list of Spotify Connect, just in the Panasonic app.

Is there something missing?

Thanks!

  • Up0
  • Down0
Martin L.
Join Date: 9 Dec 14
Posts: 10
Posted: Mon, 2017-02-27 13:35

AllPlay has sadly nothing to do with Spotify Connect, this was a wrong information. Most AllPlay-enabled speakers are shipped with Spotify Connect, that caused the confusion.

Ps. If you own an Android-device, send a message at the developer of the "AirAudio"-app for a hint ;-)
Won't publish the address here.

  • Up0
  • Down0
dotMorten
Join Date: 4 Feb 16
Posts: 14
Posted: Mon, 2017-02-27 15:54

Also note that my implementation does _not_ support multi-room. I haven't been able to reverse-engineer that bit, so sorry no sync support.

If you're up for helping reverse-engineer it, I could use the help! Unfortunately I only have one certified player, so I can't look at how they communicate.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.