update draft post
This commit is contained in:
parent
e2f07bb8c1
commit
5b4f1dc95c
1 changed files with 69 additions and 53 deletions
|
@ -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,73 +248,88 @@ $ 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
|
||||
|
||||
### DStarGateway
|
||||
|
||||
### MMDVMHost
|
||||
|
||||
### dgwtimeserver
|
||||
|
||||
## Install a dashboard
|
||||
|
||||
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:
|
||||
|
||||
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.
|
||||
|
||||
We need a few packages for this:
|
||||
|
||||
~~~console
|
||||
E: Received a NAK to the SET_CONFIG command from the modem
|
||||
I: MMDVMHost-20240126 exited on receipt of an unknown signal
|
||||
$ sudo pacman -S nodejs npm
|
||||
~~~
|
||||
|
||||
But we need another compiler. I install [paru](https://github.com/morganamilo/paru)
|
||||
to get that compiler with its dependencies.
|
||||
|
||||
The installation of paru is very easy:
|
||||
Create and impersonate our new user:
|
||||
|
||||
~~~console
|
||||
$ sudo pacman -S --needed base-devel
|
||||
$ git clone https://aur.archlinux.org/paru.git
|
||||
$ cd paru
|
||||
$ makepkg -si
|
||||
$ sudo useradd --user-group -m --system dashboard --shell /bin/bash
|
||||
$ sudo su - dashboard
|
||||
~~~
|
||||
|
||||
Now we are the user _dashboard_ and we will install the dashboard:
|
||||
|
||||
~~~console
|
||||
$ paru -Syu
|
||||
$ paru -S arm-linux-gnueabihf-gcc
|
||||
$ git@github.com:johnhays/dsgwdashboard.git
|
||||
$ cd dsgwdashboard
|
||||
$ node -v
|
||||
$ npm install -save
|
||||
~~~
|
||||
|
||||
Oh hell, this is going to take ages on the Raspberry Pi 2...
|
||||
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.
|
||||
|
||||
Meanwhile on my main laptop:
|
||||
Next we will modify the `dashboard.ini` file because we will change the
|
||||
port from 443 to 8443. Why? Because[^1]!
|
||||
|
||||
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).
|
||||
~~~ini
|
||||
[config]
|
||||
dgwconfig=/usr/local/etc/dstargateway.cfg
|
||||
host=hotspot.oe7drt.net
|
||||
port=8443
|
||||
~~~
|
||||
|
||||
{{< 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 >}}
|
||||
|
||||
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 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 chsh -s /bin/false dashboard
|
||||
~~~
|
||||
|
||||
I got some errors about `usbserial` or `USBSerial::begin()`. A short research
|
||||
suggested a `depmod -a` and you know what, it compilled.
|
||||
|
||||
Well, I had to run it as _root_.
|
||||
|
||||
Now it is time to put the compiled firmware to the Raspi and install it.
|
||||
|
||||
~~~console
|
||||
$ scp bin/mmdvm_f1.bin bin/mmdvm_f1.elf bin/mmdvm_f1.hex raspi2:git/MMDVM_HS/bin/
|
||||
~~~
|
||||
|
||||
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:
|
||||
|
||||
~~~console
|
||||
$ git clone https://aur.archlinux.org/stm32flash.git
|
||||
$ cd stm32flash
|
||||
$ makepkg -si
|
||||
~~~
|
||||
|
||||
sudo pacman -S libgpiod
|
||||
|
||||
And again, back in the firmware repository at `~/git/MMDVM_HS`:
|
||||
|
||||
~~~console
|
||||
$ sudo make mmdvm_hs_hat
|
||||
~~~
|
||||
[^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
|
||||
|
||||
|
|
Loading…
Reference in a new issue