Skip to content

rwth-afu/UniPager

Repository files navigation

UniPager

Build Status GitHub issues GitHub release

Universal POCSAG transmitter controller written in Rust.

Automatic Installation

This script installs UniPager fully automatically on Debian/Raspbian systems. It also uninstalls RustPager and migrates the old configuration file.

# Via HAMNET
curl http://db0sda.ampr.org/debian/install.sh -sSf | sh -s -- hamnet

# Via Internet
curl http://www.afu.rwth-aachen.de/debian/install.sh -sSf | sh -s -- internet

Configuration

The web interface for configuration is available on port 8073. Port 8055 must also be open to allow websocket communication between the browser and UniPager.

Raspberry Pi

Make sure that the serial port is activated. To do this add enable_uart=1 to /boot/config.txt, remove console=ttyAMA0,115200 from /boot/cmdline.txt and reboot.

This is not needed for the RASPAGERV1 and Audio transmitter type.

Update

Once the package is installed, you can install updates as for every other debian package with the following commands:

sudo apt-get update
sudo apt-get upgrade

Manual Installation from HAMNET

Create the file /etc/apt/sources.list.d/unipager.list with the following content:

deb http://db0sda.ampr.org/debian unipager main
deb-src http://db0sda.ampr.org/debian unipager main

Then execute the following commands:

wget -O - http://ci.db0sda.ampr.org/debian/rwth-afu.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install unipager

Manual Installation from Internet

Create the file /etc/apt/sources.list.d/unipager.list with the following content:

deb http://www.afu.rwth-aachen.de/debian unipager main
deb-src http://www.afu.rwth-aachen.de/debian unipager main

Then execute the following commands:

wget -O - http://www.afu.rwth-aachen.de/debian/rwth-afu.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install unipager

Local Compilation from source

Install rust:

curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly

Now reboot OR log out to make the rust toolchain available.

Log in again and clone the source:

git clone https://github.com/rwth-afu/UniPager.git

If this command fails, you may need to install git and try again:

sudo apt-get install git

Start the build:

cd UniPager
cargo build --release

The compiled binary will be created at ./target/release/unipager.

Be aware: Must be run with root privileges for GPIO access. Secondly it may be required to disable Bluetooth on newer Raspberry Pi models to make the GPIO UART usable.

Local Cross Compilation from source

Install rust:

curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly

Install the GCC cross compiler:

sudo apt-get install -qq gcc-arm-linux-gnueabi # for soft float
sudo apt-get install -qq gcc-arm-linux-gnueabihf # for hard float

Define the target:

# ARMv6 with soft float
export TARGET="arm-unknown-linux-gnueabi"

# ARMv6 with hard float (e.g. Raspberry Pi 1)
export TARGET="arm-unknown-linux-gnueabihf"

# ARMv7 with hard float (e.g. Raspberry Pi 2 and 3)
export TARGET="armv7-unknown-linux-gnueabihf"

Install the cross-compiled rust libraries:

rustup target add $TARGET

Create the file ~/.cargo/config with the following content:

[target.arm-unknown-linux-gnueabi]
linker = "arm-linux-gnueabi-gcc"

[target.arm-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"

Clone the source:

git clone https://github.com/rwth-afu/UniPager.git

Start the build:

cd UniPager
cargo build --target $TARGET --release

The cross-compiled binary will be created at ./target/$TARGET/release/unipager.