[19. April 2013] A-400 Advanced Network Setup now available | [11 Jan. 2013] Customize your A-400 Home Screen

Firmware: A-400 [13 May 2013] | C-300 [30 Nov. 2012] | A-300 [30 Nov. 2012] | C-200 [21 Jan. 2013] | A-200/A-210 [10 Aug. 2012]

Just got your NMT | WIKI has the answers | Search the forum | Forum Rules/Policy | Firmware & Official NMT News | Popcornhour manuals



User(s) browsing this thread: 1 Guest(s)
Post Reply 
[200] Airplay server for C200 and A100
01-04-2011, 06:56 PM
Post: #16
RE: Airplay server for C200
Found this article a little while back which talks about reverse-engineering the AirTunes stream. Apparently, there is both an encrypted and unencrypted version of the stream depending on what device you are streaming to. It is an older article, so things may have changed, but it might prove useful in unlocking more features for us.

http://blog.technologeek.org/airtunes-v2
Find all posts by this user
Add Thank You Quote this message in a reply
01-04-2011, 07:29 PM
Post: #17
RE: Airplay server for C200
(01-04-2011 06:56 PM)infinite.recursion Wrote:  Found this article a little while back which talks about reverse-engineering the AirTunes stream. Apparently, there is both an encrypted and unencrypted version of the stream depending on what device you are streaming to. It is an older article, so things may have changed, but it might prove useful in unlocking more features for us.

http://blog.technologeek.org/airtunes-v2

Interesting, but to be convinced I'd like to see someone who has implemented this. Is there any software available that makes a PC act as an AirTunes client? (i.e. iTunes detects your PC as a destination for audio).
Find all posts by this user
Add Thank You Quote this message in a reply
01-04-2011, 07:34 PM (This post was last modified: 01-04-2011 07:35 PM by halfelite.)
Post: #18
RE: Airplay server for C200
(01-04-2011 01:27 PM)popcornmix Wrote:  Another request. I play photos with a request like:
http://<popcorn IP>:8008/playback?arg0=start_pod&arg1=My-Test-Photo&arg2=http://jquery.com/demo/thickbox-3/images/plant1.jpg&arg3=1&arg4=rot0&arg5=bghide

which doesn't display the photo immediately. You still need to press source button and switch to app mode.
The equivalent video playback command does not require this.

Anyone know how to switch to app mode programmatically? E.g. from a http request, as a shell command or from C code?

There is a api option called load_page it might switch over to flash I know there is an arg to tell it to switch from flash but not sure if there is one telling it to go to flash. Make sure you have gotten the sdk api docs in the last couple weeks as there were updated again with new commands. I know there is an arg to tell it to switch from flash but not sure if there is one telling it to go to flash.
Find all posts by this user
Add Thank You Quote this message in a reply
01-04-2011, 07:42 PM
Post: #19
RE: Airplay server for C200
(01-04-2011 07:29 PM)popcornmix Wrote:  Interesting, but to be convinced I'd like to see someone who has implemented this. Is there any software available that makes a PC act as an AirTunes client? (i.e. iTunes detects your PC as a destination for audio).

I think there is a Mac implementation called AirFoil, not sure what the state of progress is on it yet. From what I understand the AirPlay audio stream is AES encrypted with a one-time key that is sent encrypted via asymmetric key encryption. The two links below explain it in a little more detail. They are also a year or more old, so it is possible that someone has made more progress with this since.

http://en.wikipedia.org/wiki/Remote_Audi...t_Protocol

http://mailman.videolan.org/pipermail/vl...54010.html

I'll keep doing some more research into this to see what I can come up with.
Find all posts by this user
Add Thank You Quote this message in a reply
01-04-2011, 08:32 PM
Post: #20
RE: Airplay server for C200
(01-04-2011 07:34 PM)halfelite Wrote:  There is a api option called load_page it might switch over to flash I know there is an arg to tell it to switch from flash but not sure if there is one telling it to go to flash. Make sure you have gotten the sdk api docs in the last couple weeks as there were updated again with new commands. I know there is an arg to tell it to switch from flash but not sure if there is one telling it to go to flash.

It seems that will get me back from flash mode, but not into it. Just found this:

2.3.22 send_key
Send remote control key to command server.
Parameter Description Data Type
arg0 Function name String
arg1 Any options returns from list_key function String
arg2 Call this command from, possible value:
playback
photo
screen_saver
browser
flashlite

Maybe:
http://<IP>:8008/system?arg0=send_key&arg2=source&arg3=flashlite

Will try when I get home.
Find all posts by this user
Add Thank You Quote this message in a reply
01-05-2011, 03:40 AM
Post: #21
RE: Airplay server for C200
(01-04-2011 08:32 PM)popcornmix Wrote:  It seems that will get me back from flash mode, but not into it. Just found this:

2.3.22 send_key
Send remote control key to command server.
Parameter Description Data Type
arg0 Function name String
arg1 Any options returns from list_key function String
arg2 Call this command from, possible value:
playback
photo
screen_saver
browser
flashlite

Maybe:
http://<IP>:8008/system?arg0=send_key&arg2=source&arg3=flashlite

Will try when I get home.

I got bored and gave the line above a try, it kicks back the following code from Firefox:
Code:
<?xml version="1.0" encoding="UTF-8" ?><theDavidBox><request><arg0>send_key</arg0><arg1>source</arg1><arg2>flashlite</arg2><module>system</module></request><response></response><returnValue>0</returnValue></theDavidBox>

Not sure if that provides enough useful information, hope it helps.
Find all posts by this user
Add Thank You Quote this message in a reply
01-05-2011, 01:45 PM (This post was last modified: 01-05-2011 01:49 PM by popcornmix.)
Post: #22
RE: Airplay server for C200
That command does the same as pressing source, and brings up the browser/flash option. I still needed an "enter" to display the photo.
I believe this sequence will display the photo.

http://<popcorn IP>:8008/playback?arg0=start_pod&arg1=My-Test-Photo&arg2=http://jquery.com/demo/thickbox-3/images/plant1.jpg&arg3=1&arg4=rot0&arg5=bghide
http://<popcorn IP>:8008/system?arg0=send_key&arg2=source&arg3=flashlite
http://<popcorn IP>:8008/system?arg0=send_key&arg2=enter

It didn't work immediately from code - I probably need to poll first command until it is in playing mode. I also should check we're not already in flash mode...
(01-04-2011 02:26 PM)dc11ab Wrote:  I made a basic CSI package of the rev3.
...
Anyway; please test, I'll repackage if needed.
Temporary location: http://www.cerveras.es/feed/Airplay-nmt.zip
(Download, open CSI; menu -> File -> Install from file)

It doesn't seem to work. The bonjour service is running. The airplay-nmt app is running. iPhone can see the NMT. But no video plays. Not obvious what is wrong, I'll try looking a bit more tonight.
Find all posts by this user
Add Thank You Quote this message in a reply
01-05-2011, 02:24 PM
Post: #23
RE: Airplay server for C200
I didn't do much; stripped the binary and added the daemon.sh to invoke airplay.nmt (with the possible \001-issue). I'm sorry I can't be of much use testing it out :-(

I'll make third hacky attempt, using the original unstripped binary and wrapping the original launcher.

I hope the package framework can be of use once the quirk is ironed out.


As for the photo issue: if the polling trick doesnt work, perhaps the command service on port 30000 can be used as a workaround.

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
Add Thank You Quote this message in a reply
01-05-2011, 08:06 PM (This post was last modified: 01-05-2011 08:09 PM by popcornmix.)
Post: #24
RE: Airplay server for C200
(01-04-2011 02:26 PM)dc11ab Wrote:  If anyone else wishes to maintains this package, remember to use the default /bin/tar cvf (...) on the NMT to create the CSI tar file.

That's annoying. I read it, but thought *my* tar will be just as good. It isn't!
Found a workaround. Use busybox (like the NMT). There's a win32 build here:
http://dl.dropbox.com/u/5943991/busybox-w32/busybox.exe

That allows me to package and upload in a script.
Find all posts by this user
Add Thank You Quote this message in a reply
01-05-2011, 08:12 PM (This post was last modified: 01-05-2011 08:15 PM by dc11ab.)
Post: #25
RE: Airplay server for C200
OK, my last attempt for CSI package: http://www.cerveras.es/feed/Airplay-nmt.zip
I have the unstripped airplay-nmt, and call the launch-airplay-nmt from the daemon-sh. I had to add the & to put the ./airplay-nmt in the background, and I think I stuck in another -b to the mDNSrespd, otherwise untouched. Found some typos in the daemon.sh which are corrected as well.

It starts both the bonjour service and airplay-nmt, but that's as far as I can see. Crossing fingers.

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
Add Thank You Quote this message in a reply
01-05-2011, 09:07 PM
Post: #26
RE: Airplay server for C200
(01-05-2011 08:12 PM)dc11ab Wrote:  OK, my last attempt for CSI package: http://www.cerveras.es/feed/Airplay-nmt.zip

Thanks. Working now. The r4 download on googlecode is suitable for installing with CSI.
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to popcornmix for this post
01-05-2011, 10:24 PM
Post: #27
RE: Airplay server for C200
Made some minor tweaks (file `version' was empty, although that's for documentation/info purposes only, and there was some missing quotes in the appinfo.json and other really trivial stuff) and packaged the rev4 Airplay-nmt.zip CSI package:
http://www.cerveras.es/feed/Airplay-nmt.zip

But I can't test what I package, and that feels awkward, so this will be the last 'release' on my server. I hope I contributed with something useful so far.

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
Add Thank You Quote this message in a reply
01-05-2011, 11:03 PM
Post: #28
RE: Airplay server for C200
(01-05-2011 10:24 PM)dc11ab Wrote:  But I can't test what I package, and that feels awkward, so this will be the last 'release' on my server. I hope I contributed with something useful so far.

Thanks. You've been very helpful. I will get it working with iTunes soon. Airflick would be another option if you have a Mac (or it gets ported elsewhere).
Find all posts by this user
Add Thank You Quote this message in a reply
[+] 1 user says Thank You to popcornmix for this post
01-06-2011, 02:02 PM
Post: #29
RE: Airplay server for C200
That's good news. Thanks to both of you!

Media Player: Popcorn Hour C-200 (with Samsung SpinPoint HM500JI, Lite-On iHOS104-37 and Alpha WMP-ND02 WLAN-Module)
TV: Grundig Vivance 32 LXW 82-6710 REF
Receiver: Topfield 5000 PVRt (with 160 GB HD)
Sound: LG FB162-DOU
NAS: Netgear ReadyNAS NVX RNDX400E
Find all posts by this user
Add Thank You Quote this message in a reply
01-06-2011, 05:01 PM
Post: #30
RE: Airplay server for C200
(01-05-2011 11:03 PM)popcornmix Wrote:  Airflick would be another option if you have a Mac (or it gets ported elsewhere).
Hey, didn't know about Airflick, I shall give it a try on my Mac!

Audio, video, disco - I hear, I see, I learn.
Wiki. Wiki? Wiki!
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [100/200/300/400] How to install remote syslog server on NMT A-200 jwalczak 0 150 05-10-2013 05:00 PM
Last Post: jwalczak
  [200] Airplay with A-210 fischgourmet 1 325 03-11-2013 12:12 PM
Last Post: fischgourmet
  [400] how to convert scripts from c200 (html+php) to a400 (javascript or bash or ???) ? dmhwsm 0 421 02-10-2013 05:39 PM
Last Post: dmhwsm
  [100/200/300/400] fuppes - v0.660 UPnP A/V Media Server - Updated 15th Dec vaidyasr 14 4,711 01-01-2013 03:55 AM
Last Post: Uisge
  [200] Using PopcornHour C200 as frontend for MythTV/MythWeb schaumburg 13 6,814 01-01-2013 01:02 AM
Last Post: flitter
  [200] Compiling SqueezeSlave for C200 papaiannis 15 3,619 12-21-2012 04:54 PM
Last Post: papaiannis
  [100/200/300/400] List of UPnP/DLNA Server Applications - For NMT vaidyasr 0 1,033 12-10-2012 08:37 AM
Last Post: vaidyasr
  [200/300] Logitech Media Server v7.7.1 vaidyasr 59 12,605 11-20-2012 01:29 PM
Last Post: losAntonis
  [200] C200 and software raid xray 14 2,558 11-19-2012 08:41 PM
Last Post: seba0902
  [200] Network command for shut down on C200 JamesTF 6 1,438 11-14-2012 09:24 PM
Last Post: opfeifer

Forum Jump: