SenseCAP M1 Gateway to TTN

gfss
Mon, 15 Sep 2025 14:45:31 +0000

Sensecap m1, used bookworm (no desktop).

Having some minor problems with the reset_lgw.sh, trying to compare it with the original non-bookworm-compatible script

1. ./reset_lgw.sh stop from hereismeaw does not stop fan. I added ad5338r_reset=0 inside term() and that seemed to stop fan

2. how do you actually control the fan curve? It’s either off or 100% (very loud)

My steps:

Enabled via raspi-config: SPI, I2C and Serial port

Cloned this, did a make

github.com

GitHub - Lora-net/sx1302_hal: SX1302/SX1303 Hardware Abstraction Layer and Tools...

SX1302/SX1303 Hardware Abstraction Layer and Tools (packet forwarder...)

Then copies the reset_lgw.sh from this repo (bookworm compatible) into packet_forwarder/ then ./lora_pkt_fwd -c .

Got concentrator EUI from logs, updated json file, and it seems to be up now, able to read temp. Haven’t tested lorawan device yer

github.com/hereismeaw/SenseCAPM1-Chirpstack

packet_forwarder/reset_lgw.sh

main

#!/bin/sh

# GPIO mapping has to be adapted with HW
GPIO_CHIP=gpiochip0
GPIO_PIN_SX1302_RESET=17     # SX1302 reset
GPIO_PIN_SX1302_POWER_EN=18  # SX1302 power enable
GPIO_PIN_SX1261_RESET=5     # SX1261 reset (LBT / Spectral Scan)
GPIO_PIN_AD5338R_RESET=13    # AD5338R reset (full-duplex CN490 reference design)

# 100ms duration gpioset
GPIOSET="gpioset -m time -u 100000 $GPIO_CHIP"

# Check if gpioset is available
if ! command -v gpioset > /dev/null 2>&1; then
    echo "gpiod tools are not installed. Please install them first."

fi

init() {
    echo "CoreCell power enable on through GPIO$GPIO_PIN_SX1302_POWER_EN..."

This file has been truncated. show original