How can I configure "reset_commands" in toml?

My lorawan gateway can’t control its reset gpios via the sx1302_reset_chip and sx1302_reset_pin settings in the toml file, so my idea is I can do that with the reset_commands. But how can I do that? I tried reset_commands=[["./reset_lgw.sh", ["stop"]],["./reset_lgw.sh", ["start"]]], but it seems nothing happens.

I am using concentratord v4.4.5, these are my logs. And I can’t find Configuring raw reset commands from it, which means the reset commands aren’t executed.

2024-12-10T09:21:08.620Z INFO  [libconcentratord::reset] Configuring reset pin, dev: /dev/gpiochip0, pin: 18
2024-12-10T09:21:08.621Z INFO  [libconcentratord::reset] Configuring sx1302 power enable pin, dev: /dev/gpiochip0, pin: 19
2024-12-10T09:21:08.622Z INFO  [libconcentratord::reset] Configuring sx1261 reset pin, dev: /dev/gpiochip3, pin: 13
2024-12-10T09:21:08.622Z INFO  [chirpstack_concentratord_sx1302::cmd::root] Starting Concentratord SX1302 (version: 4.4.5, docs: https://www.chirpstack.io/docs/chirpstack-concentratord/)
2024-12-10T09:21:08.623Z INFO  [libconcentratord::reset] Enabling concentrator power
2024-12-10T09:21:08.724Z INFO  [libconcentratord::reset] Triggering sx130x reset
2024-12-10T09:21:08.926Z INFO  [libconcentratord::reset] Triggering sx1261 reset
2024-12-10T09:21:09.127Z INFO  [chirpstack_concentratord_sx1302::concentrator] Setting i2c device path, path: /dev/i2c-1
2024-12-10T09:21:09.128Z INFO  [chirpstack_concentratord_sx1302::concentrator] Setting i2c temperature sensor address, address: 57
2024-12-10T09:21:09.128Z INFO  [chirpstack_concentratord_sx1302::concentrator] Setting board configuration, lorawan_public: true, clock_source: 0, com_type: Spi, com_path: /dev/spidev2.1
2024-12-10T09:21:09.129Z INFO  [chirpstack_concentratord_sx1302::concentrator] Setting up fine timestamp, enable: false
2024-12-10T09:21:09.129Z INFO  [chirpstack_concentratord_sx1302::concentrator] Setting up concentrator channels
2024-12-10T09:21:09.130Z INFO  [chirpstack_concentratord_sx1302::concentrator] Configuring radio, radio: 0, enabled: true, center_freq: 867500000, type: SX1250
2024-12-10T09:21:09.130Z INFO  [chirpstack_concentratord_sx1302::concentrator] Configuring radio, radio: 1, enabled: true, center_freq: 868500000, type: SX1250
2024-12-10T09:21:09.130Z INFO  [chirpstack_concentratord_sx1302::concentrator] Setting up concentrator channels
2024-12-10T09:21:09.131Z INFO  [chirpstack_concentratord_sx1302::concentrator] Configuring multi-SF LoRa channel, channel: 0, enabled: true, freq: 868100000, rf_chain: 1, if_freq: -400000
2024-12-10T09:21:09.132Z INFO  [chirpstack_concentratord_sx1302::concentrator] Configuring multi-SF LoRa channel, channel: 1, enabled: true, freq: 868300000, rf_chain: 1, if_freq: -200000
2024-12-10T09:21:09.133Z INFO  [chirpstack_concentratord_sx1302::concentrator] Configuring multi-SF LoRa channel, channel: 2, enabled: true, freq: 868500000, rf_chain: 1, if_freq: 0
2024-12-10T09:21:09.133Z INFO  [chirpstack_concentratord_sx1302::concentrator] Configuring multi-SF LoRa channel, channel: 3, enabled: true, freq: 867100000, rf_chain: 0, if_freq: -400000
2024-12-10T09:21:09.133Z INFO  [chirpstack_concentratord_sx1302::concentrator] Configuring multi-SF LoRa channel, channel: 4, enabled: true, freq: 867300000, rf_chain: 0, if_freq: -200000
2024-12-10T09:21:09.133Z INFO  [chirpstack_concentratord_sx1302::concentrator] Configuring multi-SF LoRa channel, channel: 5, enabled: true, freq: 867500000, rf_chain: 0, if_freq: 0
2024-12-10T09:21:09.133Z INFO  [chirpstack_concentratord_sx1302::concentrator] Configuring multi-SF LoRa channel, channel: 6, enabled: true, freq: 867700000, rf_chain: 0, if_freq: 200000
2024-12-10T09:21:09.134Z INFO  [chirpstack_concentratord_sx1302::concentrator] Configuring multi-SF LoRa channel, channel: 7, enabled: true, freq: 867900000, rf_chain: 0, if_freq: 400000
2024-12-10T09:21:09.134Z INFO  [chirpstack_concentratord_sx1302::concentrator] Configuring Std LoRa channel, enabled: true, freq: 868300000, rf_chain: 1, if_freq: -200000
2024-12-10T09:21:09.134Z INFO  [chirpstack_concentratord_sx1302::concentrator] Configuring FSK channel, enabled: true, freq: 868800000, rf_chain: 1, if_freq: 300000
2024-12-10T09:21:09.135Z INFO  [chirpstack_concentratord_sx1302::concentrator] Starting the concentrator

What is your gateway and what commands are needed to reset the SX1302?

I am using a seeedstudio sensecap gateway, and I normally use the sysfs interface to control the reset pin, like this:

echo "1" > /sys/class/gpio/gpio$SX1302_RESET_PIN/value; WAIT_GPIO
echo "0" > /sys/class/gpio/gpio$SX1302_RESET_PIN/value; WAIT_GPIO

The reason that I can’t use the chardev interface to control pin is the kernel version is too low:

~$ uname -a
Linux sensecap 4.9.80-ti-r98 #1 SMP PREEMPT Wed Feb 7 01:23:46 UTC 2018 armv7l GNU/Linux

# gpio0-22 is the reset pin of 1302, but I can't control it
~$ gpioinfo 0 | grep "line  22"
	line  22:   "GPMC_AD8"      "P8_19"  output  active-high [used]
~$ gpioget 0 22
gpioget: error reading GPIO values: Device or resource busy

The best solution would be to add support for the SenseCap gateway directly into the Concentratord. Unfortunately, I do not have this gateway in my office, but if you like to work on this and create a pull-request, then you could take this as an example: chirpstack-concentratord/chirpstack-concentratord-sx1302/src/config/vendor/multitech/mtcap3_003e00.rs at master · chirpstack/chirpstack-concentratord · GitHub.