Skip to content

Commit

Permalink
Merge pull request #4 from Opendigitalradio/next
Browse files Browse the repository at this point in the history
Version 3.1.0
  • Loading branch information
colisee authored Aug 2, 2022
2 parents 69dbc74 + 8a13384 commit 35cd0c7
Show file tree
Hide file tree
Showing 14 changed files with 512 additions and 99 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ The goal of this repository is to provide a:
- Main components of the odr-mmbTools suite used in a transmission chain
- [Supervisor](http://supervisord.org/) package
- Simple yet functional dab configuration sample that you can adapt to your needs
- Vagrantfile that allows you to quickly setup a lite debian bullseye virtual environment over which to test ODR-mmbTools
- Vagrantfile that allows you to quickly run a DAB/DAB+ ensemble through a lite debian bullseye virtual environment
- Docker files that allow you to quickly run a DAB/DAB+ ensemble through containers

# ODR-mmbTools components
- Encoder-manager: provides a web interface to manage audio streams and their related PAD data
Expand All @@ -22,17 +23,19 @@ The goal of this repository is to provide a:
- Modulator: creates a modulation with the multiplexer data and sends it to a transmitter

# Repository structure
## install
This folder contains the installation/removal shell script. Please check the **README.md** file inside this directory to run the installation shell script
## config
This folder contains the sample configuration files. If you use the provided installation script, it will be copied on your system:
- config/odr-dabmod.ini: ODR-DabMod configuration
- config/odr-dabmux.info: ODR-DabMux configuration
- config/supervisor/ODR-encoders.conf: supervisor configuration file for all encoders (audio + PAD)
- config/supervisor/ODR-encoders.conf: supervisor configuration file for all other odr-mmbTools excluding the encoders
- config/mot/: folder with the dls and slide files
## install
This folder contains the installation/removal shell script. Please check the **README.md** file inside this directory to run the installation shell script
## docker
This folder contains Docker-related files. Please check the **README.md** file inside this directory to setup and run a DAB/DAB+ ensemble through docker.
## vagrant
This folder contains Vagrant-related files. Please check the **README.md** file inside this directory to setup and run a Vagrant box.
This folder contains Vagrant-related files. Please check the **README.md** file inside this directory to setup and run a DAB/DAB+ ensemble though a Vagrant box.

# Operations
In this section:
Expand Down
12 changes: 6 additions & 6 deletions config/supervisor/ODR-encoders.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# P01
[program:odr-padencoder-defee58a-f768-4ca9-a0f7-88f08b2e8748]
command=/usr/local/bin/odr-padenc
command=odr-padenc
--dir=/home/pi/config/mot/P01/slide
--sleep=0
--dls=/home/pi/config/mot/P01/INFO.dls
Expand All @@ -17,7 +17,7 @@ stdout_logfile=/var/log/supervisor/odr-padencoder-defee58a-f768-4ca9-a0f7-88f08b

# P01
[program:odr-audioencoder-defee58a-f768-4ca9-a0f7-88f08b2e8748]
command=/usr/local/bin/odr-audioenc
command=odr-audioenc
--vlc-uri=http://radiomonaco.ice.infomaniak.ch/radiomonaco-128.mp3
--drift-comp
--silence=60
Expand All @@ -28,7 +28,7 @@ command=/usr/local/bin/odr-audioenc
--pad=34
--pad-socket=defee58a-f768-4ca9-a0f7-88f08b2e8748
--write-icy-text=/home/pi/config/mot/P01/INFO.dls
-e tcp://127.0.0.1:9001
--edi tcp://127.0.0.1:9001
--stats=/var/tmp/P01.stats
autostart=false
autorestart=false
Expand All @@ -40,7 +40,7 @@ stdout_logfile=/var/log/supervisor/odr-audioencoder-defee58a-f768-4ca9-a0f7-88f0

# P02
[program:odr-padencoder-7158c498-1ef1-4580-b385-23a3c06ba985]
command=/usr/local/bin/odr-padenc
command=odr-padenc
--dir=/home/pi/config/mot/P02/slide
--sleep=0
--dls=/home/pi/config/mot/P02/INFO.dls
Expand All @@ -57,7 +57,7 @@ stdout_logfile=/var/log/supervisor/odr-padencoder-7158c498-1ef1-4580-b385-23a3c0

# P02
[program:odr-audioencoder-7158c498-1ef1-4580-b385-23a3c06ba985]
command=/usr/local/bin/odr-audioenc
command=odr-audioenc
--vlc-uri=http://media-ice.musicradio.com/CapitalMP3
--drift-comp
--silence=60
Expand All @@ -68,7 +68,7 @@ command=/usr/local/bin/odr-audioenc
--pad=34
--pad-socket=7158c498-1ef1-4580-b385-23a3c06ba985
--write-icy-text=/home/pi/config/mot/P02/INFO.dls
-e tcp://127.0.0.1:9002
--edi tcp://127.0.0.1:9002
--stats=/var/tmp/P02.stats
autostart=false
autorestart=false
Expand Down
42 changes: 42 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Introduction
[Docker](https://www.docker.com) packages software into standardized units for development, shipment and deployment.

This folder brings you the files needed to run the encoders (audio and PAD), the multiplexer and the modulator through containers. 3 docker images are available from the [docker registry](https://hub.docker.com). They can be ran on amd64, arm64 and arm/v7 architectures:
- [opendigitalradio/encoders](https://hub.docker.com/r/opendigitalradio/encoders)
- [opendigitalradio/dabmux](https://hub.docker.com/r/opendigitalradio/dabmux)
- [opendigitalradio/dabmod](https://hub.docker.com/r/opendigitalradio/dabmod)

# One-time setup
1. Install Docker on the host that will run the containers
1. Clone this repository or copy the dab-scripts/docker directory on the host
1. Adapt file `config/odr-dabmod.ini` to match your transceiver hardware and local RF spectrum
1. Adapt file `odr.env` to suit your configuration. Then run the following command:
```
source odr.env
```

# Customized setup (changing the sample configuration)
1. Adapt file `config/ODR-encoders.conf` to suit your needs
1. Adapt file `config/odr-dabmux.info` to match the content of file `config/ODR-encoders.conf`
1. Adapt the structure of directory `config/mot` to match the content of file `config/ODR-encoders.conf`

# Operations
1. Create a docker volume, named `odr` with the configuration files:
```
docker run \
--interactive \
--tty \
--rm \
--volume $(pwd)/config:/mnt/source \
--volume odr:/mnt/dest \
ubuntu:22.04 \
bash -c "cd /mnt/source ; cp -R * /mnt/dest"
```
1. Start broadcasting the DAB/DAB+ ensemble (3 containers, named `odr-encoders`, `odr-dabmux` and `odr-dabmod`)
```
docker compose up --detach
```
1. Stop broadcasting the DAB/DAB+ ensemble
```
docker compose down
```
50 changes: 50 additions & 0 deletions docker/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
services:

encoders:
image: opendigitalradio/encoders
container_name: odr-encoders
depends_on:
- multiplexer
environment:
- TZ=${TZ}
ports:
- "8001:8001"
volumes:
- "odr:/config"
command: /config

multiplexer:
image: opendigitalradio/dabmux
container_name: odr-dabmux
environment:
- TZ=${TZ}
ports:
- "9001-9016:9001-9016"
- "9201:9201"
- "12720-12722:12720-12722"
volumes:
- "odr:/config"
command: /config/odr-dabmux.info

modulator:
image: opendigitalradio/dabmod
container_name: odr-dabmod
depends_on:
- multiplexer
environment:
- TZ=${TZ}
ports:
- "9400:9400"
volumes:
- "odr:/config"
devices:
- "${MOD_DEV}"
command: /config/odr-dabmod.ini

networks:
odr:
external: true

volumes:
odr:
external: true
Empty file added docker/config/mot/P01/INFO.dls
Empty file.
Binary file added docker/config/mot/P01/slide/P01-logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added docker/config/mot/P02/INFO.dls
Empty file.
Binary file added docker/config/mot/P02/slide/P02-logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions docker/config/odr-dabmod.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[remotecontrol]
telnet=0
telnetport=2121
zmqctrl=0
zmqctrlendpoint=tcp://0.0.0.0:9400

[log]
syslog=0
filelog=0
filename=odr-dabmod.log

[input]
transport=edi
source=tcp://odr-dabmux:9201

[modulator]
gainmode=var
digital_gain=0.8
rate=4096000

[cfr]
enable=0
clip=50.0
error_clip=0.1

[firfilter]
enabled=1

[poly]
enabled=0
polycoeffile=polyCoefs

[output]
output=soapysdr

[soapyoutput]
device=driver=hackrf
master_clock_rate=32768000
txgain=23
channel=5A
bandwidth=1750000
99 changes: 99 additions & 0 deletions docker/config/odr-dabmux.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
general {
dabmode 1
nbframes 0
syslog false
tist false
managementport 12720
}

remotecontrol {
telnetport 12721
zmqendpoint tcp://lo:12722
}

ensemble {
id 0x4fff
ecc 0xe1
local-time-offset auto
international-table 1
reconfig-counter hash
label "Micro DAB"
shortlabel "M DAB"
}

services {
srv-01 {
id 0xb1c7
ecc 0xe2
label "RADIO MONACO"
shortlabel "MONACO"
pty 10
pty-sd static
language 0x0f
}
srv-02 {
id 0xc479
ecc 0xe1
label "CAPITAL LONDON"
shortlabel "CAPITAL"
pty 10
pty-sd static
language 0x09
}
}

subchannels {
sub-01 {
type dabplus
bitrate 128
id 1
protection 3
inputproto edi
inputuri "tcp://0.0.0.0:9001"
buffer-management prebuffering
buffer 40
prebuffering 20
}
sub-02 {
type dabplus
bitrate 128
id 2
protection 3
inputproto edi
inputuri "tcp://0.0.0.0:9002"
buffer-management prebuffering
buffer 40
prebuffering 20
}
}

components {
comp-01 {
service srv-01
subchannel sub-01
user-applications {
userapp "slideshow"
}
}
comp-02 {
service srv-02
subchannel sub-02
user-applications {
userapp "slideshow"
}
}
}

outputs {
edi {
destinations {
edi_tcp {
protocol tcp
listenport 9201
}
}
}

; Throttle output to real-time (one ETI frame every 24ms)
throttle "simul://"
}
Loading

0 comments on commit 35cd0c7

Please sign in to comment.