tpot (at) frungy . org
|
Mon, 28 Feb 2005Anthony Baxter has written a nice little upnp script that runs as a UPnP client (Linux Media Server will run as a UPnP server). It looks for voice over IP gateways by M-SEARCH'ing for urn:schemas-upnp-org:device:InternetGatewayDevice:1. It's a good example of Twisted Python in action. I've nearly figured out how to get internet radio working on the Z400. Using twisted.web.soap and the SOAPpy modules, my script responds to internet radio browse requests but not with anything sensible yet. I suspect that the contents of the .pls file that describes the radio station is returned in the search response, rather than returning a URL which I think is how audio and video files are served. Update: fixed broken link as shtoom moved to a different version of viewcvs or something like that. posted at: 10:25 | path: /pvr | permanent link to this entrySun, 27 Feb 2005Linux Media Server Detected by Z400 OK I have got some neat stuff working on the Z400 now. My twisted media server listens for and responds to SSDP M-SEARCH datagrams and now appears in the list of servers when you look for media servers on the network. The script points the Z400 at a twisted web server which returns descriptors (big XML files) of the various SOAP endpoints for managing content and connections. The Z400 now bombs out trying to make SOAP remote procedure calls so the next step is to try and implement some of these calls and see what happens. I did have a lot of trouble trying to get all this working over wireless. Seemingly all the time, the Z400 would not respond to ARP requests and thus TCP connections, SSDP responses, pings etc. I plugged in to the wired port and everything worked immediately. This might explain some problems with the Zensonic Windows media server not being able to see the Z400 that I have noticed when playing around.. There's a topic on the Zensonic Forum for Operating Systems other than Windows, Using the Z400 on Linux/Mac/etc... dated the 17th of September 2004. "First and foremost, Zensonic Corporation have chosen to release the Z400 to support Microsoft Windows only. This decision remains final" No replies posted yet. )-: Hopefully the first reply will appear sometime soon! Also, I need a name for my project. Linux Media Server is kinda boring, and anyway Twisted Python can run on Windows as well as Linux/Unix. I guess I am at Stage 1: Pre-bickering of development in my open source project. posted at: 19:31 | path: /pvr | permanent link to this entryTue, 22 Feb 2005According to some random person on the Internet, the z400 is based on the same hardware as the D-Link DSM-320. DSM-320 hacking page can be found here. posted at: 17:50 | path: /pvr | permanent link to this entryI still think Twisted Python is the bee's knees. Here's the skeleton of a WBEM server that listens for HTTP POST requests on port 5988 and SSL encrypted ones on port 5989.
Of course it's missing the actual implementation of the server, but now we have all the boring sockets crap out of the way in 20 lines of code. Unfortunately there is a bit of a learning curve in getting started with twisted. Taking a peek in the source to work out what is going on is the best way I have found to get some tricky stuff happening. UPDATE: Removed logfile parameter to twisted.server.site.Site() as it defaults to no log file. posted at: 16:02 | path: /computers/programming | permanent link to this entrySat, 19 Feb 2005Twisted Python is a great little framework for writing networked clients and servers. Here's a quick little script to listen in on what UPnP announcements the Z400 is making:
(The tricky bit was performing the joinGroup() as the multicast examples used the "all hosts" address (224.0.0.1) which doesn't require a multicast join. The Z400 is searching for a UPnP media server: and announcing itself as a root device:M-SEARCH * HTTP/1.1 MX: 3 ST: urn:schemas-upnp-org:device:MediaServer:1 HOST: 239.255.255.250:1900 MAN: "ssdp:discover" and a bunch of other UPnP endpoints:NOTIFY * HTTP/1.1 LOCATION: http://192.168.1.103:54877/ HOST: 239.255.255.250:1900 SERVER: POSIX, UPnP/1.0, Intel MicroStack/1.0.1497 NTS: ssdp:alive USN: uuid:PC00:0f:3d:fa:0d:93::upnp:rootdevice CACHE-CONTROL: max-age=1800 NT: upnp:rootdevice USN: uuid:AV00:0f:3d:fa:0d:93 USN: uuid:AV00:0f:3d:fa:0d:93::urn:schemas-upnp-org:device:MediaRenderer:1 USN: uuid:AV00:0f:3d:fa:0d:93::urn:schemas-upnp-org:service:AVTransport:1 USN: uuid:AV00:0f:3d:fa:0d:93::urn:schemas-upnp-org:service:ConnectionManager:1 USN: uuid:AV00:0f:3d:fa:0d:93::urn:schemas-upnp-org:service:RenderingControl:1 I guess it's time to look at writing a UPnP media server. Google pops up a couple of proprietary ones: TwonkyVision Media Server, and the Allegro Media Server but no sign of any open source ones. posted at: 22:13 | path: /pvr | permanent link to this entryFri, 18 Feb 2005I installed my Z400 this morning. I plugged it in to the TV, configured it and updated to the latest firmware over the Internet without too much hassle. As mentioned in one of the reviews, there is no way to configure a ESSID or WEP key using the configuration wizard but this is supposedly fixed in the latest firmware revision. There's a small amount of user interface crack though. Zensonic's combo-box widget (i.e a list of alternatives of which you can choose one) is a bit hard to use. There is a red ball next to the currently selected option which has really tiny white up and down arrows to indicate that there are more choices to be made. A more traditional implementation, maybe a dropdown list, I think would work better. The next step is to install the Windows server software in VMWare and start figuring out how to write a Linux replacement. Should be fun. It's supposed to be based on the Universal Plug-and-Play standard which, after a bit of research, looks like some XML over HTTP thingy. posted at: 11:22 | path: /pvr | permanent link to this entryThe Programmatic Horseman of the Apocalypse From Slashdot:
As another poster puts it, "I'm Hungarian, and a progammer, you insensitive clod!" posted at: 11:22 | path: /humour | permanent link to this entryThu, 17 Feb 2005Apparently I haven't been updating my blog often enough with no posts for the month of January. (-: I've decided to build my own PVR. A friend has one of the dual tuner DVB-T Topfield boxes which has amazing quality for free-to-air broadcasts here in Canberra for only about A$800. Last time I priced an equivalent TiVo box (including network card) it came up to about the same price. The plan at the moment is to build a back-end RAID server running Linux with two or three DVB-T cards that sits in the garage or spare room. Pack it with hard drives and install MythTV and you have a TiVo/Topfield killer. For viewing recorded programs, the MPEG2/4 files can either be downloaded to a laptop for viewing on planes, hotels etc when travelling, or a set-top box that takes ethernet on one side and TV out on the other. (There's nothing like being able to watch some quality British drama instead of stupid American crap). I've chosen the Zensonic Z400 as the set top box side of things. It's a great looking unit with wired and wireless ethernet as input, and analong component video, S-Video or composite output. I ordered a unit last week and it has just turned up - very cool. Unfortunately the little sticker that says "warranty void if removed" wasn't stuck on properly and I ripped it trying to stick it down. Grr. posted at: 16:54 | path: /pvr | permanent link to this entry | ||||||||||||||||