Serve web mixer at http://radxa-mixer.local on port 80

install.sh now sets the hostname (default radxa-mixer, --hostname or
--keep-hostname to override) after a successful install so Avahi
advertises NAME.local, and the web mixer listens on port 80. The web
server's host check already accepts HOSTNAME.local.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jsahn
2026-10-12 20:22:48 +09:00
co-authored by Claude Opus 5.5
parent 655fbc1d29
commit 5e8906b43d
6 changed files with 31 additions and 9 deletions
+6 -3
View File
@@ -29,9 +29,12 @@ Mac/iPhone의 AirPlay 2 ── Shairport Sync ─┐
## 웹 믹서
설치 후 브라우저에서 **`http://보드IP:8088`**을 여세요.
현재 보드는 `http://192.168.10.83:8088`이며, USB 관리 연결에서는
주소가 유지돼 있다면 `http://10.55.0.1:8088`을 사용합니다.
설치 후 브라우저에서 **`http://radxa-mixer.local`**을 여세요.
설치 시 보드의 호스트 이름을 `radxa-mixer`로 바꾸며(`--hostname 이름`으로 변경,
`--keep-hostname`으로 유지), Avahi(mDNS)가 `이름.local`을 알립니다.
`.local`이 안 열리는 기기에서는 `http://보드IP`를 사용합니다.
현재 보드는 `http://192.168.10.83`이며, USB 관리 연결에서는
주소가 유지돼 있다면 `http://10.55.0.1`을 사용합니다. 웹은 80번 포트입니다.
- AirPlay 및 연결된 Bluetooth 입력별 볼륨·음소거.
- AirPlay는 Shairport Sync의 **기존 네이티브 볼륨**을 사용합니다.
+3 -1
View File
@@ -98,7 +98,9 @@ sudo systemctl status radxa-mixer-web --no-pager
sudo journalctl -u radxa-mixer-web -n 40 --no-pager
```
주소는 HTTP의 8088 포트입니다. 출력 장비가 꺼져 있어도 화면은 접속 가능해야 합니다.
주소는 `http://radxa-mixer.local`(80번 포트)입니다. 출력 장비가 꺼져 있어도 화면은 접속 가능해야 합니다.
`.local`만 안 열리면 `systemctl status avahi-daemon`과 `hostname`을 확인하고,
게스트 Wi-Fi처럼 기기 간 멀티캐스트가 막힌 네트워크에서는 IP 주소로 접속하세요.
브라우저를 새로고침하면 재시작 후 바뀐 요청 토큰이 갱신됩니다.
## AirPlay 입력이 ‘제어 준비 중’으로 표시됨
+17 -1
View File
@@ -6,17 +6,21 @@ AIRPLAY_NAME='Radxa Audio'
DAC_PCM='hw:CARD=Audio,DEV=0'
WIFI5=0
JOBS=1
HOST_NAME=radxa-mixer
usage() {
cat <<'HELP'
Usage: sudo bash install.sh [--name NAME] [--dac hw:CARD=Audio,DEV=0] [--wifi5] [--jobs 1|2]
Usage: sudo bash install.sh [--name NAME] [--dac hw:CARD=Audio,DEV=0] [--hostname radxa-mixer|--keep-hostname] [--wifi5] [--jobs 1|2]
Default output is USB DAC. Pair a headphone after installation to select Bluetooth output.
--wifi5 only applies to aic8800_fdrv with ps_on and he_on module parameters.
The web mixer is served at http://HOSTNAME.local (port 80).
HELP
}
while (( $# )); do
case "$1" in
--name) AIRPLAY_NAME=${2:?Missing name}; shift 2 ;;
--dac) DAC_PCM=${2:?Missing DAC PCM}; shift 2 ;;
--hostname) HOST_NAME=${2:?Missing hostname}; shift 2 ;;
--keep-hostname) HOST_NAME=; shift ;;
--wifi5) WIFI5=1; shift ;;
--jobs) JOBS=${2:?Missing jobs}; shift 2 ;;
-h|--help) usage; exit 0 ;;
@@ -25,6 +29,9 @@ while (( $# )); do
done
[[ $EUID == 0 ]] || { echo 'sudo로 실행해 주세요.' >&2; exit 1; }
[[ "$JOBS" == 1 || "$JOBS" == 2 ]] || { echo '--jobs는 1 또는 2입니다.' >&2; exit 1; }
# mDNS names must be valid DNS labels; underscores are not resolvable everywhere.
[[ -z $HOST_NAME || $HOST_NAME =~ ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ ]] || {
echo '--hostname은 영문 소문자, 숫자, 하이픈만 사용할 수 있습니다.' >&2; exit 1; }
[[ $(uname -s) == Linux ]] || { echo 'Radxa의 Linux에서 실행해 주세요.' >&2; exit 1; }
# This release is deliberately restricted to the package environment we inspected.
# shellcheck source=/dev/null
@@ -155,5 +162,14 @@ radxa-audio init --name "$AIRPLAY_NAME" --dac "$DAC_PCM"
radxa-audio status
bash "$PACKAGE_DIR/scripts/install-web.sh"
trap - EXIT
if [[ -n $HOST_NAME && $(hostname) != "$HOST_NAME" ]]; then
# After a successful install so a failed run never leaves a renamed host.
OLD_HOST=$(hostname)
hostnamectl set-hostname "$HOST_NAME"
sed -i "s/^127\.0\.1\.1\s.*/127.0.1.1 $HOST_NAME/" /etc/hosts
sed -i "s/\b$OLD_HOST\b/$HOST_NAME/g" /etc/hosts
systemctl restart avahi-daemon radxa-mixer-web
fi
echo "웹 믹서: http://$(hostname).local"
echo "설치 완료. 복구: sudo python3 $PACKAGE_DIR/scripts/backup.py restore $BACKUP_DIR"
if (( WIFI5 )); then echo 'Wi-Fi 5 설정 적용을 위해 편할 때 재부팅하세요. USB 네트워크 주소 설정은 변경하지 않았습니다.'; fi
+2 -1
View File
@@ -7,7 +7,8 @@
- USB DAC: Realtek USB2.0 Audio, ALSA `hw:CARD=Audio,DEV=0`.
- 블루투스 출력: Bose QC Headphones (사용자 모델 QC SC).
- 출력 장비 주소: `E4:58:BC:C3:3B:F8` (기존 장비 참고만; 새 설치 기본값이 아님).
- 웹 믹서: `http://192.168.10.83:8088`, `radxa-mixer-web.service` 자동 시작.
- 호스트 이름: `radxa-mixer` (기존 `radxa-zero3`에서 변경).
- 웹 믹서: `http://radxa-mixer.local` (= `http://192.168.10.83`, 80번 포트), `radxa-mixer-web.service` 자동 시작.
- 공통 감쇠 −3 dB. AirPlay는 기존 네이티브 볼륨만 제어.
- 보스는 영구 등록(`Bonded: yes`, Trusted) 상태.
- Wi-Fi 드라이버: aic8800_fdrv; `ps_on=0 he_on=0` 설정을 재부팅 후 확인함.
+2 -2
View File
@@ -14,7 +14,7 @@ cat > /etc/systemd/system/radxa-mixer-web.service <<'UNIT'
Description=Radxa wireless audio mixer web interface
After=network.target bluetooth.service shairport-sync.service bluealsa.service
[Service]
ExecStart=/usr/bin/python3 /usr/local/lib/radxa-mixer/web_server.py --port 8088
ExecStart=/usr/bin/python3 /usr/local/lib/radxa-mixer/web_server.py --port 80
Restart=on-failure
RestartSec=3
UMask=0022
@@ -25,4 +25,4 @@ UNIT
systemctl daemon-reload
systemctl enable --now radxa-mixer-web
systemctl restart radxa-mixer-web
echo '웹 믹서: http://보드IP:8088'
echo "웹 믹서: http://$(hostname).local 또는 http://보드IP"
+1 -1
View File
@@ -139,7 +139,7 @@ class Handler(BaseHTTPRequestHandler):
def main():
parser=argparse.ArgumentParser();parser.add_argument('--host',default='0.0.0.0');parser.add_argument('--port',type=int,default=8088)
parser=argparse.ArgumentParser();parser.add_argument('--host',default='0.0.0.0');parser.add_argument('--port',type=int,default=80)
args=parser.parse_args()
server=ThreadingHTTPServer((args.host,args.port),Handler)
server.daemon_threads=True