# RAK2287 + RPI4 + BalenaCloud connection issues

**URL:** <https://www.thethingsnetwork.org/forum/t/rak2287-rpi4-balenacloud-connection-issues/50747>\
**Category:** Raspberry Pi Gateways\
**Created:** [August 18, 2021, 10:35am UTC](https://www.thethingsnetwork.org/forum/t/rak2287-rpi4-balenacloud-connection-issues/50747 "2021-08-18T10:35:05Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![laurens](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/laurens/32/46841_2.png) [@laurens](https://www.thethingsnetwork.org/forum/u/laurens)\
**Post date:** [August 18, 2021, 10:35am UTC](https://www.thethingsnetwork.org/forum/t/rak2287-rpi4-balenacloud-connection-issues/50747/1 "2021-08-18T10:35:06Z")

</div>

I’m facing some issues with getting my RAK2287 & RPI4 to work using Basics Station. I’ve followed the below instructions. Log files are shown at the bottom of this thread.

> **[Deploy a LoRa Basics™ Station gateway with TTN and balena](https://www.balena.io/blog/deploy-a-basics-station-lora-gateway-with-ttn-and-balena/)**
>
> How to deploy a TTN and TTI LoRa gateway with Basics Station Packet Forward in one click using balena and the RAK2245 with a Raspberry Pi or balenaFin.

![Screenshot 2021-08-18 at 12.21.14](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/6/9/69587540ad30c66c06c25db4fd9c27495fdaffae.png)

![Screenshot 2021-08-16 at 18.41.21](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/8/1/81ff8177730f012120d551143fd6c3bfb09cb733.png)

```auto
 main ERROR: UNKNOWN TX STATUS 0x00
 main ERROR: UNKNOWN TX STATUS 0x00
 main 2021-08-16 16:33:33.754 [any:INFO] ./lns-ttn/tc.trust: 
 main cert. version : 3
 main serial number : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B
 main issuer name : O=Digital Signature Trust Co., CN=DST Root CA X3
 main subject name : O=Digital Signature Trust Co., CN=DST Root CA X3
 main issued on : 2000-09-30 21:12:19
 main expires on : 2021-09-30 14:01:15
 main signed using : RSA with SHA1
 main RSA key size : 2048 bits
 main basic constraints : CA=true
 main key usage : Key Cert Sign, CRL Sign
 main 2021-08-16 16:33:33.754 [AIO:INFO] tc has no cert configured - running server auth and client auth with token
 main 2021-08-16 16:33:33.787 [TCE:INFO] Connecting to INFOS: wss://eu1.cloud.thethings.network:8887
 main 2021-08-16 16:33:33.907 [TCE:INFO] Infos: dca6:32ff:fe63:331b muxs-::0 wss://eu1.cloud.thethings.network:8887/traffic/eui-DCA632FFFE63331B
 main 2021-08-16 16:33:33.907 [AIO:DEBU] [3] ws_close reason=1000
 main 2021-08-16 16:33:33.907 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
 main 2021-08-16 16:33:33.907 [AIO:DEBU] [3] WS connection shutdown...
 main 2021-08-16 16:33:33.908 [any:INFO] ./lns-ttn/tc.trust: 
 main cert. version : 3
 main serial number : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B
 main issuer name : O=Digital Signature Trust Co., CN=DST Root CA X3
 main subject name : O=Digital Signature Trust Co., CN=DST Root CA X3
 main issued on : 2000-09-30 21:12:19
 main expires on : 2021-09-30 14:01:15
 main signed using : RSA with SHA1
 main RSA key size : 2048 bits
 main basic constraints : CA=true
 main key usage : Key Cert Sign, CRL Sign
 main 2021-08-16 16:33:33.908 [AIO:INFO] tc has no cert configured - running server auth and client auth with token
 main 2021-08-16 16:33:33.929 [TCE:VERB] Connecting to MUXS...
 main 2021-08-16 16:33:34.051 [TCE:VERB] Connected to MUXS.
 main 2021-08-16 16:33:34.071 [SYS:VERB] rinit.sh: Forked, waiting...
 main ./reset_lgw.sh: 24: echo: echo: I/O error
 main RAK2287 reset through GPIO17...
 main RAK2287 power enable through GPIO17...
 main 2021-08-16 16:33:34.933 [SYS:INFO] Process rinit.sh (pid=1439) completed
 main ERROR: Failed to stop TX trigger
 main ERROR: Failed to stop TX trigger
 main 2021-08-16 16:33:34.933 [RAL:INFO] Lora gateway library version: Version: 1.0.5;
 main 2021-08-16 16:33:34.935 [RAL:VERB] Connecting to device: /dev/spidev0.0
 main 2021-08-16 16:33:34.935 [RAL:DEBU] SX130x txlut table (16 entries)
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 0: rf_power=12 pa_gain=0 pwr_idx=15
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 1: rf_power=13 pa_gain=0 pwr_idx=16
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 2: rf_power=14 pa_gain=0 pwr_idx=17
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 3: rf_power=15 pa_gain=0 pwr_idx=19
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 4: rf_power=16 pa_gain=0 pwr_idx=20
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 5: rf_power=17 pa_gain=0 pwr_idx=22
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 6: rf_power=18 pa_gain=1 pwr_idx=1
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 7: rf_power=19 pa_gain=1 pwr_idx=2
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 8: rf_power=20 pa_gain=1 pwr_idx=3
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 9: rf_power=21 pa_gain=1 pwr_idx=4
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 10: rf_power=22 pa_gain=1 pwr_idx=5
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 11: rf_power=23 pa_gain=1 pwr_idx=6
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 12: rf_power=24 pa_gain=1 pwr_idx=7
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 13: rf_power=25 pa_gain=1 pwr_idx=9
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 14: rf_power=26 pa_gain=1 pwr_idx=11
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 txlut 15: rf_power=27 pa_gain=1 pwr_idx=14
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 rssi_tcomp: coeff_a=0.000 coeff_b=0.000 coeff_c=20.410 coeff_d=2162.560 coeff_e=0.000
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 rxrfchain 0: enable=1 freq=867.5MHz rssi_offset=-215.399994 type=5 tx_enable=1
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 rxrfchain 1: enable=1 freq=868.5MHz rssi_offset=-215.399994 type=5 tx_enable=0
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 ifchain 0: enable=1 rf_chain=1 freq=-400000 bw=0 SF=0 sync_word=0/0
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 ifchain 1: enable=1 rf_chain=1 freq=-200000 bw=0 SF=0 sync_word=0/0
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 ifchain 2: enable=1 rf_chain=1 freq=0 bw=0 SF=0 sync_word=0/0
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 ifchain 3: enable=1 rf_chain=0 freq=-400000 bw=0 SF=0 sync_word=0/0
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 ifchain 4: enable=1 rf_chain=0 freq=-200000 bw=0 SF=0 sync_word=0/0
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 ifchain 5: enable=1 rf_chain=0 freq=0 bw=0 SF=0 sync_word=0/0
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 ifchain 6: enable=1 rf_chain=0 freq=200000 bw=0 SF=0 sync_word=0/0
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 ifchain 7: enable=1 rf_chain=0 freq=400000 bw=0 SF=0 sync_word=0/0
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 ifchain 8: enable=1 rf_chain=1 freq=-200000 bw=5 SF=7 sync_word=0/0 [STD] Explicit header
 main 2021-08-16 16:33:34.935 [RAL:VERB] SX1302 ifchain 9: enable=1 rf_chain=1 freq=300000 bw=4 SF=50000 sync_word=0/0
 main 2021-08-16 16:33:34.935 [RAL:VERB] Station device: /dev/spidev0.0 (PPS capture disabled)
 main 2021-08-16 16:33:34.936 [RAL:ERRO] Concentrator start failed: lgw_start
 main 2021-08-16 16:33:34.936 [RAL:ERRO] ral_config failed with status 0x08
 main 2021-08-16 16:33:34.936 [any:ERRO] Closing connection to muxs - error in s2e_onMsg
 main 2021-08-16 16:33:34.936 [AIO:DEBU] [3] ws_close reason=1000
 main 2021-08-16 16:33:34.936 [AIO:DEBU] Echoing close - reason=1000
 main 2021-08-16 16:33:34.955 [AIO:DEBU] [3|WS] Server sent close: reason=1000
 main 2021-08-16 16:33:34.955 [AIO:DEBU] [3] WS connection shutdown...
 main 2021-08-16 16:33:34.955 [TCE:VERB] Connection to MUXS closed in state -1
 main 2021-08-16 16:33:34.955 [TCE:INFO] INFOS reconnect backoff 10s (retry 1)

```

---

<div class="post-metadata">

**Author:** ![xoseperez](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/xoseperez/32/44865_2.png) [@xoseperez](https://www.thethingsnetwork.org/forum/u/xoseperez)\
**Post date:** [August 18, 2021, 10:59am UTC](https://www.thethingsnetwork.org/forum/t/rak2287-rpi4-balenacloud-connection-issues/50747/2 "2021-08-18T10:59:43Z")

</div>

The error is caused by the BasicStation code not being able to reset the concentrator. Now, there are few things to check when this happens:

- Is it the right chip model? The RAK2287 uses the SX1302 so that’s ok according to the logs
- Does the module use SPI interface? Be aware that RAK is selling SPI and USB variants of the RAK2287. At the time being only the SPI variant is supported
- Is the reset PIN or GPIO correct? If you are using a RAK hat then the GW\_RESET\_PIN should be 11 (this is equivalent to GW\_RESET\_GPIO=17), looks right on the logs as well
- Wiring problems, dust,… shoulnd’t be the reason but if all the rest is OK then…

So I would say: double check you got the SPI version of the RAK2287 (maybe checking the original order confirmation).

---

<div class="post-metadata">

**Author:** ![laurens](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/laurens/32/46841_2.png) [@laurens](https://www.thethingsnetwork.org/forum/u/laurens)\
**Post date:** [August 18, 2021, 11:30am UTC](https://www.thethingsnetwork.org/forum/t/rak2287-rpi4-balenacloud-connection-issues/50747/3 "2021-08-18T11:30:29Z")

</div>

Thanks @xoseperez it seems I got the USB version, not the SPI.

Let me reorder the SPI version and give you an update once I received it.

---

<div class="post-metadata">

**Author:** ![xoseperez](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/xoseperez/32/44865_2.png) [@xoseperez](https://www.thethingsnetwork.org/forum/u/xoseperez)\
**Post date:** [August 18, 2021, 11:38am UTC](https://www.thethingsnetwork.org/forum/t/rak2287-rpi4-balenacloud-connection-issues/50747/4 "2021-08-18T11:38:48Z")

</div>

Ah, bad luck. We will try to add USB support as soon as possible.

---

<div class="post-metadata">

**Author:** ![jpmeijers](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jpmeijers/32/48543_2.png) [@jpmeijers](https://www.thethingsnetwork.org/forum/u/jpmeijers)\
**Post date:** [August 18, 2021, 11:39am UTC](https://www.thethingsnetwork.org/forum/t/rak2287-rpi4-balenacloud-connection-issues/50747/5 "2021-08-18T11:39:26Z")

</div>

> [@xoseperez](#):
>
> At the time being only the SPI variant is supported

Is it a software or hardware limitation? In other words: should I rather order the SPI version, or should I wait until the software supports the USB version?

---

<div class="post-metadata">

**Author:** ![xoseperez](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/xoseperez/32/44865_2.png) [@xoseperez](https://www.thethingsnetwork.org/forum/u/xoseperez)\
**Post date:** [August 19, 2021, 3:53pm UTC](https://www.thethingsnetwork.org/forum/t/rak2287-rpi4-balenacloud-connection-issues/50747/6 "2021-08-19T15:53:32Z")

</div>

It’s is a software issue. Hardware-wise, you will have to connect the hat microUSB to the Raspberry Pi USB ports since there is no USB interface on the 40-pin header.

---

<div class="post-metadata">

**Author:** ![laurens](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/laurens/32/46841_2.png) [@laurens](https://www.thethingsnetwork.org/forum/u/laurens)\
**Post date:** [August 26, 2021, 2:50pm UTC](https://www.thethingsnetwork.org/forum/t/rak2287-rpi4-balenacloud-connection-issues/50747/7 "2021-08-26T14:50:10Z")

</div>

I received the SPI-version of the RAK2287, plugged it in and it directly worked. So my issue was related to the hardware.

![Screenshot 2021-08-26 at 16.46.27](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/a/b/abc2393ca6d009e0b7ebc5960ca768a036c3a34d.png)

---

<div class="post-metadata">

**Author:** ![gy4nt](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/gy4nt/32/42437_2.png) [@gy4nt](https://www.thethingsnetwork.org/forum/u/gy4nt)\
**Post date:** [August 27, 2021, 1:55pm UTC](https://www.thethingsnetwork.org/forum/t/rak2287-rpi4-balenacloud-connection-issues/50747/8 "2021-08-27T13:55:46Z")

</div>

Thank you for confirming that it works with SPI LoRa concentrator @laurens 🙂

---

<div class="post-metadata">

**Author:** ![ketil](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ketil/32/42216_2.png) [@ketil](https://www.thethingsnetwork.org/forum/u/ketil)\
**Post date:** [September 17, 2021, 7:51am UTC](https://www.thethingsnetwork.org/forum/t/rak2287-rpi4-balenacloud-connection-issues/50747/9 "2021-09-17T07:51:14Z")

</div>

Hi,

I see similar errors in my console output. The reset fails like in @laurens example, but the concentrator is still starting. In my case, I have the SPI interface version of RAK2287 rather than the USB version. MODEL has been set to SX1302 through a balena environment variable, GW\_RESET\_PIN=11, and GW\_RESET\_GPIO=17.

This is the log output:

```auto
Gateway EUI: ...
parse error: Invalid numeric literal at EOF at line 1, column 12
Using MODEL: SX1302
Server: wss://eu1.cloud.thethings.network:8887
Using variant=std, lns_config='./lns-ttn'
 Starting Station ... 
2021-09-17 07:23:41.840 [SYS:INFO] Logging : stderr (maxsize=10000000, rotate=3)
2021-09-17 07:23:41.840 [SYS:INFO] Station Ver : 2.0.5(corecell/std) 2021-09-16 19:10:46
2021-09-17 07:23:41.840 [SYS:INFO] Package Ver : 2.0.4
2021-09-17 07:23:41.840 [SYS:INFO] proto EUI : ... (/sys/class/net/eth0/address)
2021-09-17 07:23:41.841 [SYS:INFO] prefix EUI : ::1 (builtin)
2021-09-17 07:23:41.841 [SYS:INFO] Station EUI : ...
2021-09-17 07:23:41.841 [SYS:INFO] Station home: ./lns-ttn/ (--home)
2021-09-17 07:23:41.841 [SYS:INFO] Station temp: /var/tmp/ (builtin)
2021-09-17 07:23:41.841 [SYS:WARN] Station in NO-CUPS mode
2021-09-17 07:23:42.043 [TCE:INFO] Starting TC engine
2021-09-17 07:23:42.044 [any:INFO] ./lns-ttn/tc.trust: 
cert. version : 3
serial number : ...
issuer name : O=Digital Signature Trust Co., CN=DST Root CA X3
subject name : O=Digital Signature Trust Co., CN=DST Root CA X3
issued on : ...
expires on : ...
signed using : RSA with SHA1
RSA key size : 2048 bits
basic constraints : CA=true
key usage : Key Cert Sign, CRL Sign
2021-09-17 07:23:42.044 [AIO:INFO] tc has no cert configured - running server auth and client auth with token
2021-09-17 07:23:42.101 [TCE:INFO] Connecting to INFOS: wss://eu1.cloud.thethings.network:8887
2021-09-17 07:23:42.452 [TCE:INFO] Infos: ... muxs-::0 wss://eu1.cloud.thethings.network:8887/traffic/eui-...
2021-09-17 07:23:42.452 [AIO:DEBU] [3] ws_close reason=1000
2021-09-17 07:23:42.452 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
2021-09-17 07:23:42.452 [AIO:DEBU] [3] WS connection shutdown...
2021-09-17 07:23:42.453 [any:INFO] ./lns-ttn/tc.trust: 
cert. version : 3
serial number : ...
issuer name : O=Digital Signature Trust Co., CN=DST Root CA X3
subject name : O=Digital Signature Trust Co., CN=DST Root CA X3
issued on : ...
expires on : ...
signed using : RSA with SHA1
RSA key size : 2048 bits
basic constraints : CA=true
key usage : Key Cert Sign, CRL Sign
2021-09-17 07:23:42.453 [AIO:INFO] tc has no cert configured - running server auth and client auth with token
2021-09-17 07:23:42.518 [TCE:VERB] Connecting to MUXS...
2021-09-17 07:23:42.803 [TCE:VERB] Connected to MUXS.
2021-09-17 07:23:42.856 [SYS:VERB] rinit.sh: Forked, waiting...
./reset_lgw.sh: 24: echo: echo: I/O error
RAK2287 reset through GPIO17...
RAK2287 power enable through GPIO17...
2021-09-17 07:23:43.713 [SYS:INFO] Process rinit.sh (pid=40) completed
ERROR: Failed to stop TX trigger
ERROR: Failed to stop TX trigger
2021-09-17 07:23:43.713 [RAL:INFO] Lora gateway library version: Version: 1.0.5;
2021-09-17 07:23:43.714 [RAL:VERB] Connecting to device: /dev/spidev0.0
2021-09-17 07:23:43.714 [RAL:DEBU] SX130x txlut table (16 entries)
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 0: rf_power=12 pa_gain=0 pwr_idx=15
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 1: rf_power=13 pa_gain=0 pwr_idx=16
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 2: rf_power=14 pa_gain=0 pwr_idx=17
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 3: rf_power=15 pa_gain=0 pwr_idx=19
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 4: rf_power=16 pa_gain=0 pwr_idx=20
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 5: rf_power=17 pa_gain=0 pwr_idx=22
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 6: rf_power=18 pa_gain=1 pwr_idx=1
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 7: rf_power=19 pa_gain=1 pwr_idx=2
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 8: rf_power=20 pa_gain=1 pwr_idx=3
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 9: rf_power=21 pa_gain=1 pwr_idx=4
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 10: rf_power=22 pa_gain=1 pwr_idx=5
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 11: rf_power=23 pa_gain=1 pwr_idx=6
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 12: rf_power=24 pa_gain=1 pwr_idx=7
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 13: rf_power=25 pa_gain=1 pwr_idx=9
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 14: rf_power=26 pa_gain=1 pwr_idx=11
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 txlut 15: rf_power=27 pa_gain=1 pwr_idx=14
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 rssi_tcomp: coeff_a=0.000 coeff_b=0.000 coeff_c=20.410 coeff_d=2162.560 coeff_e=0.000
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 rxrfchain 0: enable=1 freq=867.5MHz rssi_offset=-215.399994 type=5 tx_enable=1
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 rxrfchain 1: enable=1 freq=868.5MHz rssi_offset=-215.399994 type=5 tx_enable=0
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 ifchain 0: enable=1 rf_chain=1 freq=-400000 bw=0 SF=0 sync_word=0/0
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 ifchain 1: enable=1 rf_chain=1 freq=-200000 bw=0 SF=0 sync_word=0/0
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 ifchain 2: enable=1 rf_chain=1 freq=0 bw=0 SF=0 sync_word=0/0
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 ifchain 3: enable=1 rf_chain=0 freq=-400000 bw=0 SF=0 sync_word=0/0
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 ifchain 4: enable=1 rf_chain=0 freq=-200000 bw=0 SF=0 sync_word=0/0
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 ifchain 5: enable=1 rf_chain=0 freq=0 bw=0 SF=0 sync_word=0/0
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 ifchain 6: enable=1 rf_chain=0 freq=200000 bw=0 SF=0 sync_word=0/0
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 ifchain 7: enable=1 rf_chain=0 freq=400000 bw=0 SF=0 sync_word=0/0
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 ifchain 8: enable=1 rf_chain=1 freq=-200000 bw=5 SF=7 sync_word=0/0 [STD] Explicit header
2021-09-17 07:23:43.714 [RAL:VERB] SX1302 ifchain 9: enable=1 rf_chain=1 freq=300000 bw=4 SF=50000 sync_word=0/0
2021-09-17 07:23:43.714 [RAL:VERB] Station device: /dev/spidev0.0 (PPS capture disabled)
2021-09-17 07:23:46.199 [RAL:VERB] Concentrator started (2s483ms)
2021-09-17 07:23:46.199 [S2E:INFO] Configuring for region: EU863 -- 863.0MHz..870.0MHz
2021-09-17 07:23:46.199 [S2E:VERB] DR0 SF12/BW125 
2021-09-17 07:23:46.199 [S2E:VERB] DR1 SF11/BW125 
2021-09-17 07:23:46.199 [S2E:VERB] DR2 SF10/BW125 
2021-09-17 07:23:46.199 [S2E:VERB] DR3 SF9/BW125 
2021-09-17 07:23:46.199 [S2E:VERB] DR4 SF8/BW125 
2021-09-17 07:23:46.199 [S2E:VERB] DR5 SF7/BW125 
2021-09-17 07:23:46.199 [S2E:VERB] DR6 SF7/BW250 
2021-09-17 07:23:46.199 [S2E:VERB] DR7 FSK 
2021-09-17 07:23:46.199 [S2E:VERB] DR8 FSK 
2021-09-17 07:23:46.199 [S2E:VERB] DR9 FSK 
2021-09-17 07:23:46.199 [S2E:VERB] DR10 FSK 
2021-09-17 07:23:46.199 [S2E:VERB] DR11 FSK 
2021-09-17 07:23:46.199 [S2E:VERB] DR12 FSK 
2021-09-17 07:23:46.199 [S2E:VERB] DR13 FSK 
2021-09-17 07:23:46.199 [S2E:VERB] DR14 FSK 
2021-09-17 07:23:46.199 [S2E:VERB] DR15 FSK 
2021-09-17 07:23:46.199 [S2E:VERB] TX power: 16.0 dBm EIRP
2021-09-17 07:23:46.199 [S2E:VERB] 27.0 dBm EIRP for 869.4MHz..869.65MHz
2021-09-17 07:23:46.199 [S2E:VERB] JoinEui list: 0 entries
2021-09-17 07:23:46.199 [S2E:VERB] NetID filter: FFFFFFFF-FFFFFFFF-FFFFFFFF-FFFFFFFF
2021-09-17 07:23:46.199 [S2E:VERB] Dev/test settings: nocca=1 nodc=1 nodwell=1
2021-09-17 07:24:05.109 [SYN:ERRO] Repeated excessive clock drifts between MCU/SX130X#0 (3 retries): 129.5ppm (threshold 100.0ppm)

```

I have tried to execute the reset\_lgw.sh script manually line by line, and the problem seems to be related to the SX1302\_POWER\_EN\_PIN.

The variable definition looks like this:

```auto
SX1302_RESET_PIN=${GW_RESET_GPIO:-17}
SX1302_POWER_EN_PIN=${GW_RESET_GPIO:-18}

```

I have defined GW\_RESET\_GPIO to be 17 through the environment variable, and this also sets SX1302\_POWER\_EN\_PIN to 17 (as per the lines above). When overriding this, setting GW\_POWER\_EN\_PIN to 18, the scripts run without errors.

Is this a bug, or am I overlooking something? 🙂

Kind regards,  
Ketil

---

<div class="post-metadata">

**Author:** ![ketil](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ketil/32/42216_2.png) [@ketil](https://www.thethingsnetwork.org/forum/u/ketil)\
**Post date:** [September 17, 2021, 8:15am UTC](https://www.thethingsnetwork.org/forum/t/rak2287-rpi4-balenacloud-connection-issues/50747/10 "2021-09-17T08:15:07Z")

</div>

I just found [a post](https://www.thethingsnetwork.org/forum/t/experiece-and-solutions-with-the-sx1302-packet-forwarder/37975) from @TonySmith which seems to be of relevance.

Tony writes:

> To get it working with a RAK gateway I had to  
> 1 - Change the Reset pin number from Pin23 to Pin 17 in the file `reset_lgw.sh`  
> **2 - removed the use of the “Power Enable” pin in the same file as the gateway has no enable pin** (my emphasis)

Kind regards,  
Ketil

---

<div class="post-metadata">

**Author:** ![ketil](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ketil/32/42216_2.png) [@ketil](https://www.thethingsnetwork.org/forum/u/ketil)\
**Post date:** [September 17, 2021, 2:10pm UTC](https://www.thethingsnetwork.org/forum/t/rak2287-rpi4-balenacloud-connection-issues/50747/11 "2021-09-17T14:10:23Z")

</div>

Thanks to @TonySmith’s [post mentioned above](https://www.thethingsnetwork.org/forum/t/experiece-and-solutions-with-the-sx1302-packet-forwarder/37975), I was able to get rid of the first error:

`./reset_lgw.sh: 24: echo: echo: I/O error`

The trick was removing power enable-lines from reset\_lgw.sh did, which Tony mentioned in his post. One error is remaining, however:

`ERROR: Failed to stop TX trigger`

Any information about this error would be appreciated. Is it safe to disregard, or will it affect the gateway performance?

Kind regards,  
Ketil

---

<div class="post-metadata">

**Author:** ![vincen](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/vincen/32/45838_2.png) [@vincen](https://www.thethingsnetwork.org/forum/u/vincen)\
**Post date:** [October 4, 2021, 10:07am UTC](https://www.thethingsnetwork.org/forum/t/rak2287-rpi4-balenacloud-connection-issues/50747/12 "2021-10-04T10:07:45Z")

</div>

Sorry for intrusion but is there any benefits to use that setup instead of the default one with raspbian images supplied by RakWireless ? I’m struggling here to get my RAK2287 kit to work and connect at TTN following RakWireless wiki and applying modification they told me to get it to work with TTS instead of TTN ☹  
Thanks
