Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/labkaxita/pifmradio
Turn your Raspberry pi into a small FM radio with pifm! This daemon listens on port 8000 for a audio stream and broadcast it through FM
https://github.com/labkaxita/pifmradio
Last synced: 3 months ago
JSON representation
Turn your Raspberry pi into a small FM radio with pifm! This daemon listens on port 8000 for a audio stream and broadcast it through FM
- Host: GitHub
- URL: https://github.com/labkaxita/pifmradio
- Owner: labkaxita
- License: gpl-3.0
- Created: 2013-08-18T13:16:55.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-18T13:26:39.000Z (about 11 years ago)
- Last Synced: 2024-07-14T12:38:16.059Z (4 months ago)
- Language: C
- Size: 125 KB
- Stars: 7
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - labkaxita/pifmradio - Turn your Raspberry pi into a small FM radio with pifm! This daemon listens on port 8000 for a audio stream and broadcast it through FM (others)
README
PiFM radio
==========Turn your `Raspberry pi`_ into a small FM radio with `pifm`_! This daemon
listens on port 8000 for a audio stream and broadcast it through FM.The audio stream must be a 16 bit mono 22050 Hz PCM.
It can be controlled on port 8080 to change emitting frequency, start or
stop the emission or gather information.Install
-------No install required, simply run the pifmradio.py script. Ensure pifm binary
is in the same folder as pifmradio.py (bundled with this code).Currently the listening ports and address must be changed in the code, wait
for the next version :-)Usage
-----Start PiFMRadio on the server::
python pifmradio.py
Control the radio with a client, the control.py script included with
PiFMRadio or the `pifm_client_controller`_ for android.Control protocol
----------------The control daemon uses json for communication.
All commands return a *retval* string indicating if the operation succeeded
(*"OK"* or *"ERROR"*).Currently implemented commands:
info
~~~~Get current frequency and running status of the server.
This commands takes no argument. The response includes *status* boolean
indicating if server is emitting or not, and *freq* with the current
frequency as a string.json message::
{'command':'info'}
Sample response::
{'retval':'OK', 'status':true, 'freq':'107.4'}
start
~~~~~Start the emission.
This command takes no argument. *retval* *OK* when the emission starts, or
*ERROR* if the emission was already started.json message::
{'command':'start'}
Sample response::
{'retval':'OK'}
stop
~~~~Stops the emission.
This command takes no argument. *retval* *OK* when the emission stops, or
*ERROR* if the emission was already stopped.json message::
{'command':'stop'}
Sample response::
{'retval':'OK'}
sintonize
~~~~~~~~~Change the emitting frequency.
This command takes one argument, *freq* with the target frequency. *retval*
*OK* when the frequency is effectively changed or *ERROR* if there was any
trouble.json message::
{'command':'sintonize', 'freq':'90.5'}
Sample response::
{'retval':'OK'}
exit
~~~~Terminates current control session.
This command takes no argument. *retval* 'OK' always.
json message::
{'command':'exit'}
Sample response::
{'retval':'OK'}
quit
~~~~Kill the emission and the control server.
This command takes no argument. *retval* 'OK' always.
json message::
{'command':'exit'}
Sample response::
{'retval':'OK'}
.. _pifm: http://www.icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry_Pi_Into_an_FM_Transmitter
.. _Raspberry pi: http://www.raspberrypi.org/
.. _pifm_client_controller: https://github.com/interferencies/pifm_client_controller