User Tools

Site Tools


documentation:πbox:radio2pi_workshop_content

Radio2pi Workshop content


Radio2pi toolbox

A general workshop on radio broadcast with a pibox, that deconstructs all the tools used for the pibox, that can be of help to build another architecture, fork the pibox or understand better what's inside.

installation of Raspbian system on R-pi

start from scratch

Step 1: Install Raspbian system on the SDcard download the image on your computer https://www.raspberrypi.org/downloads/raspbian/ insert the sd card in your computer then follow the instructions here: https://www.raspberrypi.org/documentation/installation/installing-images/

Step 2 : connect to Raspberry on the same network introduce the SD card in the Raspberry pi connect ethernet cable then plug power To connect to Raspberry on the same network : Search devices connected to network on port 22 (default port for SSH connection) on macOSX : $ ifconfig You will get your network ip, ex. 192.168.1

Then with 'nmap', find devices connected to the network with port 22 open If you don't have nmap on MacOSX, you can get it here : https://nmap.org/dist/nmap-7.12.dmg

     $ nmap -p 22 --open 192.168.1.*

Then, find your Raspberry Pi ip on the nmap result and connect to your Raspberry on ssh for example :

     $ ssh pi@192.168.0.49

Step 3. raspi-config, update/upgrade

   $ sudo raspi-config

Recommended 1. change passwd (optional) 2. international > language, timezone 3. verify boot option B1 console user login

then update the system (1 mn)

   $ sudo apt-get update

and upgrade the system (can last a few minutes)

   $ sudo apt-get upgrade

step 4. LIBRAIRIES install utilitaries: libavtools (avconv) sox oggfwd libsndfile1-dev

   $ sudo apt-get install libav-tools sox oggfwd libsndfile1-dev

to see the documentation of each library:

   $ man sox
   $ man libav-tools ...

PI_FM_RDS

installation & test PiFmRds, explore the fonctions, test with a track mp3, wav, with a stream, listening on several frequencies (limit : 88 to 108 Mhz)

Step 1: Download PiFmRDS :

   $ mkdir /home/pi/downloads
   $ cd /home/pi/downloads
   $ wget https://github.com/ChristopheJacquet/PiFmRds/archive/master.zip
   $ unzip master.zip
   $ cd PiFmRds-master/src
   $ sudo make clean
   $ sudo make

try pifm_rds

   $ sudo ./pi_fm_rds -freq 108 -audio sound.wav

try a stream for ex. http://stream.p-node.org/billiejean.mp3 and adapt pi_fm_rds path to your pi it can be different

   $ avconv -i http://stream.p-node.org/billiejean.mp3 -f wav - | sudo ./pi_fm_rds -freq 108.0 -audio -

Step 3: Copy a file from your harddrive to play it

using scp

check manual

   $ man scp

basic syntax :

from your computer (open a new terminal):

the structure is : $ scp filepath user@ip:/path

example:

   $ scp /home/user/Desktop/sound.wav pi@192.168.1.132:/home/pi/downloads

be cautious when using it ⇒ it as it may erase files !

then from the pi terminal

    $ ls path _of_the_folder_where_your_file_is

About RDS broadcasting: https://github.com/ChristopheJacquet/PiFmRds

FM_Transmitter

Step 1: installation and test with fm_transmitter

   $ cd /home/pi/Downloads/
   $ sudo apt-get install make gcc g++
   $ wget https://github.com/markondej/fm_transmitter/archive/master.zip
   $ unzip master.zip
   $ cd fm_transmitter-master
   $ make

Step 2 : try

   $ sudo ./fm_transmitter -f 108 -r star_wars.wav

from a stream read by avconv

   $ sudo apt-get install libav-tools
   $ avconv -i http://stream.p-node.org:80/billiejean.mp3 -ac 1 -ar 22050 -f wav - | sudo ./fm_transmitter -f 108.0 -

FM Transmitter is more stable than PiFmRds, for streams broadcasting. There is a lot of others softwares like these ones. Let see an other one :

RPITX

installation and test rpitx

RPITX is able to broadcast on sstv, am fm etc .. from 130 kHz to 750 MHz. documentation : https://github.com/F5OEO/rpitx “all you need to do is plug in a wire antenna to Pin 12 (GPIO 18) on the GPIO port and run the PiTx software by piping in an audio file or image for SSTV.”

coderequisite : libsndfile1-dev (already installed before)

install git

   $ sudo apt-get install git

then install ritpx

   $ cd /home/pi/Downloads/

   $ git clone https://github.com/F5OEO/rpitx

   $ cd rpitx

   $ ./install.sh

test riptx

FSQ mode

   $ sudo ./testfsq.sh

   $ sudo text fsq => change (nano testfsq.sh repalce test with helloworld for ex.)

FM Mode broadcast on 108

   $ sudo ./testfm.sh

AM Mode

   $ sudo ./testam.sh

etc …

GQRX

http://gqrx.dk/

instlall Demo gqrx on Linux and on MacOSX > 10.9 and Raspbian or sdr# on Windows

or for MacosX <10.9 install RTL SDR https://github.com/2013-UQ-Communication-Systems/public/wiki/Installing-RTL-SDR-in-M

documentation/πbox/radio2pi_workshop_content.txt · Last modified: 2024/01/09 10:08 by pnode