Repeater Controller configuration

From BATC Wiki
Jump to navigation Jump to search
Back to repeater controller main page

This page describes the setup of the BATC repeater controller - it should only be attempted by advanced users.

Note not all functions listed in the config file are currently implemented.

SSH Menu

Some configuration and some real-time control is possible using the ssh Console Menu.

To enter the repeater controller menu log in to the RPi by SSH using a program such as Putty and type menu.

Controller main.JPG

Reload

Loads the configuration changes you have made and restarts the controller

1 Behaviour

1 - Audio keepalive. Some HDMI switches permanently shut down the audio channel is no audio is present. This option puts low-level white noise on the controller audio out to prevent this from happening.

2 - Transmit enable. Enables transmit key line on pin xx

3 - Beacon mode. Enables the controller to just run in beacon mode and ignore all inputs.

4 - Power save. Enables transmit key line to be on continuously or just when the controller sees a valid input signal or when sending an ident.

5 - Operating hours. Selection of transmit key line to be active continuously or just during a timed period to save power. If timed, select the start and stop times. Note time is set using UTC time, not local time.

6 - Quiet hours repeat. If Timed operation was selected in menu 5, you can set if the repeater should repeat an input signal during the quiet time.

7 - Quiet hours ident. If Timed operation was selected in menu 5, you can set if the repeater should send the ident signal during the quiet time.

8 - Half hour. If enabled, the transmitter will only be keyed in beacon mode during the first 30 minutes of every hour and not during the 2nd half hour to save power.

9 - Quad auto enable. Enables the quad display to be automatically displayed when more than 1 selected inputs are present.

10 - Enable DTMF input. Enables over air DTMF control of the repeater

11 - Apply changes

12 - Return to main menu

2 Callsign

Entry of the repeater callsign and QRA locator for display on generated captions.

3 Inputs

1 - 7 Input. Enables priority of each input to be set

8 - Input count. Set this to the total number of inputs on the video switcher - Do NOT include the controller in this number.

9 - Active Hold. Determines if a higher priority input will override the currently selected input.

10 - Apply

11 - Main Menu

4 Control

Enables direct selection of any input source

5 Update

Check s/w version and update if needed.

6 Settings

1 - Reset factory defaults

2 - Check HDMI. Lists the HDMI settings for fault finding

3 - Main menu.

7 Diagnostics

8 Reboot

Editing the config file

The configuration file is too comprehensive for all the functions to be edited from a simple menu and more advanced customisation will require the careful editing of the text file /home/pi/atv-rptr/config/repeater_config.txt

Typical config file

The following is an example of a typical config with comments on each function - some functions are also available in the SSH menu

Introduction

Text file defining behaviour and config of the BATC HDMI Repeater Design
Comments must be on their own line
Read at boot time and only modified from console menu or text editor except transmitenabled which is amended by dtmfkeepertxoff or dtmfkeepertxon

Station Details - also in SSH menu

callsign=GB3HV

locator=IO91LD

Video output

Used to size captions and layout display only.  It does NOT set the output to hdmi720, hdmi1080, pal, ntsc 

vidout=hdmi1080

Ident and K CW audio output

This is used to set the output port (but not the hdmi keep-alive)
hdmi, jack or usb

audioout=hdmi

Low level audio - also in SSH menu

Turn on low level audio noise to keep hdmi audio active? yes/no

audiokeepalive=yes

audiokeepalivelevel=85

TX key logic - also in SSH menu (see above for description)

Enable/disable transmit ptt active? yes/no

transmitenabled=yes

Beacon mode only transmits carousel with ident.  Set to no for rptr operation. yes/no

beaconmode=no

Continuous TX or power-saving.  no/yes

transmitwhennotinuse=yes

Continuous operation or active hours only. yes/no

24houroperation=yes

Power save during second half hour in active hours?  Default no.
Repeat and Ident are available/active during this time

halfhourpowersave=no

Operating times are UTC.  Ignored for 24/7 operation

operatingtimestart=1300

operatingtimefinish=2330

Quiet hours behaviour:

repeatduringquiethours=no

identduringquiethours=no

Transmit PTT Demand physical pin

Recommended pin 40

pttgpiopin=40

Front Panel Shutdown Enabled?

Physical GPIO Pin (recommended 26)

fpshutdown=no

fpsdgpiopin=26

Local audio

(144.75 FM from usb audio dongle) audio could be inserted on carousel
Options are off, both, left right (mono from USB dongle)

carouselusbaudiomode=off

carouselusbaudiogain=100

DTMF repeater control

Uses white "Portsdown/Langstone" USB dongle input
These are just example commands - see DATV repeater DTMF commands for more details
Control is on/off.  Gain is %.  Timeout is in seconds

dtmfcontrol=on

dtmfaudiogain=62

dtmfactiontimeout=600


All dtmf codes are of the format *xx#.  Only xx isdefined below.  Examples:

dtmfreset=00

To display the controller status screen - includes GPIO pin status (see below)

dtmfstatusview=01

Select quad view

dtmfquadview=04

Select input

dtmfselectinput0=10

dtmfselectinput1=11

dtmfselectinput2=12

dtmfselectinput3=13

dtmfselectinput4=14

dtmfselectinput5=15

dtmfselectinput6=16

dtmfselectinput7=17

DTMF Keeper codes

In this example keeper codes are 5 digit and must start with 9 (*9xxxx#)
Turns Tx key on / off

dtmfkeepertxoff=97350

dtmfkeepertxon=97351

Reboot controller

dtmfkeeperreboot=97359

DTMF Accessory Control examples

DTMF input can also be used to control external equipment via the GPIO pins - a maximum of 10 devices can be connected.
Number of outputs

dtmfoutputs=1

Pin allocations

dtmfgpioout1pin=8

Label for status screen

dtmfgpioout1label=shack_light

DTMF commands to turn on and off

dtmfgpioout1on=31

dtmfgpioout1off=41

GPIO inputs

The controller can monitor GPIO pins and display their status on the status screen, displayed by DTMF *01#  Note: Due to an error in coding, these functions are called "dtmf"gpio inputs.
Number of inputs

dtmfinputs=1

Pin allocationa

dtmfgpioin1pin=8

Label for status screen

dtmfgpioin1label=cabinet_door

Background image for Caption Slides

Caption cards such as "K" and input identification are built by the controller on this back ground - to change this, replace the .jpg with a different file of the same resolution

backimage=/home/pi/atv-rptr/media/batc_background.jpg

Ident info

Audio is on/off, Pitch in Hz, speed in wpm, level is %

identinterval=900

identmediatype=jpg

identmediaduration=5

identmediafile=/home/pi/tmp/ident.jpg

identcwaudio=on

identcwspeed=15

identcwpitch=800

identcwlevel=50

identcwfile=/home/pi/tmp/ident.wav

K information

Pitch in Hz, speed in wpm, level is %

kmediatype=jpg

kmediaduration=5

kmediafile=/home/pi/tmp/k.jpg

kcwaudio=on

kcwspeed=20

kcwpitch=800

kcwlevel=50

kcwfile=/home/pi/tmp/k.wav

Carousel information

The carousel can have up to 99 scenes. Each scene can either be jpg, (mp4 not implemented in current release), status screen or a video source on the switcher.  Jpeg images are read each time the file is displayed.  For a video source, "file" is source number which can be an individual source or the multi grid, if supported by the video switch.
carouselscenes=5

carousel01mediatype=jpg
carousel01file=/home/pi/atv-rptr/media/HVtest.jpg
carousel01mediaduration=10

carousel02mediatype=jpg
carousel02file=/home/pi/atv-rptr/media/weather.JPG
carousel02mediaduration=10

carousel03mediatype=jpg
carousel03file=/home/pi/atv-rptr/media/75cbw.jpg
carousel03mediaduration=5

carousel04mediatype=jpg
carousel04file=/home/pi/custom_media/tropo.JPG
carousel04mediaduration=10

carousel05mediatype=source
carousel05file=4
carousel05mediaduration=30

The example above has 4 images and one source (so 5 scenes). The 5th scene is the quad view; source 4 is set up below to show the Quad to enable its inclusion in the carousel.

Note that the 4th image above is located in the /home/pi/custom_media folder. It is recommended that site-specific images are saved in that folder, which will not be over-written during software updates.

Input configuration

Recommended gpio pins for "input active" are 32, 35, 18, 22, 16, 19 and 21
announcemediatype determines the player used
hdmi switcher can use "ir" or "gpio" -  IR uses a TX on GPIO pin 12 -  GPIO uses pins 36, 37, 38, 33, 31, 29, 23, 24 
activeinputhold (yes/no) means that lower priority inputs do not get replaced by higher priority (except pri 1)
Show Quad is yes/no

availableinputs=4

activeinputhold=no

showquadformultipleinputs=yes

Output video switch config

outputswitchcontrol=ir

showoutputongpio=yes

outputhdmiresetcode=nec:0x17

Configure 2nd IR output

output2ndhdmicode=nec:0x08

outputhdmiquadcode=nec:0x18

Configure input 0 - always allocated to controller

input0name=Controller

output0code=nec:0x17

output0hdmiswitchpin=36

Configure input 1

The configuration for each input has 11 elements (currently).

The inputxname is the text name displayed on the "announce" caption and on the Configuration screen. The priority level can be set from 1 to 9. A priority level of 9 means that the input is not displayed unless it is viewed as part of the quad or is directly selected by a DTMF command.

The inputxactivegpiopin is the physical pin number that the attached receiver sets high to indicate that a signal is present. The IR code required to select the input and send it to the repeater output is stated in outputxcode. The format is protocol:hex code. A 2 is added to the beginning of the string if the the input is on the second, daisy-chained, hdmi switch (ie 2nec:0x12). If GPIO switching of outputs is used, the outputxhdmiswitchpin indicates which pin should be used. If an i2c-controlled video switcher is used, outputxi2cchannel indicates which channel should be selected to display that input. Similarly, if network commands are being used to control an ATEM switch through BitFocus companion, the tail end of the network command is defined by outputxnetcommand.

For audio i2c switching, the correct bit is set by outputxaudioi2cbit.

The default announce media settings work with the captions that are generated during repeater start-up. The can be cahnge for custom media if required.

input1name=Stream Input
input1prioritylevel=1
input1activegpiopin=32
output1code=nec:0x12
output1hdmiswitchpin=37
output1i2cchannel=2
output1netcommand=/press/bank/1/1
output1audioi2cbit=1
input1announcemediatype=jpg
input1announcemediafile=/home/pi/tmp/input1.jpg
input1announcemediaduration=3

Configure input 2

input2name=QO-100 RX
input2prioritylevel=2
input2activegpiopin=35
output2code=nec:0x59
output2hdmiswitchpin=38
output2i2cchannel=3
output2netcommand=/press/bank/1/2
output2audioi2cbit=2
input2announcemediatype=jpg
input2announcemediafile=/home/pi/tmp/input2.jpg
input2announcemediaduration=3

Configure input 3

input3name=3.4 GHz Ryde

input3prioritylevel=3

input3activegpiopin=18

output3code=nec:0x08

output3hdmiswitchpin=33

input3announcemediatype=jpg

input3announcemediafile=/home/pi/tmp/input3.jpg

input3announcemediaduration=3

===Input 4 configuration===

input4name=Quad View

input4prioritylevel=7

input4activegpiopin=22

output4code=nec:0x18

output4hdmiswitchpin=31

input4announcemediatype=jpg

input4announcemediafile=/home/pi/tmp/input4.jpg

input4announcemediaduration=3

Input 4 above is set to display the quad view. This enables it to be included in the carousel (as source 4).

Input 5 configuration

input5name=Mast Camera

input5prioritylevel=7

input5activegpiopin=16

output5code=2nec:0x12

output5hdmiswitchpin=29

input5announcemediatype=jpg

input5announcemediafile=/home/pi/tmp/input5.jpg

input5announcemediaduration=10

Input 6 configuration

input6name=Unused 6

input6prioritylevel=9

input6activegpiopin=19

output6code=2nec:0x59

output6hdmiswitchpin=23

input6announcemediatype=jpg

input6announcemediafile=/home/pi/tmp/input6.jpg

input6announcemediaduration=3

Input 7 configuration

input7name=Unused 7

input7prioritylevel=9

input7activegpiopin=21

output7code=2nec:0x08

output7hdmiswitchpin=24

input7announcemediatype=jpg

input7announcemediafile=/home/pi/tmp/input7.jpg

input7announcemediaduration=3