Edits by Christoph
- I strongly suggest you change the password with the command passwd (vagrant's password is vagrant)
- Set the proper timezone on the raspberry. You can identify the timezone values with the command timedatectl list-timezones
sudo timedatectl set-timezone "your_timezone" (without "")
- Clone the production branch of the repository
cd
sudo apt-get install -y git
git clone https://github.com/MaxDeepCoder/rpi-dab-tx.git
- Run the installation script:
bash rpi-dab-tx/install.sh
Then wait.
and wait..
and wait...
The goal of the rpi-dab-tx project is to run a Digital Audio Broadcasting, software-defined-radio transmitter on a raspberry-pi device. For this, you will need:
- 1 raspberry pi running the latest version of raspi os (a debian-derived linux operating system) or a computer capable of running a virtual host
- 1 soapy-sdr compatible transceiver device, such as the Hackrf One or the LimeSDR cards
- Raspberry Pi 1 ❌ Too Slow (Untested)
- Raspberry Pi 2 ❓❌ Slow? (Untested)
- Raspberry Pi 3 ✅ Max 4 streams or it crashes (Tested)
- Raspberry Pi 4 ✅ (Works well)
- Raspberry Pi 5 ❓ (Untested)
- Raspberry Pi 0 ❌ (Untested)
- Raspberry Pi 0w ❌ (Untested)
- Raspberry Pi 2w ❓ (Untested)
This project:
- Uses the odr-mmbtools software stack developed by the Open Digital Radio non-profit association
- Uses the soapy-sdr library
- Provides sample configuration files that will allow you to broadcast a multiplex with 2 radio stations (Radio Monaco and Capital FM London). You can naturally change the content of these files to suit your needs.
This project was initially designed with the model 3B of the Raspberry pi. As of version 1.2.0, it can also run on a virtual Debian system.
Since some software components, like the modulator, are CPU-intensive, it is preferable to configure the system with a clean Debian-lite system.
- Download rpi-imager onto your computer (Windows, MacOS or linux). This software will allow you to initialize the SD-card with the operating system
- Run rpi-imager on your computer. Click on "Choose OS", then on "Raspberry Pi OS (other)" and select "Raspberry Pi OS Lite (32-bit or 64-bits)"
- Click on "Choose storage" and select your SD-card device
- Click on the setup button to set specific parameters (like a ssh access, user profile/password)
- Finally click on the write button to install the operating system on your SD-card
- Remove the SD-card from your computer and insert it into your raspberry pi. Then switch it on
- Log into the raspberry pi (default user profile pi and password raspberry)
- Install VirtualBox on your physical host (WIndows, MacOs, non-debian Linux, *BSD*)
- Install VirtualBox Extension Pack on your physical host
- Install Vagrant on your physical host
- Start Virtualbox
- Open a command prompt on your physical host
- Copy the Vagrantfile from this repository
- Create and start the Debian virtual session:
vagrant up
- Log into the Debian virtual session as user vagrant:
vagrant ssh
- Update the Debian system by running:
sudo apt-get update; sudo apt-get upgrade -y
- Log off and quit the virtual session:
exit
- Stop the virtual session:
vagrant halt
- Connect the SoapySDR-compatible transceiver card to the host system
- Add a USB filter to your VirtualBox session (named dab_tx) for your SoapySDR-compatible card
- Restart the virtual session:
vagrant up
- Login again into your virtual session:
vagrant ssh
- I strongly suggest you change the password with the command passwd (vagrant's password is vagrant)
- Set the proper timezone on the raspberry. You can identify the timezone values with the command timedatectl list-timezones
sudo timedatectl set-timezone your_timezone
- Clone the production branch of the repository
cd
sudo apt-get install -y git
git clone https://github.com/MaxDeepCoder/rpi-dab-tx.git
- Or clone the dev branch of the repository if you want to test the latest features (but expect possible bugs)
git clone https://github.com/MaxDeepCoder/rpi-dab-tx.git --branch dev
- Run the installation script:
bash rpi-dab-tx/install.sh
Then wait.
and wait..
and wait...
Point your web browser to the Supervisor web interface on the RaspberryPI or on the Virtual host (default user profile odr and password odr) to start and stop each components of the DAB/DAB+ transmitter: modulator, multiplexer, encoders (audio & data), encoder-manager and multiplex-manager.
- Encoder-manager: allows you to manage audio streams and related PAD
- Audio encoder: one per radio station being broadcasted. Packs the radio web stream and the data from the PAD encoder and shares it with the multiplexer
- PAD encoder: one per radio station being broadcasted. Gathers data (artist, song, radio slogan and radio logo) and shares it with the related audio encoder
- Multiplexer: packs the data from the audio encoders into a DAB/DAB+ ensemble, called Micro DAB
- Multiplex-manager: allows you to view and modify some multiplex parameters
- Modulator: creates a modulation data from the multiplexer and sends it to the SDR transceiver card
- SDR transceiver card: broadcast the DAB ensemble. The initial radio channel is 5A and can be changed, should this channel already be used in your area
- To start all services, I recommend you start the encoders (audio & pad) first, then the multiplexer and finally the modulator
- To stop all services, I recommend that you do not use the STOP ALL button but that you stop the multiplexer first (this will trigger a clean stop of the modulator). Once the modulator is off, you can use use the STOP ALL button to close the remaining jobs.
- To start a component, click on that component start action link
- You can monitor each component output by clicking on the component action Tail -f stdout or Tail -f stderr
If you want to change the default user profile and/or user password authorized to access Supervisor, then apply the following command:
sudo sed -e 's/^username = odr/^username = whatever_user/' -e 's/^password = odr/^password = whatever_password/' -i /etc/supervisor/supervisord.conf
Please note that whatever_user is not related to any linux profiles
If you want to change the default user profile and/or user password authorized to access Encoder-manager, then apply the following command:
sed -e 's/"username": "odr"/"username": "whatever_user"/' -e 's/"password": "odr"/"password": "whatever_password"/' -i $HOME/dab/conf-em.json
Please note that whatever_user is not related to any linux profiles
If your hardware/virtual host is powerful enough, then you should set the following 2 parameters in the $HOME/dab/mod.ini file to more stringent value:
- [modulator] rate=4096000
- [firfilter] enabled=1
If channel 5A is being used in your area, you can easily switch to a new transmission channel by applying the following command: sed -e 's/^channel=5A/^channel=a_free_channel_in_your_area/' -i $HOME/dab/mod.ini
This project is configured for the HackRF One SDR transceiver card.
If you are using another SoapySDR-compatible transceiver card, then apply one of the following commands:
- LimeSDR:
sed -e 's/^device=driver=hackrf/^device=driver=lime/' -i $HOME/dab/mod.ini
- PlutoSDR:
sed -e 's/^device=driver=hackrf/^device=driver=plutosdr/' -i $HOME/dab/mod.ini
Also, check the SoapySDR documentation for your card to set the proper values for other SoapySDR fields, like txgain.
If you want to change the name of the multiplex (by default Micro DAB), then change the label and shortlabel values within the ensemble block in file $HOME/dab/conf.mux
- Start job 21-Multiplex-Manager
- Point your web browser to the Multiplex Manager web interface on RaspberryPi or on Virtual host
If your Raspberry PI or your virtual host is powerful enough, then you can add more services/sub-channels/components
- Start job 10-EncoderManager from the Supervisor web access
- Point your web browser to the Encoder Manager web interface on RaspberryPi or on Virtual host (default user profile odr and password odr) to manage your audio streams and related PAD.
- You can use the excellent radio browser directory to identify the url of the radio audio stream
- Test the radio audio stream url with vlc on your computer (not the raspberry) and check the bit rate
- Open file $HOME/dab/conf.mux and decide wich service you want to modify (srv-01 or srv-02) and change all parameters (id, ecc, label, shortlabel, pty, language) accordingly. I recommend you use the values mentionned in the official ETSI TS 101 756 document.
- If you added more channels, then make sure that the new sub-channels match the new encoders you added previously