Announcing version 1.00 of SharkPlay - plugin which enables controlling & playing an FM/AM tuner from Griffin Technology - the USB radioSHARK2 ( http://www.griffintechnology.com/products/radioshark2 ). This version of the plugin only works on SC 7.1-7.2.
The rationale for this plugin was - Reducing download usage (and charges) when listening to local radio. - Local radio internet feeds are poor quality compared to FM. - Ensure a reliable radio stream for alarm when ISP does not provide a reliable service. The plugin uses an small application called shark2 which sends command to radioSHARK to set the frequency and turn on/off the leds. The original shark2 application was written by Michael Rolig with subsequent mods by other (see http://javier.rodriguez.org.mx/index.php/2007/05/20/use-the-radioshark-2-under-linux-shark2c ) The Windows version of the plugin includes a Windows port of the shark2 utility and also uses the wavin2cmd utility written by Joe Bryan for the WaveInput plugin. BASIC OPERATION. Once installed - there is a SharkPlay menu in Extras on WebUI, SB and SBC. Click on SharkPlay menu and you will a favorites list and a "manual tuning" entry where users can enter a frequency from webUI, SB remote or SBC controller. The Sharkplay favorites list is just like favorites. It seems to be useful to have the possibility to keep the FM/AM presets separate from Internet radio. A user can also make entries in the standard top-level Favorites with the URL prefix "shark://" so that the Favorite with URL "shark://104.0" will tune to FM 104.0 MHz and "shark://1090" would tune into AM 1090kHz. The user can add Title and Subtitle parameters to the URL to get extra text or override the Favorites name. for example shark://98.1?Title=Rock FM&Subtitle=live radio WINDOWS INSTALLATION. 1. Install and test radioSHARK. Make sure the installed software is at least v2.1 found here - http://www.griffintechnology.com/software/0000/0022/radioSHARK_v2.1.exe and that all installation steps are performed including those in the Sound control panel. 2. Using the Griffin Radio find a radio station with a good signal - note the frequency as you need this to test SC operation. 3. Download the attached Zip file sharkplay-win-100.zip. This zip file includes necessary executables radioshark.exe and wavin2cmd.exe. 4. Unzip the zipped file into server/Plugins so that you have a Plugins/SharkPlay 5. Before starting SC make sure radioShark2 is installed and working as radioShark2 detection is only carried out at SC startup. 6. Start SqueezeCenter - check in Settings there is a Plugin called SharkPlay and in Advanced/FileTypes there should be "RadioShark" entries enabled to use wavin2cmd. 7. In Settings/Plugins/SharkPlay/Settings - The main setting is the Audio You can select the audio capture source to be used. The audio source is named slightly differently in XP and Vista so select a source with "radioSHARK" in the name. 8. Optionally in Settings you can select whether you want the blue or red should light when in use. 9. To test, Use Tune-in (or create a Favorite) with the URL shark://98.1 if your test frequency is 98.1 In practice you will use the frequency you noted in Step 2 instead of the example 98.1. AM/FM is decided by frequency number FM = 87.9-108 and AM 530-1750. On Windows it seems there is no lockout for the radioSHARK device, both the Windows radio app and SC plugin can use the radioSHARK audio stream - whichever app tunes last selects the frequency and LED display. LINUX INSTALLATION. The shark2 application which is used to tune the radioSHARK requires access to USB devices. On most Linux system, USB devices have permissions such that only root can write to them. For this plugin to work either USB devices are opened to all users or shark2 is owned by root and marked such that it runs as root. The second method is preferred way as it does not open the USB devices. Some users are wary of unknown programs running as root in which case source code is provided for shark2 and those users can examine the code and build their own copy. The default installation assume an ALSA audio subsystems and that arecord is installed - this works for many mainstream distros (e.g. OpenSUSE, Ubuntu). To support OSS or use another app besides arecord - changes needs to be made to the custom-convert.conf file and the sharkplay.sh script. 1. Stop SC 2. The shark2 applications requires two Linux packages to be installed. Install libusb and libhid libraries usually through the distros package manager. 3. Plugin radioShark. 4. Download the sharkplay-linux-100.tar.gz file attached to this post. 5. Untar the tar.gz file into server/Plugins such that you have a directory Plugins/SharkPlay. Change ownership and permissions of the files to suit your system. 6. The following steps test shark2 application to make sure it works. 6a. At a command prompt - cd to the Plugins/Sharkplay/Bin 6b. try the command ./shark2 - you should get usage text of options. 6c. If shark2 did not run with "Permission denied" - make sure it is executable by using the command chmod +x shark2. Try step 3b again. 6d. Once you get the usage text then try the following command ./shark2 -red 1. If it works the radioSHARK red led will light - success go to step 4. If it fails with "hid_force_open failed with return code 7" means shark2 cannot find the radioSHARK USB device - check the cables and try step 6d again. If it fails with "hid_force_open failed with return code 12" it means shark2 cannot access USB devices and needs to be run as root. As root change owner of shark2 to root (i.e command chown root shark2 )and then set the Set UID bit on permissions (i.e. command chmod +s shark2 . Then try step 6d again. 7. Check that Plugins/SharkPlay/Bin/sharkplay.sh is also executable by all users. 8. Start SqueezeCenter - check in Settings there is a Plugin called SharkPlay and in Advanced/FileTypes there should be entries "RadioShark" enabled to use sharkplay.sh. 9. In Settings/Plugins/SharkPlay/Settings the "Name of RadioShark audio stream device" field needs to have a valid device of ther forms hw:<cardno>,<device no> where <card number> and <device number> depends on your system. With Radioshark plugged in, use the arecord -l command. This will produce a number of lines of output - one line will be like card 1: radioSHARK [radioSHARK], device 0: USB Audio [USB Audio] So for this example the device is hw:1,0 as it is card 1 and device 0. For a standard PC the ALSA device hw:1,0 seems to work and so it is the default value. 10. To test, Use Tune-in (or create a Favorite) with the URL shark://98.1 if your test frequency is 98.1 In practice you will use a local known frequency instead of the example 98.1. AM/FM is decided by frequency number FM = 87.9-108 and AM 530-1750. +-------------------------------------------------------------------+ |Filename: sharkplay-linux-100.tar.gz | |Download: http://forums.slimdevices.com/attachment.php?attachmentid=6203| +-------------------------------------------------------------------+ -- bpa ------------------------------------------------------------------------ bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806 View this thread: http://forums.slimdevices.com/showthread.php?t=54926 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/lists/listinfo/plugins
