FM radio API

Introduction
chumbradiod is a small daemon application that hosts information about a Chumby radio over HTTP, and also allows for real time configuration of the FM radio parameters. Chumbradiod was build using the Chumby Radio API.

Status Usage
chumby:/# service_control chumbradiod start

You should then be able to access the status of the chumby radio by opening any web browser to the page http://ip:8081/radio/status.xml

Status Response
You will receive an XML response giving the current FM radio status...

        
 * Example 1 (device found)

     
 * Example 2 (device found, RDS enabled)


 * Example 3 (device not found)

Configuration Usage
You can also configure the radio using an HTTP query string http://ip:8081/radio/configure

There are several commands available...

http://ip:8081/radio/configure?station=94.9
 * Set radio station

http://ip:8081/radio/configure?seek_up=1
 * Seek radio up

http://ip:8081/radio/configure?seek_down=1
 * Seek radio down

http://ip:8081/radio/configure?rds=1
 * Enable RDS support in status messages. Note this will cause chumbradiod to use about 2% more CPU.

http://ip:8081/radio/configure?seek_strength=20
 * Set seeking strength

http://ip:8081/radio/configure?rescan=1
 * Refresh the list of available stations

http://ip:8081/radio/configure?power=1
 * Turn on the radio and begin playing through the speakers

http://ip:8081/radio/configure?country=us http://ip:8081/radio/configure?country=jp http://ip:8081/radio/configure?country=ch http://ip:8081/radio/configure?country=eu http://ip:8081/radio/configure?country=it http://ip:8081/radio/configure?country=xx
 * Set the country, which defines tuning frequency ranges. Note you'll probably want to issue a rescan at the same time.

http://ip:8081/radio/configure?key=12345&lock=1
 * Lock the configuration interface with key 12345. Note that once locked, you'll need to specify the same "key" every time you issue a "configure" request.  Unlock by sending the key, along with "lock=0".

You may set multiple options at once. The last option part will take affect.

http://ip:8081/radio/configure?station=94.9&power=1
 * Configure multiple options

Country Listing
You can get a list of supported countries by calling http://ip:8081/radio/countries

 <country iso="eu" start="87.00" stop="108.00" spacing="100"/> <country iso="it" start="87.00" stop="108.00" spacing="50"/> <country iso="jp" start="76.00" stop="90.00" spacing="100"/> <country iso="us" start="87.50" stop="108.00" spacing="200"/> <country iso="xx" start="76.00" stop="108.00" spacing="10"/>

Configuration Response
You will receive a response in the form of XML, notifying the result of each configuration command...

<result-list> <result command="station" status="success"/> <result command="power" status="success"/> </result-list>
 * example 1 [all success]

<result-list> <result command="station" status="failure"/> <result command="power" status="success"/> </result-list>
 * example 2 [partial success, partial failure]

Note that you will only receive a result for commands you have sent in the query string.