diff --git a/docs/configure.md b/docs/configure.md new file mode 100644 index 0000000..4f8cb25 --- /dev/null +++ b/docs/configure.md @@ -0,0 +1,11 @@ +# Configure FieldPOC + +``` +services.fieldpoc = { + enable = true; + ommIp = "10.42.132.2"; + ommUser = "omm"; + ommPasswordPath = pkgs.writeText "ommpassword" "rfpL43wlan"; + sipsecretPath = pkgs.writeText "sipsecret" "c1e0aba8e0fc3ed3"; +}; +``` diff --git a/docs/hardware.md b/docs/hardware.md new file mode 100644 index 0000000..3a52bc2 --- /dev/null +++ b/docs/hardware.md @@ -0,0 +1,18 @@ +# Required hardware + +These are the hardware requirements for a minimal working system. + +## DECT Antenna + +FieldPOC is automation around the management API of Mitel DECT systems. +So you need to have a [Mitel RFP 3rd gen](https://howto.dect.network/#hardware-rfp-generations). +Our development setup currently uses an RFP 43 WLAN. + +## Powering the Antenna + +The RFP gets powered using PoE, so make sure you have a **PoE Injector** + +## Telephony Server + +The telephony server should be a x84 64bit computer with two Gigabit Ethernet RJ45 ports. +In out case we use an APU Board, but it doesn't really matter. diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..ec14746 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,3 @@ +# FieldPOC + +A simple to use, good enough phone system for medium sized DECT networks. diff --git a/docs/installation.md b/docs/installation.md new file mode 100644 index 0000000..f7a2e6d --- /dev/null +++ b/docs/installation.md @@ -0,0 +1,16 @@ +# Installation overview + +FieldPOC requires a bunch of components to work together. +We guide you through the setup of a minimal working system. +Follow it in order and you will end up with a working setup. + +1. Required hardware +2. Install NixOS +3. Install FieldPOC +4. Configure networking +5. Configure FieldPOC +6. Prepare RFP +7. Setup OMM +8. Have DECT + +There are plenty of options to extend the system and we try to document them in the following sections. diff --git a/docs/network.md b/docs/network.md new file mode 100644 index 0000000..c351bb3 --- /dev/null +++ b/docs/network.md @@ -0,0 +1,55 @@ +# Configure networking + +The hardware should have two network interfaces, so we can use one interface to connect the telephony server to the internet and access for management. +The other network interface is used to connect to the DECT antenna. + +## Management and internet interface + +You can configure the interface for management and internet access how you like it. +Usually leaving it with doing DHCP is totally find. + +## Interface for DECT antenna + +The telephony server is acting as a router for the DECT antenna. + +The network interface used in this example is called `enp3s0`. +Replace it with the name of your own interface. + +Assign a static IP address to the interface: + +``` +networking.interfaces.enp3s0.ipv4.addresses = [ { address = "10.42.132.1"; prefixLength = 24; } ]; +``` + +Phoning over the internet involves weird protocols. +Because configuring firewalls for that use-case is hard, we disable the NixOS firewall on that interface. +We can do that safely, as only the DECT antenna is connected to it and we have to trust it anyway. + +``` +networking.firewall.trustedInterfaces = [ "enp3s0" ]; +``` + +### Configure DHCP server + +FieldPOC ships with some configuration wrapper that helps setting up the DHCP server required for the DECT antennas. + +``` +services.fieldpoc = { + dhcp = { + enable = true; + interface = "enp3s0"; + subnet = "10.42.132.0/24"; + pool = "10.42.132.200 - 10.42.132.250"; + router = "10.42.132.1"; + dnsServers = "10.42.10.8"; + omm = "10.42.132.2"; + reservations = [ + { + name = "omm"; + macAddress = "00:30:42:1b:8c:7c"; + ipAddress = "10.42.132.2"; + } + ]; + }; +}; +``` diff --git a/docs/nixos.md b/docs/nixos.md index 375eaa0..1c68b8f 100644 --- a/docs/nixos.md +++ b/docs/nixos.md @@ -1,8 +1,14 @@ -# NixOS deployment +# Install NixOS -## Add flake +To coordinate all the different components, FieldPOC is packaged with NixOS. +Follow [the official installation guide](https://nixos.org/manual/nixos/stable/#ch-installation) to install NixOS on you telephony server. +You can use the minimal installer, as we don't need graphical user interface. -Add input: +## Add FieldPOC packages + +FieldPOC is provided as a Flake. + +Add the following inputs to your `flake.nix`: ``` inputs.fieldpoc.url = "git+https://git.clerie.de/clerie/fieldpoc.git"; @@ -17,35 +23,3 @@ Add input modules to your system: fieldpoc.nixosModules.default ``` -## Use module - -``` -networking.interfaces.enp3s0.ipv4.addresses = [ { address = "10.42.132.1"; prefixLength = 24; } ]; -networking.firewall.trustedInterfaces = [ "enp3s0" ]; - -services.fieldpoc = { - enable = true; - ommIp = "10.42.132.2"; - ommUser = "omm"; - ommPasswordPath = pkgs.writeText "ommpassword" "rfpL43wlan"; - sipsecretPath = pkgs.writeText "sipsecret" "c1e0aba8e0fc3ed3"; - dhcp = { - enable = true; - interface = "enp3s0"; - subnet = "10.42.132.0/24"; - pool = "10.42.132.200 - 10.42.132.250"; - router = "10.42.132.1"; - dnsServers = "10.42.10.8"; - omm = "10.42.132.2"; - reservations = [ - { - name = "omm"; - macAddress = "00:30:42:1b:8c:7c"; - ipAddress = "10.42.132.2"; - } - ]; - }; -}; -``` - - diff --git a/docs/omm.md b/docs/omm.md index ada7b5d..a1dc5f9 100644 --- a/docs/omm.md +++ b/docs/omm.md @@ -1,4 +1,18 @@ -# OMM +# Setup OMM + +OMM stands for Open Mobility Manager. +It is there to manage multiple RFPs. + +## Designate OMM + +The OMM is a pice of software that can be hosted stand-alone or you can designate a RFP to be the OMM. +In setups operating FieldPOC it is usually totally fine and recommended to just designate a RFP to be the OMM. + +RFPs automatically host the OMM when they receive their own IP address in the OMM field via DHCP. + +## Management interface + +The OMM exposes a web interface at their IP address. ## Setup @@ -7,7 +21,7 @@ - Set password for login `omm` - Set password for login `root` -### PARK +### Activate license 1. Go to `System` -> `System Settings` and find row `PARK`. 2. Load PARK file as explained in [howto.dect.network](https://howto.dect.network/#system-settings). diff --git a/docs/rfp.md b/docs/rfp.md new file mode 100644 index 0000000..9a6cb50 --- /dev/null +++ b/docs/rfp.md @@ -0,0 +1,11 @@ +# Prepare RFP + +Before adding an RFP to your FieldPOC setup do a [software update](https://howto.dect.network/#software-update) and [factory reset them](https://howto.dect.network/#factory-reset). + +## Connecting RFP + +Connect the RFP with the PoE injector and then with the network interface of your telephony server that carries the network for the DECT antennas. + +RFPs will take a while to boot. +First only one LED will glow. +After a while more will add. diff --git a/flake.nix b/flake.nix index 2ccc30c..1f86575 100644 --- a/flake.nix +++ b/flake.nix @@ -103,6 +103,26 @@ yate = pkgs.yate.overrideAttrs (old: { configureFlags = [ "--with-libpq=${pkgs.postgresql.withPackages (ps: [ ])}" ]; }); + + docs = pkgs.stdenv.mkDerivation { + pname = "fieldpoc-docs"; + version = "0.0.1"; + + src = ./.; + + buildInputs = [ + pkgs.python3.pkgs.mkdocs-material + ]; + + buildPhase = '' + python3 -m mkdocs build + ''; + + installPhase = '' + mkdir -p $out + cp -r ./site/* $out/ + ''; + }; }; nixosModules = { diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..da9873d --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,15 @@ +site_name: FieldPOC + +theme: + name: material + +nav: + - index.md + - Installation: + - installation.md + - hardware.md + - nixos.md + - network.md + - configure.md + - rfp.md + - omm.md