![]() |
DLNA notification hack
1 Attachment(s)
I created a small hack to allow the Media Player to see a DLNA Media Server which is the other side of a router which does not forward multicast messages. This is not a DLNA Remote Access implementation, and it doesn't handle NAT, firewalls, etc. It is just for cases where you have IP connectivity between the N900 and the media server but the multicast messages can't get through.
The hack is a python script which you run on your N900 (it runs on MeeGo as well). By default it only advertises the server to the local device although there is an option to advertise to the whole network (the part the multicasts can reach, anyway). To install it, get the .zip file attached to this post, unzip it and you will find a file called ssdp-fake.py. Copy that to your home directory on the N900, open an Xterm and run it as "./ssdp-fake.py <server>", where <server> is the IP address or hostname of your media server. I created this for my own use and I have only ever tested it with my server which is running MiniDLNA. If it doesn't work for you, sorry! Some people may still find it useful as a base to create a better program. Be aware that the script does NOT follow the DLNA rules for the messages. It is a quick hack. In particular, I do not recommend running more than one copy (for example to announce more than one server) each using the "-a" option as they will end up syncing their announcements (I should be randomising the delays but I am not). [This is also my first python program so I apologise for the horrible coding styles] |
Re: DLNA notification hack
Hi!
Media player on my N900 does not list my Media Server. Tried the hack but got an error "/bin/sh: ssdp-fake.py: not found" Please advise Thanks Lakshman |
Re: DLNA notification hack
Thank you very much, this was the missing piece to get DLNA to tunnel to N900 through ssh VPN tunnel.
There is small nuisance still: I don't get the standard Media player to recognize my DLNA server through tunnel. Mediabox and Zhaan are working. Does anybody use this "fake" advertisement with standard Media player? I create VPN tunnel with (inefficient...) ssh vpn with following commands ssh -f -w 0:2 myhost "(sleep 1; ifconfig tun2 192.168.0.99 pointopoint 192.168.0.30 ; arp -sD 192.168.0.30 eth0 pub )" ifconfig tun0 192.168.0.30 pointopoint 192.168.0.99 route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.0.30 tun0 route add myhost dev gprs0 route add default gw 192.168.0.1 route del default dev gprs0 |
Re: DLNA notification hack
Quote:
Try "./MyDocs/ssdp-fake.py <server>". If that does not work, use the "ls" command (the Linux directory listing command) to find where you have put ssdp-fake.py. Quote:
Maybe the fake announcements I create aren't right for your media server and, for some reason, Mediabox and Zhaan don't care but the Media Player does? If you want, you can use the script to see what announcements your media server is actually making. You need to run it on a system which is on the same LAN as the server and tell it to advertise a server which does not exist and then watch what multicast NOTIFY messages it reports seeing. The command would be something like: "./ssdp-fake.py -a 1.1.1.1" (I can't remember if the -a is needed). You will need to leave it several minutes. You should see something a bit like: Code:
Received multicast from 192.168.0.238:32776 Graham |
Re: DLNA notification hack
Quote:
I recommend you save it somewhere other than Mydocs and make sure you set the executable bit. |
Re: DLNA notification hack
Quote:
NT:urn:microsoft.com:service:X_MS_MediaReceiverReg istrar:1 Changing that line did not help. However, I noticed that Zhaan is key. If Zhaan is not running, Mediabox don't discover server. As soon as Zhaan is running, both Mediabox and Zhaan find server, Media player don't. Zhaans seems to duplicate the multicast messages that ssdp-fake is creating (and ssdp-fake ignores them). Maybe Zhaan is doing also something else besides multicasting. Oh well, I'm glad I get at least the Mediabox running with ssdp-fake and Zhaan. |
Re: DLNA notification hack
Quote:
I guess the real answer is a full remote DLNA implementation (which someone was working on in last year's GSoC but I don't think was completed). Until then, this is something which seems to work for me but it looks like it may not work for other people -- sorry. Graham |
Re: DLNA notification hack
Quote:
Quote:
|
All times are GMT. The time now is 16:36. |
vBulletin® Version 3.8.8