From aa75fac7f2bcfc51c4239348c0f0eac19a9331ad Mon Sep 17 00:00:00 2001 From: Lloyd Date: Tue, 24 Feb 2026 11:14:29 +0000 Subject: [PATCH] Update Proxmox installer scripts to include CH341 GPIO pin configuration and modify radio type --- manage.sh | 4 ++-- scripts/proxmox-install.sh | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/manage.sh b/manage.sh index 6cc99f5..0449f9d 100755 --- a/manage.sh +++ b/manage.sh @@ -249,7 +249,7 @@ install_repeater() { echo "25"; echo "# Installing system dependencies..." apt-get update -qq - apt-get install -y libffi-dev jq pip python3-rrdtool wget swig build-essential python3-dev + apt-get install -y libffi-dev libusb-1.0-0 jq pip python3-rrdtool wget swig build-essential python3-dev pip install --break-system-packages setuptools_scm >/dev/null 2>&1 || true # Install mikefarah yq v4 if not already installed @@ -529,7 +529,7 @@ upgrade_repeater() { echo "[3/9] Updating system dependencies..." apt-get update -qq - apt-get install -y libffi-dev jq pip python3-rrdtool wget swig build-essential python3-dev + apt-get install -y libffi-dev libusb-1.0-0 jq pip python3-rrdtool wget swig build-essential python3-dev pip install --break-system-packages setuptools_scm >/dev/null 2>&1 || true # Install mikefarah yq v4 if not already installed diff --git a/scripts/proxmox-install.sh b/scripts/proxmox-install.sh index 27cce2c..f95c753 100644 --- a/scripts/proxmox-install.sh +++ b/scripts/proxmox-install.sh @@ -215,12 +215,22 @@ msg_info "Cloning pyMC_Repeater (branch: ${BRANCH})..." pct exec "$CTID" -- bash -c "git clone --branch ${BRANCH} ${REPO} /root/pyMC_Repeater" msg_ok "Repository cloned" -# Pre-seed config with CH341 radio type so manage.sh skips the SPI check +# Pre-seed config with CH341 radio type and correct GPIO pins pct exec "$CTID" -- bash -c " mkdir -p /etc/pymc_repeater if [ -f /root/pyMC_Repeater/config.yaml.example ]; then cp /root/pyMC_Repeater/config.yaml.example /etc/pymc_repeater/config.yaml + # Set radio type to CH341 sed -i 's/^radio_type: sx1262$/radio_type: sx1262_ch341/' /etc/pymc_repeater/config.yaml + # Replace Pi BCM GPIO pins with CH341 GPIO pin numbers (0-7) + sed -i 's/cs_pin: 21/cs_pin: 0/' /etc/pymc_repeater/config.yaml + sed -i 's/reset_pin: 18/reset_pin: 2/' /etc/pymc_repeater/config.yaml + sed -i 's/busy_pin: 20/busy_pin: 4/' /etc/pymc_repeater/config.yaml + sed -i 's/irq_pin: 16/irq_pin: 6/' /etc/pymc_repeater/config.yaml + sed -i 's/rxen_pin: -1/rxen_pin: 1/' /etc/pymc_repeater/config.yaml + # Enable TCXO and DIO2 RF switch for E22 module + sed -i 's/use_dio3_tcxo: false/use_dio3_tcxo: true/' /etc/pymc_repeater/config.yaml + sed -i 's/use_dio2_rf: false/use_dio2_rf: true/' /etc/pymc_repeater/config.yaml fi "