# RAK833: failed to start the concentrator

**URL:** <https://www.thethingsnetwork.org/forum/t/rak833-failed-to-start-the-concentrator/67579>\
**Category:** Raspberry Pi Gateways\
**Created:** [April 13, 2024, 1:21am UTC](https://www.thethingsnetwork.org/forum/t/rak833-failed-to-start-the-concentrator/67579 "2024-04-13T01:21:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![SimonBoonstra](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/simonboonstra/32/46312_2.png) [@SimonBoonstra](https://www.thethingsnetwork.org/forum/u/SimonBoonstra)\
**Post date:** [April 13, 2024, 1:21am UTC](https://www.thethingsnetwork.org/forum/t/rak833-failed-to-start-the-concentrator/67579/1 "2024-04-13T01:21:12Z")

</div>

Hello

I have currently the issue that the packet-forwarder won’t start.

This is my setup

**Raspberry Pi Zero 2W**  
OS: Raspberry Pi OS Lite- Bookworm 64bit

**LoRa Gateway**  
Brand: PiSupply  
Model: RAK833 SPI  
Chip: SX1301  
Reset Pin: GPIO22

**Initial configuration**  
SPI enabled  
I2C enabled  
Serial login shell disabled  
Serial port hardware enabled

**Description**  
My gateway has already worked before. I have not used it for a while and wanted to upgrade today to the Bookworm debian version (respectively the Rasperry Pi OS - Bookworm version). I did a fresh install to have everything clean.

Unfortunately, I run now into the error:

> ERROR: [main] failed to start the concentrator

I followed the installation and configuration instructions from the manufacturer’s git repository:

> **[IoTLoRaRange/IoT Lora Gateway HAT at master · PiSupply/IoTLoRaRange](https://github.com/PiSupply/IoTLoRaRange/tree/master/IoT%20Lora%20Gateway%20HAT)**
>
> master/IoT%20Lora%20Gateway%20HAT

I believe, the issue is, that the start script can’t toggle the reset pin, because of this error: “kernel: export\_store: invalid GPIO 22”

I tried also to do it manually with following commands:

```bash
SX1301_RESET_BCM_PIN=22
echo "$SX1301_RESET_BCM_PIN" > /sys/class/gpio/export

```

This leads to following error message:  
`echo: write error: invalid argument`

Also the the output of the ./start.sh script with error messages like  
`/sys/class/gpio/gpio22/direction: No such file or directory` are maybe pointing to an issue with the GPIO pins?

Now I’m not sure what the reason of the issue could be.  
It looks to me like somehow the GPIO pin can’t be accessed?  
On the other hand, the Gateway and Raspberry were for a few months outside on my balcony.  
The place is protected from rain, but maybe humidity etc. could be damaged the Gateway module?

Also the LED’s on the Gateway module doesn’t light up.  
I think there is a red LED which is illuminated as soon as the gateway is configured correctly.

Maybe someone has an idea, what I can check or test to find out the exact issue?  
Help is much apprechiated. Thanks.

This are my configuration files:

> **start.sh**
>
> #! /bin/bash
> 
> # Reset iC880a PIN
> 
> SX1301\_RESET\_BCM\_PIN=22  
> echo “$SX1301\_RESET\_BCM\_PIN” \> /sys/class/gpio/export  
> echo “out” \> /sys/class/gpio/gpio$SX1301\_RESET\_BCM\_PIN/direction  
> echo “0” \> /sys/class/gpio/gpio$SX1301\_RESET\_BCM\_PIN/value  
> sleep 0.1  
> echo “1” \> /sys/class/gpio/gpio$SX1301\_RESET\_BCM\_PIN/value  
> sleep 0.1  
> echo “0” \> /sys/class/gpio/gpio$SX1301\_RESET\_BCM\_PIN/value  
> sleep 0.1  
> echo “$SX1301\_RESET\_BCM\_PIN” \> /sys/class/gpio/unexport  
> ./set\_eui.sh  
> sleep 0.2  
> #./update\_gwid.sh ./local\_conf.json  
> sleep 0.5  
> ./lora\_pkt\_fwd

> **global\_conf.json**
>
> {  
> “SX1301\_conf”: {  
> “lorawan\_public”: true,  
> “clksrc”: 1,  
> “antenna\_gain”: 0,  
> “radio\_0”: {  
> “enable”: true,  
> “type”: “SX1257”,  
> “freq”: 867500000,  
> “rssi\_offset”: -158.0,  
> “tx\_enable”: true,  
> “tx\_freq\_min”: 863000000,  
> “tx\_freq\_max”: 870000000  
> },  
> “radio\_1”: {  
> “enable”: true,  
> “type”: “SX1257”,  
> “freq”: 868500000,  
> “rssi\_offset”: -158.0,  
> “tx\_enable”: false  
> },  
> “chan\_multiSF\_0”: {  
> “enable”: true,  
> “radio”: 1,  
> “if”: -400000  
> },  
> “chan\_multiSF\_1”: {  
> “enable”: true,  
> “radio”: 1,  
> “if”: -200000  
> },  
> “chan\_multiSF\_2”: {  
> “enable”: true,  
> “radio”: 1,  
> “if”: 0  
> },  
> “chan\_multiSF\_3”: {  
> “enable”: true,  
> “radio”: 0,  
> “if”: -400000  
> },  
> “chan\_multiSF\_4”: {  
> “enable”: true,  
> “radio”: 0,  
> “if”: -200000  
> },  
> “chan\_multiSF\_5”: {  
> “enable”: true,  
> “radio”: 0,  
> “if”: 0  
> },  
> “chan\_multiSF\_6”: {  
> “enable”: true,  
> “radio”: 0,  
> “if”: 200000  
> },  
> “chan\_multiSF\_7”: {  
> “enable”: true,  
> “radio”: 0,  
> “if”: 400000  
> },  
> “chan\_Lora\_std”: {  
> “enable”: true,  
> “radio”: 1,  
> “if”: -200000,  
> “bandwidth”: 250000,  
> “spread\_factor”: 7  
> },  
> “chan\_FSK”: {  
> “enable”: true,  
> “radio”: 1,  
> “if”: 300000,  
> “bandwidth”: 125000,  
> “datarate”: 50000  
> },  
> “tx\_lut\_0”: {  
> “pa\_gain”: 0,  
> “mix\_gain”: 10,  
> “rf\_power”: -6,  
> “dig\_gain”: 0  
> },  
> “tx\_lut\_1”: {  
> “pa\_gain”: 0,  
> “mix\_gain”: 14,  
> “rf\_power”: -3,  
> “dig\_gain”: 0  
> },  
> “tx\_lut\_2”: {  
> “pa\_gain”: 1,  
> “mix\_gain”: 8,  
> “rf\_power”: 0,  
> “dig\_gain”: 3  
> },  
> “tx\_lut\_3”: {  
> “pa\_gain”: 2,  
> “mix\_gain”: 9,  
> “rf\_power”: 3,  
> “dig\_gain”: 3  
> },  
> “tx\_lut\_4”: {  
> “pa\_gain”: 1,  
> “mix\_gain”: 9,  
> “rf\_power”: 6,  
> “dig\_gain”: 1  
> },  
> “tx\_lut\_5”: {  
> “pa\_gain”: 2,  
> “mix\_gain”: 9,  
> “rf\_power”: 10,  
> “dig\_gain”: 0  
> },  
> “tx\_lut\_6”: {  
> “pa\_gain”: 2,  
> “mix\_gain”: 10,  
> “rf\_power”: 11,  
> “dig\_gain”: 0  
> },  
> “tx\_lut\_7”: {  
> “pa\_gain”: 2,  
> “mix\_gain”: 11,  
> “rf\_power”: 12,  
> “dig\_gain”: 0  
> },  
> “tx\_lut\_8”: {  
> “pa\_gain”: 2,  
> “mix\_gain”: 12,  
> “rf\_power”: 13,  
> “dig\_gain”: 1  
> },  
> “tx\_lut\_9”: {  
> “pa\_gain”: 2,  
> “mix\_gain”: 12,  
> “rf\_power”: 14,  
> “dig\_gain”: 0  
> },  
> “tx\_lut\_10”: {  
> “pa\_gain”: 3,  
> “mix\_gain”: 8,  
> “rf\_power”: 16,  
> “dig\_gain”: 1  
> },  
> “tx\_lut\_11”: {  
> “pa\_gain”: 3,  
> “mix\_gain”: 10,  
> “rf\_power”: 20,  
> “dig\_gain”: 0  
> },  
> “tx\_lut\_12”: {  
> “desc”: “TX gain table, index 12”,  
> “pa\_gain”: 3,  
> “mix\_gain”: 12,  
> “rf\_power”: 23,  
> “dig\_gain”: 0  
> },  
> “tx\_lut\_13”: {  
> “desc”: “TX gain table, index 13”,  
> “pa\_gain”: 3,  
> “mix\_gain”: 14,  
> “rf\_power”: 25,  
> “dig\_gain”: 0  
> },  
> “tx\_lut\_14”: {  
> “desc”: “TX gain table, index 14”,  
> “pa\_gain”: 3,  
> “mix\_gain”: 14,  
> “rf\_power”: 26,  
> “dig\_gain”: 0  
> },  
> “tx\_lut\_15”: {  
> “desc”: “TX gain table, index 15”,  
> “pa\_gain”: 3,  
> “mix\_gain”: 14,  
> “rf\_power”: 27,  
> “dig\_gain”: 0  
> }  
> },  
> “gateway\_conf”: {  
> “gateway\_ID”: “”,  
> /\* change with default server address/ports, or overwrite in local\_conf.json _/  
> “server\_address”: “eu1.cloud.thethings.network”,  
> “serv\_port\_up”: 1700,  
> “serv\_port\_down”: 1700,  
> /_ adjust the following parameters for your network _/  
> “keepalive\_interval”: 10,  
> “stat\_interval”: 30,  
> “push\_timeout\_ms”: 100,  
> /_ forward only valid packets \*/  
> “forward\_crc\_valid”: true,  
> “forward\_crc\_error”: false,  
> “forward\_crc\_disabled”: false,  
> “fake\_gps”: false,  
> “ref\_latitude”: 10,  
> “ref\_longitude”: 20,  
> “ref\_altitude”: -1,  
> “autoquit\_threshold”: 20  
> }  
> }

And here is my logfile

> **journalctl log**
>
> Apr 13 00:49:21 rak-gateway systemd[1]: ttn-gateway.service: Main process exited, code=exited, status=1/FAILURE  
> Apr 13 00:49:21 rak-gateway systemd[1]: ttn-gateway.service: Failed with result ‘exit-code’.  
> Apr 13 00:49:22 rak-gateway chirpstack-network-server[671]: time=“2024-04-13T00:49:22Z” level=warning msg=“storage: ping PostgreSQL database error, will retry in 2s” error=“pq: password authentication failed for user "chirpstack\_ns"”  
> Apr 13 00:49:22 rak-gateway chirpstack-application-server[658]: time=“2024-04-13T00:49:22Z” level=warning msg=“storage: ping PostgreSQL database error, will retry in 2s” error=“pq: password authentication failed for user "chirpstack\_as"”  
> Apr 13 00:49:25 rak-gateway chirpstack-network-server[671]: time=“2024-04-13T00:49:25Z” level=warning msg=“storage: ping PostgreSQL database error, will retry in 2s” error=“pq: password authentication failed for user "chirpstack\_ns"”  
> Apr 13 00:49:25 rak-gateway chirpstack-application-server[658]: time=“2024-04-13T00:49:25Z” level=warning msg=“storage: ping PostgreSQL database error, will retry in 2s” error=“pq: password authentication failed for user "chirpstack\_as"”  
> Apr 13 00:49:26 rak-gateway systemd[1]: ttn-gateway.service: Scheduled restart job, restart counter is at 86.  
> Apr 13 00:49:26 rak-gateway systemd[1]: Stopped ttn-gateway.service - The Things Network Gateway.  
> Apr 13 00:49:26 rak-gateway systemd[1]: Started ttn-gateway.service - The Things Network Gateway.  
> Apr 13 00:49:26 rak-gateway ttn-gateway[2325]: /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 6: echo: write error: Invalid argument  
> Apr 13 00:49:26 rak-gateway kernel: export\_store: invalid GPIO 22  
> Apr 13 00:49:26 rak-gateway ttn-gateway[2325]: /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 7: /sys/class/gpio/gpio22/direction: No such file or directory  
> Apr 13 00:49:26 rak-gateway ttn-gateway[2325]: /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 8: /sys/class/gpio/gpio22/value: No such file or directory  
> Apr 13 00:49:26 rak-gateway ttn-gateway[2325]: /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 10: /sys/class/gpio/gpio22/value: No such file or directory  
> Apr 13 00:49:27 rak-gateway ttn-gateway[2325]: /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 12: /sys/class/gpio/gpio22/value: No such file or directory  
> Apr 13 00:49:27 rak-gateway ttn-gateway[2325]: /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 14: echo: write error: Invalid argument  
> Apr 13 00:49:27 rak-gateway kernel: unexport\_store: invalid GPIO 22  
> Apr 13 00:49:27 rak-gateway chirpstack-network-server[671]: time=“2024-04-13T00:49:27Z” level=warning msg=“storage: ping PostgreSQL database error, will retry in 2s” error=“pq: password authentication failed for user "chirpstack\_ns"”  
> Apr 13 00:49:27 rak-gateway chirpstack-application-server[658]: time=“2024-04-13T00:49:27Z” level=warning msg=“storage: ping PostgreSQL database error, will retry in 2s” error=“pq: password authentication failed for user "chirpstack\_as"”  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: \*\*\* Beacon Packet Forwarder for Lora Gateway \*\*\*  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: Version: 4.0.1  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: \*\*\* Lora concentrator HAL library version info \*\*\*  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: Version: 5.0.1;  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: \*\*\*  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: Little endian host  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: found global configuration file global\_conf.json, parsing it  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: global\_conf.json does contain a JSON object named SX1301\_conf, parsing SX1301 parameters  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: lorawan\_public 1, clksrc 1  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: no configuration for LBT  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: antenna\_gain 0 dBi  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: Configuring TX LUT with 16 indexes  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: radio 0 enabled (type SX1257), center frequency 867500000, RSSI offset -158.000000, tx enabled 1, tx\_notch\_freq 0  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: radio 1 enabled (type SX1257), center frequency 868500000, RSSI offset -158.000000, tx enabled 0, tx\_notch\_freq 0  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: Lora multi-SF channel 0\> radio 1, IF -400000 Hz, 125 kHz bw, SF 7 to 12  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: Lora multi-SF channel 1\> radio 1, IF -200000 Hz, 125 kHz bw, SF 7 to 12  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: Lora multi-SF channel 2\> radio 1, IF 0 Hz, 125 kHz bw, SF 7 to 12  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: Lora multi-SF channel 3\> radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: Lora multi-SF channel 4\> radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: Lora multi-SF channel 5\> radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: Lora multi-SF channel 6\> radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: Lora multi-SF channel 7\> radio 0, IF 400000 Hz, 125 kHz bw, SF 7 to 12  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: Lora std channel\> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: FSK channel\> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: global\_conf.json does contain a JSON object named gateway\_conf, parsing gateway parameters  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: gateway MAC address is configured to E45F01FFFE7E957D  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: server hostname or IP address is configured to “eu1.cloud.thethings.network”  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: upstream port is configured to “1700”  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: downstream port is configured to “1700”  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: downstream keep-alive interval is configured to 10 seconds  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: statistics display interval is configured to 30 seconds  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: upstream PUSH\_DATA time-out is configured to 100 ms  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: packets received with a valid CRC will be forwarded  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: packets received with a CRC error will NOT be forwarded  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: packets received with no CRC will NOT be forwarded  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: Reference latitude is configured to 10.000000 deg  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: Reference longitude is configured to 20.000000 deg  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: Reference altitude is configured to -1 meters  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: fake GPS is disabled  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: Auto-quit after 20 non-acknowledged PULL\_DATA  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: found local configuration file local\_conf.json, parsing it  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: redefined parameters will overwrite global parameters  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: local\_conf.json does not contain a JSON object named SX1301\_conf  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: local\_conf.json does contain a JSON object named gateway\_conf, parsing gateway parameters  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: gateway MAC address is configured to E45F01FFFE7E957D  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: packets received with a valid CRC will be forwarded  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: packets received with a CRC error will NOT be forwarded  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: INFO: packets received with no CRC will NOT be forwarded  
> Apr 13 00:49:28 rak-gateway ttn-gateway[2334]: ERROR: [main] failed to start the concentrator  
> Apr 13 00:49:28 rak-gateway systemd[1]: ttn-gateway.service: Main process exited, code=exited, status=1/FAILURE  
> Apr 13 00:49:28 rak-gateway systemd[1]: ttn-gateway.service: Failed with result ‘exit-code’.  
> Apr 13 00:49:29 rak-gateway chirpstack-network-server[671]: time=“2024-04-13T00:49:29Z” level=warning msg=“storage: ping PostgreSQL database error, will retry in 2s” error=“pq: password authentication failed for user "chirpstack\_ns"”  
> Apr 13 00:49:29 rak-gateway chirpstack-application-server[658]: time=“2024-04-13T00:49:29Z” level=warning msg=“storage: ping PostgreSQL database error, will retry in 2s” error=“pq: password authentication failed for user "chirpstack\_as"”  
> Apr 13 00:49:31 rak-gateway chirpstack-network-server[671]: time=“2024-04-13T00:49:31Z” level=warning msg=“storage: ping PostgreSQL database error, will retry in 2s” error=“pq: password authentication failed for user "chirpstack\_ns"”  
> Apr 13 00:49:31 rak-gateway chirpstack-application-server[658]: time=“2024-04-13T00:49:31Z” level=warning msg=“storage: ping PostgreSQL database error, will retry in 2s” error=“pq: password authentication failed for user "chirpstack\_as"”  
> Apr 13 00:49:33 rak-gateway systemd[1]: ttn-gateway.service: Scheduled restart job, restart counter is at 87.  
> Apr 13 00:49:33 rak-gateway systemd[1]: Stopped ttn-gateway.service - The Things Network Gateway.  
> Apr 13 00:49:33 rak-gateway systemd[1]: Started ttn-gateway.service - The Things Network Gateway.  
> Apr 13 00:49:33 rak-gateway chirpstack-network-server[671]: time=“2024-04-13T00:49:33Z” level=warning msg=“storage: ping PostgreSQL database error, will retry in 2s” error=“pq: password authentication failed for user "chirpstack\_ns"”  
> Apr 13 00:49:33 rak-gateway ttn-gateway[2342]: /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 6: echo: write error: Invalid argument  
> Apr 13 00:49:33 rak-gateway ttn-gateway[2342]: /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 7: /sys/class/gpio/gpio22/direction: No such file or directory  
> Apr 13 00:49:33 rak-gateway kernel: export\_store: invalid GPIO 22  
> Apr 13 00:49:33 rak-gateway chirpstack-application-server[658]: time=“2024-04-13T00:49:33Z” level=warning msg=“storage: ping PostgreSQL database error, will retry in 2s” error=“pq: password authentication failed for user "chirpstack\_as"”  
> Apr 13 00:49:33 rak-gateway ttn-gateway[2342]: /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 8: /sys/class/gpio/gpio22/value: No such file or directory  
> Apr 13 00:49:33 rak-gateway ttn-gateway[2342]: /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 10: /sys/class/gpio/gpio22/value: No such file or directory  
> Apr 13 00:49:33 rak-gateway ttn-gateway[2342]: /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 12: /sys/class/gpio/gpio22/value: No such file or directory  
> Apr 13 00:49:33 rak-gateway ttn-gateway[2342]: /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 14: echo: write error: Invalid argument  
> Apr 13 00:49:33 rak-gateway kernel: unexport\_store: invalid GPIO 22

This is the output when I start ./start.sh

> **Output from start.sh**
>
> root at rak-gateway in /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd on master✘✘✘  
> ╰─± ./start.sh  
> ./start.sh: line 6: echo: write error: Invalid argument  
> ./start.sh: line 7: /sys/class/gpio/gpio22/direction: No such file or directory  
> ./start.sh: line 8: /sys/class/gpio/gpio22/value: No such file or directory  
> ./start.sh: line 10: /sys/class/gpio/gpio22/value: No such file or directory  
> ./start.sh: line 12: /sys/class/gpio/gpio22/value: No such file or directory  
> ./start.sh: line 14: echo: write error: Invalid argument  
> \*\*\* Beacon Packet Forwarder for Lora Gateway \*\*\*  
> Version: 4.0.1  
> \*\*\* Lora concentrator HAL library version info \*\*\*  
> Version: 5.0.1;
> 
> * * *
> 
> INFO: Little endian host  
> INFO: found global configuration file global\_conf.json, parsing it  
> INFO: global\_conf.json does contain a JSON object named SX1301\_conf, parsing SX1301 parameters  
> INFO: lorawan\_public 1, clksrc 1  
> INFO: no configuration for LBT  
> INFO: antenna\_gain 0 dBi  
> INFO: Configuring TX LUT with 16 indexes  
> INFO: radio 0 enabled (type SX1257), center frequency 867500000, RSSI offset -158.000000, tx enabled 1, tx\_notch\_freq 0  
> INFO: radio 1 enabled (type SX1257), center frequency 868500000, RSSI offset -158.000000, tx enabled 0, tx\_notch\_freq 0  
> INFO: Lora multi-SF channel 0\> radio 1, IF -400000 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora multi-SF channel 1\> radio 1, IF -200000 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora multi-SF channel 2\> radio 1, IF 0 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora multi-SF channel 3\> radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora multi-SF channel 4\> radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora multi-SF channel 5\> radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora multi-SF channel 6\> radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora multi-SF channel 7\> radio 0, IF 400000 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora std channel\> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7  
> INFO: FSK channel\> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate  
> INFO: global\_conf.json does contain a JSON object named gateway\_conf, parsing gateway parameters  
> INFO: gateway MAC address is configured to E45F01FFFE7E957D  
> INFO: server hostname or IP address is configured to “eu1.cloud.thethings.network”  
> INFO: upstream port is configured to “1700”  
> INFO: downstream port is configured to “1700”  
> INFO: downstream keep-alive interval is configured to 10 seconds  
> INFO: statistics display interval is configured to 30 seconds  
> INFO: upstream PUSH\_DATA time-out is configured to 100 ms  
> INFO: packets received with a valid CRC will be forwarded  
> INFO: packets received with a CRC error will NOT be forwarded  
> INFO: packets received with no CRC will NOT be forwarded  
> INFO: Reference latitude is configured to 10.000000 deg  
> INFO: Reference longitude is configured to 20.000000 deg  
> INFO: Reference altitude is configured to -1 meters  
> INFO: fake GPS is disabled  
> INFO: Auto-quit after 20 non-acknowledged PULL\_DATA  
> INFO: found local configuration file local\_conf.json, parsing it  
> INFO: redefined parameters will overwrite global parameters  
> INFO: local\_conf.json does not contain a JSON object named SX1301\_conf  
> INFO: local\_conf.json does contain a JSON object named gateway\_conf, parsing gateway parameters  
> INFO: gateway MAC address is configured to E45F01FFFE7E957D  
> INFO: packets received with a valid CRC will be forwarded  
> INFO: packets received with a CRC error will NOT be forwarded  
> INFO: packets received with no CRC will NOT be forwarded  
> ERROR: [main] failed to start the concentrator

---

<div class="post-metadata">

**Author:** ![SimonBoonstra](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/simonboonstra/32/46312_2.png) [@SimonBoonstra](https://www.thethingsnetwork.org/forum/u/SimonBoonstra)\
**Post date:** [April 13, 2024, 2:12am UTC](https://www.thethingsnetwork.org/forum/t/rak833-failed-to-start-the-concentrator/67579/2 "2024-04-13T02:12:05Z")

</div>

I have a short update.

I have uninstalled all the software from the manufacturer “Pi Supply” and cloned this git repository instead :  
[https://github.com/Lora-net/packet\_forwarder](https://github.com/Lora-net/packet_forwarder).

Initially I had the same error `ERROR: [main] failed to start the concentrator`. But then suddenly the gateway has become alive. Blue LED from RX line is illuminated.

I’ve tested a bit further around and the behavior is like this.  
I repeat relative shortly one try after another the command `./lora_pkt_fwd`. Most of the time it stops with the error. But about every tenth attempt works.

Maybe someone has an idea what could be the issue?

Uopdate 2  
Now after a reboot the gateway is dead again.  
Maybe a connection issue? Although it is a hat. So no cables which could be loose. Or it is just dead?

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [April 13, 2024, 8:36am UTC](https://www.thethingsnetwork.org/forum/t/rak833-failed-to-start-the-concentrator/67579/3 "2024-04-13T08:36:29Z")

</div>

Have you considered using the manufacturers installer for their product?

---

<div class="post-metadata">

**Author:** ![Jeff-UK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jeff-uk/32/35697_2.png) [@Jeff-UK](https://www.thethingsnetwork.org/forum/u/Jeff-UK)\
**Post date:** [April 13, 2024, 10:43am UTC](https://www.thethingsnetwork.org/forum/t/rak833-failed-to-start-the-concentrator/67579/4 "2024-04-13T10:43:45Z")

</div>

@SimonBoonstra Trying random power or start up cyles you might get lucky and find device (SX1301 on Conc card) gets a reset, but as you found that is not consistent/repeatable. Suspect you have wrong GPIO assigned for reset (I need to reread docs), from memory I think RAK reasonably consistent on BCOM pin 17? (atleast for that gen of Cards) - check your start or pkt frwdr script. (1st place to check would be to “sudo nano start.sh” (not sure where your installer has dropped it but usually in /opt or a directory under there) and look in there/edit!), again from memory think it is declared around lines 8-15?)

---

<div class="post-metadata">

**Author:** ![SimonBoonstra](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/simonboonstra/32/46312_2.png) [@SimonBoonstra](https://www.thethingsnetwork.org/forum/u/SimonBoonstra)\
**Post date:** [April 13, 2024, 11:34pm UTC](https://www.thethingsnetwork.org/forum/t/rak833-failed-to-start-the-concentrator/67579/5 "2024-04-13T23:34:32Z")

</div>

Hi, Yes sure. I had also started with the manufacturers installer. But it didn’t worked for me. Then I remembered. Before the issue came which I have currently, I had to switch also in the very first installation to the [https://github.com/Lora-net/packet\_forwarder](https://github.com/Lora-net/packet_forwarder) repository. This worked then.

I didn’t further investigate more, why the manufacturers installer didn’t worked for my, because I was already happy, as it run already with the other repository just fine.

Until now, with the new issue.

---

<div class="post-metadata">

**Author:** ![SimonBoonstra](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/simonboonstra/32/46312_2.png) [@SimonBoonstra](https://www.thethingsnetwork.org/forum/u/SimonBoonstra)\
**Post date:** [April 14, 2024, 12:25am UTC](https://www.thethingsnetwork.org/forum/t/rak833-failed-to-start-the-concentrator/67579/6 "2024-04-14T00:25:32Z")

</div>

Hi, according to [manufacturer’s install instruction](https://www.thethingsnetwork.org/forum/t/rak833-failed-to-start-the-concentrator/67579/5), I need to change in my start.sh file the reset pin  
from

```auto
SX1301_RESET_BCM_PIN=17

```

to

```auto
SX1301_RESET_BCM_PIN=22

```

It is writen exactly like this in the installation instructions. I see also here in the hardware documentation that the reset pin is board pin 15 which corresponds with the BCM Pin 22, if I’m not completely mistaken.

However, I gave now one more try to stick with the manufacturers installation file, respectievely repository. The installer places files in `/opt/ttn-gateway/packet_forwarder/lora_pkt_fwd` and in `/opt/ttn-gateway/lora_gateway`.

When I execute `/opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/start.sh` The error is, that the folder `/sys/class/gpio/gpio22` and subdirectories are missing, according the details from Output from start.sh.

> **Output from start.sh**
>
> /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh  
> /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 6: echo: write error: Invalid argument  
> /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 7: /sys/class/gpio/gpio22/direction: No such file or directory  
> /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 8: /sys/class/gpio/gpio22/value: No such file or directory  
> /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 10: /sys/class/gpio/gpio22/value: No such file or directory  
> /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 12: /sys/class/gpio/gpio22/value: No such file or directory  
> /opt/ttn-gateway/packet\_forwarder/lora\_pkt\_fwd/start.sh: line 14: echo: write error: Invalid argument  
> \*\*\* Beacon Packet Forwarder for Lora Gateway \*\*\*  
> Version: 4.0.1  
> \*\*\* Lora concentrator HAL library version info \*\*\*  
> Version: 5.0.1;
> 
> * * *
> 
> INFO: Little endian host  
> INFO: found global configuration file global\_conf.json, parsing it  
> INFO: global\_conf.json does contain a JSON object named SX1301\_conf, parsing SX1301 parameters  
> INFO: lorawan\_public 1, clksrc 1  
> INFO: no configuration for LBT  
> INFO: antenna\_gain 0 dBi  
> INFO: Configuring TX LUT with 16 indexes  
> INFO: radio 0 enabled (type SX1257), center frequency 867500000, RSSI offset -158.000000, tx enabled 1, tx\_notch\_freq 0  
> INFO: radio 1 enabled (type SX1257), center frequency 868500000, RSSI offset -158.000000, tx enabled 0, tx\_notch\_freq 0  
> INFO: Lora multi-SF channel 0\> radio 1, IF -400000 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora multi-SF channel 1\> radio 1, IF -200000 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora multi-SF channel 2\> radio 1, IF 0 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora multi-SF channel 3\> radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora multi-SF channel 4\> radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora multi-SF channel 5\> radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora multi-SF channel 6\> radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora multi-SF channel 7\> radio 0, IF 400000 Hz, 125 kHz bw, SF 7 to 12  
> INFO: Lora std channel\> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7  
> INFO: FSK channel\> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate  
> INFO: global\_conf.json does contain a JSON object named gateway\_conf, parsing gateway parameters  
> INFO: gateway MAC address is configured to 0000000000000000  
> INFO: server hostname or IP address is configured to “eu1.cloud.thethings.network”  
> INFO: upstream port is configured to “1700”  
> INFO: downstream port is configured to “1700”  
> INFO: downstream keep-alive interval is configured to 10 seconds  
> INFO: statistics display interval is configured to 30 seconds  
> INFO: upstream PUSH\_DATA time-out is configured to 100 ms  
> INFO: packets received with a valid CRC will be forwarded  
> INFO: packets received with a CRC error will NOT be forwarded  
> INFO: packets received with no CRC will NOT be forwarded  
> INFO: Reference latitude is configured to 10.000000 deg  
> INFO: Reference longitude is configured to 20.000000 deg  
> INFO: Reference altitude is configured to -1 meters  
> INFO: fake GPS is disabled  
> INFO: Auto-quit after 20 non-acknowledged PULL\_DATA  
> INFO: found local configuration file local\_conf.json, parsing it  
> INFO: redefined parameters will overwrite global parameters  
> INFO: local\_conf.json does not contain a JSON object named SX1301\_conf  
> INFO: local\_conf.json does contain a JSON object named gateway\_conf, parsing gateway parameters  
> INFO: gateway MAC address is configured to   
> INFO: packets received with a valid CRC will be forwarded  
> INFO: packets received with a CRC error will NOT be forwarded  
> INFO: packets received with no CRC will NOT be forwarded  
> ERROR: [main] failed to start the concentrator

This is, how my /sys/class/gpio folder looks

```bash
Octal Permissions Size User Group Date Modified Name
0220 .-w--w---- 4.1k root gpio 14 Apr 00:23 export
0777 lrwxrwxrwx 0 root gpio 13 Apr 23:43 gpiochip512 -> ../../devices/platform/soc/3f200000.gpio/gpio/gpiochip512/
0220 .-w--w---- 4.1k root gpio 14 Apr 00:23 unexport
╭─root at rak-gateway in /sys/class/gpio

```

If someone have an Idea, what could be the reason that I don’t have the mentioned folder structure, would be much apprechiated, as I’m out of any idea right now.

---

<div class="post-metadata">

**Author:** ![SimonBoonstra](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/simonboonstra/32/46312_2.png) [@SimonBoonstra](https://www.thethingsnetwork.org/forum/u/SimonBoonstra)\
**Post date:** [April 14, 2024, 3:07am UTC](https://www.thethingsnetwork.org/forum/t/rak833-failed-to-start-the-concentrator/67579/7 "2024-04-14T03:07:51Z")

</div>

Since I don’t know, how to solve the problem with the GPIO pins and the non-existent folder(s), I have developed a workaround. I switch the reset GPIO pin from high to low, ten times in a row with a python script. Then I immediately start the packet forwarder. This approach works roughly at 60% of cases.  
If it doesn’t work with the first try, then it will most likely work the next time I’ll try. And in very rare cases, I need three attempts.

But it would of course still be nice if the original problem could be solved, if anyone has an idea.

Command used: `python /root/gpio_toggle.py && ./lora_pkt_fwd`.  
Here is the corresponding Python script:

```python
import RPi.GPIO as GPIO
import time

# Set the pin mode to BCM
GPIO.setmode(GPIO.BCM)

# Set pin 22 as output
GPIO.setup(22, GPIO.OUT)

# Turn the pin on and off 10 times
for i in range(10):
    GPIO.output(22, GPIO.HIGH) # Turn the pin on
    time.sleep(0.1) # Wait for 0.1 seconds
    GPIO.output(22, GPIO.LOW) # Turn the pin off
    time.sleep(0.1) # Wait for 0.1 seconds

# Clean up and exit GPIO
GPIO.cleanup()
```

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [April 14, 2024, 9:23am UTC](https://www.thethingsnetwork.org/forum/t/rak833-failed-to-start-the-concentrator/67579/8 "2024-04-14T09:23:26Z")

</div>

> [@SimonBoonstra](#):
>
> The error is, that the folder `/sys/class/gpio/gpio22` and subdirectories are missing

The installers will have been created against prior releases of Raspberry Pi OS so if you have another SD Card you could try stepping back to something like Buster.

I’d try my RAK833 but it’s disappeared under the rumble I call shelves.

Have you made any enquiries on the RAK forum?

---

<div class="post-metadata">

**Author:** ![Jeff-UK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jeff-uk/32/35697_2.png) [@Jeff-UK](https://www.thethingsnetwork.org/forum/u/Jeff-UK)\
**Post date:** [April 14, 2024, 11:12am UTC](https://www.thethingsnetwork.org/forum/t/rak833-failed-to-start-the-concentrator/67579/9 "2024-04-14T11:12:54Z")

</div>

> [@SimonBoonstra](#):
>
> Hi, according to [manufacturer’s install instruction](https://www.thethingsnetwork.org/forum/t/rak833-failed-to-start-the-concentrator/67579/5), I need to change in my start.sh file the reset pin  
> from
> 
> ```auto
> SX1301_RESET_BCM_PIN=17
> 
> ```
> 
> to
> 
> ```auto
> SX1301_RESET_BCM_PIN=22
> 
> ```
> 
> It is writen exactly like this in the installation instructions. I see also here in the hardware documentation that the reset pin is board pin 15 which corresponds with the BCM Pin 22, if I’m not completely mistaken.

Dont have the docs immediately in front of me and working from memory (dangerous I know!), it will depend on the HAT or other interface you are using…and how that maps the mPCIe card physical pin out (correctly called out as physical pin 22) to actual Broadcom GPIO logical pinout. (which is what the s/w considers). You might just check all the mappings and satisfy that way 😉 I know a lot of later gen (SX1302&1303) mPCIe cards use Pin 22 (from memory SEEED, Mimic, Elecrow, Waveshare…)

Your link above doesnt help me check as circular to your own post above 😉 Just logged into some of my other RAK SX1301 GW’s and can see BCM Pin 17 called out in start.sh hence my suggestion, but you need to check, later RAK units switched form 8xx numbering (831, 832, 833 - SX1301/8 based) to (2xxx, 7xxx based - SX1302/3) so that may be when reset pin/assignment changed, along with the mCPIe format shift? Just make sure s/w build is for the platform you are using.

🤔 BTW you could always just try the alternate pin options - no harm done if wrong!

---

<div class="post-metadata">

**Author:** ![dexterac](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/dexterac/32/35697_2.png) [@dexterac](https://www.thethingsnetwork.org/forum/u/dexterac)\
**Post date:** [May 9, 2024, 11:30pm UTC](https://www.thethingsnetwork.org/forum/t/rak833-failed-to-start-the-concentrator/67579/10 "2024-05-09T23:30:22Z")

</div>

Bookworm OS which uses 6.6 no longer supports echo to write to the GPIO pins. This has been replaced with pinctrl command. Updating the the reset() function in the reset\_lgw.sh helped me address these issues.

```auto
reset() {
    echo "CoreCell reset through GPIO$SX1302_RESET_PIN..."
    echo "SX1261 reset through GPIO$SX1302_RESET_PIN..."
    echo "CoreCell power enable through GPIO$SX1302_POWER_EN_PIN..."
    echo "CoreCell ADC reset through GPIO$AD5338R_RESET_PIN..."

    # write output for SX1302 CoreCell power_enable and reset
	pinctrl set $SX1302_RESET_PIN op; WAIT_GPIO
	pinctrl set $SX1302_RESET_PIN op dh; WAIT_GPIO
	pinctrl set $SX1302_RESET_PIN op dl; WAIT_GPIO

    	pinctrl set $SX1261_RESET_PIN op; WAIT_GPIO
	pinctrl set $SX1261_RESET_PIN op dl; WAIT_GPIO
	pinctrl set $SX1261_RESET_PIN op dh; WAIT_GPIO

}

```

* * *

```auto
~/sx1302_hal/tools $ ../util_chip_id/chip_id
CoreCell reset through GPIO17...
SX1261 reset through GPIO17...
CoreCell power enable through GPIO18...
CoreCell ADC reset through GPIO13...
Opening SPI communication interface
Note: chip version is 0x10 (v1.0)
INFO: using legacy timestamp
ARB: dual demodulation disabled for all SF
INFO: no temperature sensor found on port 0x39
INFO: no temperature sensor found on port 0x3B
INFO: no temperature sensor found on port 0x38
ERROR: no temperature sensor found.

INFO: concentrator EUI: 0x0016c00000000251

Closing SPI communication interface
ERROR: failed to close I2C temperature sensor device (err=-1)
ERROR: failed to stop the gateway

```

I had disabled temperature check but this doesn’t block me anymore from getting the Concentrator EUI number.
