|
|
|
@ -1,8 +1,9 @@
|
|
|
|
|
---
|
|
|
|
|
title: MMDVM hotspot on Archlinux
|
|
|
|
|
summary: On a Raspberry Pi 2
|
|
|
|
|
date: 2024-01-28T10:10:11+0000
|
|
|
|
|
lastmod: 2024-01-28T20:50:19+0000
|
|
|
|
|
summary: I wrote down the installation of a forked DStarGateway with a slim
|
|
|
|
|
dashboard based on Javascript on a Raspberry Pi 2.
|
|
|
|
|
date: 2024-01-28T23:12:00+0100
|
|
|
|
|
#lastmod:
|
|
|
|
|
categories:
|
|
|
|
|
- amateur-radio
|
|
|
|
|
tags:
|
|
|
|
@ -247,74 +248,89 @@ $ sudo systemctl disable serial-getty@ttyAMA0.service
|
|
|
|
|
Open `/boot/cmdline.txt` and remove `console=serial0,115200` from the line. Save
|
|
|
|
|
and reboot.
|
|
|
|
|
|
|
|
|
|
Another problem occurs, I will probably have to flash an actual firmware to the modem.
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
|
|
~~~console
|
|
|
|
|
E: Received a NAK to the SET_CONFIG command from the modem
|
|
|
|
|
I: MMDVMHost-20240126 exited on receipt of an unknown signal
|
|
|
|
|
~~~
|
|
|
|
|
### DStarGateway
|
|
|
|
|
|
|
|
|
|
But we need another compiler. I install [paru](https://github.com/morganamilo/paru)
|
|
|
|
|
to get that compiler with its dependencies.
|
|
|
|
|
### MMDVMHost
|
|
|
|
|
|
|
|
|
|
The installation of paru is very easy:
|
|
|
|
|
### dgwtimeserver
|
|
|
|
|
|
|
|
|
|
~~~console
|
|
|
|
|
$ sudo pacman -S --needed base-devel
|
|
|
|
|
$ git clone https://aur.archlinux.org/paru.git
|
|
|
|
|
$ cd paru
|
|
|
|
|
$ makepkg -si
|
|
|
|
|
~~~
|
|
|
|
|
## Install a dashboard
|
|
|
|
|
|
|
|
|
|
~~~console
|
|
|
|
|
$ paru -Syu
|
|
|
|
|
$ paru -S arm-linux-gnueabihf-gcc
|
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
Oh hell, this is going to take ages on the Raspberry Pi 2...
|
|
|
|
|
I will install the [dashboard from John Hays (K7VE)](https://github.com/johnhays/dsgwdashboard)
|
|
|
|
|
as my first look at it looked promising (using Javascript (which is executed
|
|
|
|
|
on the client and not the server) may reduce the load on the webserver).
|
|
|
|
|
[Past installations of dashboards]({{< ref "/posts/2022/26-raspberry-pi-4-64bit-dual-hat-hotspot-without-pi-star" >}})
|
|
|
|
|
did usually include a form of request limitation because the many websocket requests
|
|
|
|
|
of other dashboards put too much pressure on the small Raspberry Pies :exploding_head:
|
|
|
|
|
|
|
|
|
|
Meanwhile on my main laptop:
|
|
|
|
|
I will not install this as per instructions, because I don't like when these kind
|
|
|
|
|
of applications (simple dashboards for example) have to be run as the _root_ user.
|
|
|
|
|
I will therefore create a new user called _dashboard_ as which the "webserver"
|
|
|
|
|
(which is a NodeJS application) will run.
|
|
|
|
|
|
|
|
|
|
I thought I might try to compile it on my main machine and just do the installation
|
|
|
|
|
on the Raspberry Pi 2 as the compilation is still running (5½ hours later).
|
|
|
|
|
We need a few packages for this:
|
|
|
|
|
|
|
|
|
|
~~~console
|
|
|
|
|
$ sudo pacman -S arm-none-eabi-gcc arm-none-eabi-newlib
|
|
|
|
|
$ git clone git@github.com:g4klx/MMDVM_HS.git
|
|
|
|
|
$ cd MMDVM_HS
|
|
|
|
|
$ scp raspi2:git/MMDVM_HS/Config.h .
|
|
|
|
|
$ make
|
|
|
|
|
$ sudo pacman -S nodejs npm
|
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
I got some errors about `usbserial` or `USBSerial::begin()`. A short research
|
|
|
|
|
suggested a `depmod -a` and you know what, it compilled.
|
|
|
|
|
Create and impersonate our new user:
|
|
|
|
|
|
|
|
|
|
Well, I had to run it as _root_.
|
|
|
|
|
~~~console
|
|
|
|
|
$ sudo useradd --user-group -m --system dashboard --shell /bin/bash
|
|
|
|
|
$ sudo su - dashboard
|
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
Now it is time to put the compiled firmware to the Raspi and install it.
|
|
|
|
|
Now we are the user _dashboard_ and we will install the dashboard:
|
|
|
|
|
|
|
|
|
|
~~~console
|
|
|
|
|
$ scp bin/mmdvm_f1.bin bin/mmdvm_f1.elf bin/mmdvm_f1.hex raspi2:git/MMDVM_HS/bin/
|
|
|
|
|
$ git@github.com:johnhays/dsgwdashboard.git
|
|
|
|
|
$ cd dsgwdashboard
|
|
|
|
|
$ node -v
|
|
|
|
|
$ npm install -save
|
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
Back on the Raspi: the installation won't work as there is no stm32flash installed. Huh?
|
|
|
|
|
Oh well, I could not find it in any repository. The AUR website has a package, but I
|
|
|
|
|
can't find it with pacman or paru. So we install by hand again:
|
|
|
|
|
Create and install some self-signed certificates into the `dsgwdashboard`
|
|
|
|
|
directory because the server needs them to start. I personally would like
|
|
|
|
|
to have the possibility to only serve the pages via plain old HTTP
|
|
|
|
|
(without SSL/TLS) because I run most of my pages through a reverse-proxy
|
|
|
|
|
that takes care of all the certification.
|
|
|
|
|
|
|
|
|
|
~~~console
|
|
|
|
|
$ git clone https://aur.archlinux.org/stm32flash.git
|
|
|
|
|
$ cd stm32flash
|
|
|
|
|
$ makepkg -si
|
|
|
|
|
Next we will modify the `dashboard.ini` file because we will change the
|
|
|
|
|
port from 443 to 8443. Why? Because[^1]!
|
|
|
|
|
|
|
|
|
|
~~~ini
|
|
|
|
|
[config]
|
|
|
|
|
dgwconfig=/usr/local/etc/dstargateway.cfg
|
|
|
|
|
host=hotspot.oe7drt.net
|
|
|
|
|
port=8443
|
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
sudo pacman -S libgpiod
|
|
|
|
|
{{< alert circle-info >}}
|
|
|
|
|
This might be confusing now, the host above does not listen to port 8443 because
|
|
|
|
|
there is a reverse-proxy in-between (and actually a firewall/router too).
|
|
|
|
|
{{< /alert >}}
|
|
|
|
|
|
|
|
|
|
And again, back in the firmware repository at `~/git/MMDVM_HS`:
|
|
|
|
|
The actual path of this host and how it will be routed:
|
|
|
|
|
|
|
|
|
|
~~~plain
|
|
|
|
|
User (internet) ⇒ router:443 (hotspot.oe7drt.net) ⇒ reverse-proxy:443 (internal-server.lan) ⇒ hotspot:8443 (internal-raspi.lan)
|
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
We will disable the shell for the _dashboard_ user because we normally
|
|
|
|
|
won't have to login as _dashboard_ user again.
|
|
|
|
|
|
|
|
|
|
~~~console
|
|
|
|
|
$ sudo make mmdvm_hs_hat
|
|
|
|
|
$ sudo chsh -s /bin/false dashboard
|
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
[^1]: Ports below <kbd>1024</kbd> can only be used as the _root_ user. Those are socalled
|
|
|
|
|
[privileged ports](https://www.w3.org/Daemon/User/Installation/PrivilegedPorts.html).
|
|
|
|
|
To run the program as non-root user we need to set the port to something
|
|
|
|
|
above <kbd>1024</kbd>.
|
|
|
|
|
|
|
|
|
|
## DSTAR Registration
|
|
|
|
|
|
|
|
|
|
A DSTAR registration is mandatory if you want to be transmitted on
|
|
|
|
|