A sales droid that managed the account at a past company gave my friends and I the EZStream media player as kinds of “spiffs” for doing business with them. Not that it did provide them any extra business, and the device was the 802.11b version, not the G.
So I finally have a use for the device; my wife likes to listen to country music to go to sleep to, yet the #1 radio format nation-wide has no stations in the New York City area. Hey, I’ll use the EZStream.
I hook it up to my clock radio with MP3 input (The Timex T307S) and power it up. After setting it up to use my DSL wireless with WEP (so old there’s no WPA-PSK), I try out the internet radio stations… There’s a whole whopping 50 stations. And the one country station doesn’t actually work.
I then ponder how to replace this damn thing. 802.11b is bad, 50 stations is worse…
I could buy a Roku SoundBridge M1000 System, but that’s 200 bucks…
Or I could get a Silm Devices Squeezebox, but since they sold out to Logitech, their prices are still wack.
Nope, I’m going to have to see what I need to do to get this thing to play the stations I want.
The mediaserver software that came with the device has an iRadio tab. So I put in some stations, turned on the server, however, all the stations get rejected by the device. It can’t play any of them.
What to do what to do….
So here’s what I did…
In the device’s network config, one can set a “Proxy”… So I set that to my Squid server. I then went to the Internet Radio config, and had that manually update, and I tcpdump’d the tcp stream.
The device calls home, to www.radiosmc.com. The URL has some other information in it, such as your device’s MAC address, software version, and the hardware version. So I went to radiosmc… It seems that for the luxury of programming your own preset stations, you have to pay a monthly fee. Joy of joys.
However, the file that returns to the device is of such simplicity, the key to it is redirecting the device’s get to a file of your own.
File Format:
It’s a simple XML file. There’s an XML Header:
<?xml version=”1.0″ encoding=”iso-8859-1″ standalone=”yes”?>
Followed by the main container, the station_db:
<station_db version=”2007-01-14T15:03:48Z” format_version=”2.0″ station_count=”48″>
The key things here are to always incrememnt the version number (kinda like DNS) and to make sure the station count is correct.
The next lines pertain to the database info:
<database_info>
<format_version>2.0</format_version>
<name>vTuner</name>
I’d keep this all the same.
Next is the URL the device goes to update it’s list:
<server_url>http://www.radiosmc.com/setupapp/smc1/asp/rsdb/update.asp</server_url>
Eventually you’ll want to change this so you no longer have to redirect in Squid (covered later).
Then the service level:
<service>BASIC</service>.</database_info>
I left this the same too. Don’t want to hurt it, just change the stations.
Now we get to the meat of the file, the station list:
<station_list>
Stations are 6 points of data:
- The Station ID (Unique Identifier)
- Station Name
- What the short name listed in the chooser of the device - Description
- The Long name if you get info on the station (i.e. the Info button on the remote) - Bandwidth of the station (kbps)
- URL of the station
- Mime_Type of the station
So, a standard station looks like this:
<station>
<id>4392</id>
<station_name>WBHM</station_name>
<description>classical music streaming to the Internet from Birmingham, Alabama with a touch of NPR here and there.</description>
<bw>56</bw>
<url>http://www.wbhm.org:8000/live</url>
<mime_type>m3u</mime_type>
</station>
So repeat this until you have the number of stations you want (Make sure to put the right number up in the station_db tag). When you’re done with stations, you close out the station_list tag and open a directory list tag:
</station_list>
<directory_list>
The Directory list is very important; it is how the stations are organized in the player. The format is based upon directories. For example, the first line:
<dir name=”Internet Radio” subdir_count=”3″ station_count=”0″ >
states that the name to display is “Internet Radio”, that there are 3 Subdirectories under this directory, and that there are 0 stations under this directory. The next tag is a “Genres” subdirectory, and under that is “Adult Contemporary”… Under that is “All stations”, of which there are two AC stations:
<dir name=”Genres” subdir_count=”28″ station_count=”0″ >
<dir name=”Adult Contemporary” subdir_count=”3″ station_count=”0″ >
<dir name=”All Stations” subdir_count=”0″ station_count=”2″ >
<station>8512</station>
<station>12049</station>
</dir>
Use the station tag to link back to the unique id in the ID tag for the station, and then close the directory.
The most annoying thing was the Country part, so with my file I just left all that out. Who cares if you’re listening to an AC station from Canada or Germany?
When you’re done with all your directories close the directory list, and the station db, and you’re done:
</dir>
</dir>
</dir>
</directory_list>
</station_db>
So, now you’ve got your xml file, how to get the device to fetch it? Its your friendly neighborhood Squid proxy to the rescue!
Squid (http://www.squid-cache.org/) has a nice feature called URL Redirection:
# TAG: redirect_program
# Specify the location of the executable for the URL redirector.
# Since they can perform almost any function there isn’t one included.
# See the FAQ (section 15) for information on how to write one.
# By default, a redirector is not used.
#
#Default:
# none
In your squid.conf file, you can use a simple program to redirect all URLs. What I did here was add a line of code to the conf:
# TAG: redirect_program
# Specify the location of the executable for the URL redirector.
# Since they can perform almost any function there isn’t one included.
# See the FAQ (section 15) for information on how to write one.
# By default, a redirector is not used.
#
#Default:
# none
redirect_program /usr/lib/squid/redir.pl
and then created a simple perl script to redirect the URL to my xml file:
redir.pl
#!/usr/bin/perl
$|=1;
while (<>) {
s@http://www.radiosmc.com/.*@http://example.com/mystations.xml@;
print;
}
Reload the config, and manually update the Internet Radio list, and boom, I’ve got all the stations you want.
Now, is this stealing? Well, ethically I look at it this way: I was given a device that had I bought it, would have been like buying an FM radio, but one without a tuner. Then I had to pay someone to program my preset buttons.
SMC does not provide any content; it’s not like XM or Sirius. They are not providing the network connection, they are not providing the Audio content, nor are they paying the streamers for that content. I’m sure there’s some sort of monetary exchange between staiton and RadioSMC, but I’m not sure in what direction. The device retails for about $110, and the service they sell on top of that is a $30 one time fee. Why not charge $140 for the device and allow the enhanced service for free? Poor customer service>
My Stationlist can be found at http://www.alde.com/mystations.xml


