Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I configure “reset_commands” in toml? #203

Open
1 task done
jerryyip opened this issue Dec 12, 2024 · 0 comments
Open
1 task done

How can I configure “reset_commands” in toml? #203

jerryyip opened this issue Dec 12, 2024 · 0 comments

Comments

@jerryyip
Copy link

jerryyip commented Dec 12, 2024

  • I have searched the issues of this repository and believe that this is not a duplicate.

Summary

My LoRaWAN Gateway is not able to control its resets/power-on gpios via "/dev/gpiochip0", but it is able to control with sysfs interface(/sys/class/gpio). I think the reason is the kernal of My LoRaWAN Gateway is too old. So I tried the reset_commands settings in concentratord.toml. I set it like this:

reset_commands=[["./reset_lgw.sh", ["stop"]],["./reset_lgw.sh", ["start"]]]

But from the logs, I think the reset commands are not 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

Questions

  1. How can I setup the reset_commands to make it work? I am using chirpstack-concentratord-sx1302 v4.4.5.

Update:

  1. My another choice is replacing gpio_cdev with rust-sysfs-gpio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant