|
|
@ -1,8 +1,9 @@
|
|
|
|
---
|
|
|
|
---
|
|
|
|
title: MMDVM hotspot on Archlinux
|
|
|
|
title: MMDVM hotspot on Archlinux
|
|
|
|
summary: On a Raspberry Pi 2
|
|
|
|
summary: I wrote down the installation of a forked DStarGateway with a slim
|
|
|
|
date: 2024-01-28T10:10:11+0000
|
|
|
|
dashboard based on Javascript on a Raspberry Pi 2.
|
|
|
|
lastmod: 2024-01-28T20:50:19+0000
|
|
|
|
date: 2024-01-28T23:12:00+0100
|
|
|
|
|
|
|
|
#lastmod:
|
|
|
|
categories:
|
|
|
|
categories:
|
|
|
|
- amateur-radio
|
|
|
|
- amateur-radio
|
|
|
|
tags:
|
|
|
|
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
|
|
|
|
Open `/boot/cmdline.txt` and remove `console=serial0,115200` from the line. Save
|
|
|
|
and reboot.
|
|
|
|
and reboot.
|
|
|
|
|
|
|
|
|
|
|
|
Another problem occurs, I will probably have to flash an actual firmware to the modem.
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
|
|
|
|
~~~console
|
|
|
|
### DStarGateway
|
|
|
|
E: Received a NAK to the SET_CONFIG command from the modem
|
|
|
|
|
|
|
|
I: MMDVMHost-20240126 exited on receipt of an unknown signal
|
|
|
|
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
But we need another compiler. I install [paru](https://github.com/morganamilo/paru)
|
|
|
|
### MMDVMHost
|
|
|
|
to get that compiler with its dependencies.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The installation of paru is very easy:
|
|
|
|
### dgwtimeserver
|
|
|
|
|
|
|
|
|
|
|
|
~~~console
|
|
|
|
## Install a dashboard
|
|
|
|
$ sudo pacman -S --needed base-devel
|
|
|
|
|
|
|
|
$ git clone https://aur.archlinux.org/paru.git
|
|
|
|
|
|
|
|
$ cd paru
|
|
|
|
|
|
|
|
$ makepkg -si
|
|
|
|
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
~~~console
|
|
|
|
I will install the [dashboard from John Hays (K7VE)](https://github.com/johnhays/dsgwdashboard)
|
|
|
|
$ paru -Syu
|
|
|
|
as my first look at it looked promising (using Javascript (which is executed
|
|
|
|
$ paru -S arm-linux-gnueabihf-gcc
|
|
|
|
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
|
|
|
|
Oh hell, this is going to take ages on the Raspberry Pi 2...
|
|
|
|
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
|
|
|
|
We need a few packages for this:
|
|
|
|
on the Raspberry Pi 2 as the compilation is still running (5½ hours later).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
~~~console
|
|
|
|
~~~console
|
|
|
|
$ sudo pacman -S arm-none-eabi-gcc arm-none-eabi-newlib
|
|
|
|
$ sudo pacman -S nodejs npm
|
|
|
|
$ git clone git@github.com:g4klx/MMDVM_HS.git
|
|
|
|
|
|
|
|
$ cd MMDVM_HS
|
|
|
|
|
|
|
|
$ scp raspi2:git/MMDVM_HS/Config.h .
|
|
|
|
|
|
|
|
$ make
|
|
|
|
|
|
|
|
~~~
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
|
|
I got some errors about `usbserial` or `USBSerial::begin()`. A short research
|
|
|
|
Create and impersonate our new user:
|
|
|
|
suggested a `depmod -a` and you know what, it compilled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
~~~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?
|
|
|
|
Create and install some self-signed certificates into the `dsgwdashboard`
|
|
|
|
Oh well, I could not find it in any repository. The AUR website has a package, but I
|
|
|
|
directory because the server needs them to start. I personally would like
|
|
|
|
can't find it with pacman or paru. So we install by hand again:
|
|
|
|
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
|
|
|
|
Next we will modify the `dashboard.ini` file because we will change the
|
|
|
|
$ git clone https://aur.archlinux.org/stm32flash.git
|
|
|
|
port from 443 to 8443. Why? Because[^1]!
|
|
|
|
$ cd stm32flash
|
|
|
|
|
|
|
|
$ makepkg -si
|
|
|
|
~~~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
|
|
|
|
~~~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
|
|
|
|
## DSTAR Registration
|
|
|
|
|
|
|
|
|
|
|
|
A DSTAR registration is mandatory if you want to be transmitted on
|
|
|
|
A DSTAR registration is mandatory if you want to be transmitted on
|
|
|
|