MyRadio BETA 2.1 - By Torch

MyRadio is an alternate player for the PSP's Internet Radio Player introduced in firmware 3.80 and upwards. It allows you to access your PC media library from your PSP over the WiFi connection, either on your LAN, or even over the Internet!

MyRadio requires a web server with Perl support to be running on your PC, in order to serve the files to your PSP. On Windows systems I recommend using Apache web server, and ActivePerl. There are plenty of guides on the internet on how to setup Apache and ActivePerl on Windows.

A folder on your PC is chosen as the 'root' media folder. You will be able to browse all the subfolders of the 'root' folder, and play media files that are in this folder, using your PSP. The 'root' media folder must be accessibly through Apache.

Instructions:
1.Install Apache and get it working first.

2.Install ActivePerl to C:\Perl. Use the Windows Installer version.
After installing Perl, open a command prompt and type:
ppm install URI
ppm install File-Util

3.Copy the 'myradio' folder and paste it inside Apache's 'htdocs' folder.

4.Open Apache's 'conf' folder. Open the file 'httpd.conf'.

Scroll down till you find something like this:
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

Now after the </Directory> type the following on the next line:
(Change "F:/MP3/" to where ever your songs are stored.)

Alias /media/ "F:/MP3/"

<Directory "F:/MP3">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

(Change C:/apache2/ to wherever Apache is installed.)
<Directory "C:/apache2/htdocs/myradio">
    Options Indexes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

Now look for:
AddHandler cgi-script .cgi

Make sure that it is not commented, if it has a # before it, delete the #
If the line is not present at all, then add the line.

5.Edit the 'content.cgi' file in the 'myradio' folder and change the path's accordingly. For the above example, your public path to the media root will be "http://yourIPaddress/media" and the local path to the media root will be "F:/MP3".

If you have installed Perl in a location other than C:\Perl, then enter the new location in the first line of 'content.cgi'.

I suggest you set a password as well. However this will only protect the MyRadio GUI with a password. The media root will still browsable by anyone who directly types the media root address. To protect the media root as well, you require "Mod_Perl 2" to be installed. Look at the end of the readme for instructions. If you do not install modperl only the GUI will be password protected.

6. Get a Hex Editor and edit the 'MyRadio.prs' file. Replace "yourIPaddress" with your computer's IP.

7. Copy the MyRadio.prs file to your MemoryStick in the folder PSP\RADIOPLAYER

8. Start the Apache server on your PC and open the MyRadio link on your PSP to browse your media library!

Mod Perl 2:
To protect the media root from public access a mod_perl script is required. It cannot be protected by any other means because the PSP radio object does not support passing any kind of cookies or authorization information when accessing songs from the media root.

The protection is trivial because of limitations of the Radio control on the PSP. Basically what it does is, when someone successfully logs in to the MyRadio GUI, their IP address is given access to the media root for a short while.

You will have to setup Mod_Perl 2.0 on your own as the procedure is complex.
You MUST have Apache 2.2.8 or above, as there is a bug in previous versions which prevents Mod Perl 2.0 from working. The script is written for Mod_Perl 2.0 only and will not work with Mod_Perl 1.0.

Installation:

Extract the "modperl script.zip" to your modperl scripts folder (Or any folder in your perl "inc" path). It contains a subfolder MyRadio within which the script is located.

For example, extract it to "c:/Apache2/perl/".
Now you can add "c:/Apache2/perl/" to you "inc" path by adding the following line to your httpd.conf

	PerlRequire "c:/Apache2/perl/startup.pl"

Create a file "startup.pl" in that folder containing the following:

	use lib qw(c:/Apache2/perl);
	1;

Modify the paths according to your setup.


Finally in httpd.conf, the media root should be made to use the above script by modifying it's directory definition like so:

<Directory "F:/MP3">
		PerlAccessHandler MyRadio::AuthMedia
		
		Options Indexes
		Order allow,deny
		Allow from all
</Directory>
