# How to install a Waveshare SX1302 Hat on a Raspi as Gateway

**URL:** <https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082>\
**Category:** Raspberry Pi Gateways\
**Created:** [February 9, 2022, 9:59am UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082 "2022-02-09T09:59:54Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![derabu1](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/derabu1/32/41112_2.png) [@derabu1](https://www.thethingsnetwork.org/forum/u/derabu1)\
**Post date:** [February 9, 2022, 9:59am UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/1 "2022-02-09T09:59:55Z")

</div>

Hello,  
I am trying to install a sx1302 has on a Raspi 3 using the Wavshare Wiki. When trying with the “./chip\_id” command I get the following message:  
CoreCell reset through GPIO23…  
SX1261 reset through GPIO23…  
CoreCell power enable through GPIO18…  
CoreCell ADC reset through GPIO13…  
Opening SPI communication interface  
ERROR: failed to start the gateway  
Here I don’t get any further, why the gateway can’t start at this point.

Regards Ralph (derabu1)

---

<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:** [February 9, 2022, 12:55pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/2 "2022-02-09T12:55:49Z")

</div>

> [@derabu1](#):
>
> ERROR: failed to start the gateway

7 times out of 10 this is incorrect concentrator reset - logic/timing issue requiring several tries for success or most often reset pin is not correctly mapped/connected…

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [February 9, 2022, 1:52pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/3 "2022-02-09T13:52:06Z")

</div>

And the other 3 times SPI was not enabled using raspi-config.

---

<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:** [February 9, 2022, 2:40pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/4 "2022-02-09T14:40:49Z")

</div>

Yep exactly!, actually 1st category was possibly 6.5 out if 10…the other 1 in 20 is overlap with SPI problem even if correctly enabled with some cards not supporting full speed/timing and needing clock rate to be dialed back! 🤣 the guilty card vendors know who they are… 😉

---

<div class="post-metadata">

**Author:** ![sijtze](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/sijtze/32/35697_2.png) [@sijtze](https://www.thethingsnetwork.org/forum/u/sijtze)\
**Post date:** [October 4, 2022, 7:59pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/5 "2022-10-04T19:59:30Z")

</div>

Or enable I2C in the interface menu Raspi-config that solve my ERROR.

---

<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:** [October 4, 2022, 8:49pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/6 "2022-10-04T20:49:01Z")

</div>

I2C?..or SPI?

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [October 4, 2022, 10:07pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/7 "2022-10-04T22:07:33Z")

</div>

The new sx1302 based concentrator cards require both SPI and I2C.

---

<div class="post-metadata">

**Author:** ![mpittman](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/mpittman/32/35697_2.png) [@mpittman](https://www.thethingsnetwork.org/forum/u/mpittman)\
**Post date:** [October 5, 2022, 3:51pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/8 "2022-10-05T15:51:27Z")

</div>

I been having the same issue on [SX1302CSS915GW1](https://www.semtech.com/products/wireless-rf/lora-core/sx1302cssxxxgw1) dev kit from Semtech. I’ve ensured SPI and I2C are enabled several times. Can confirm they exist in /dev. I’ve also remapped the GPIO pins in 'reset\_lgw.sh" to match what it appears they should be based on the board [schematic](https://semtech.my.salesforce.com/sfc/p/#E0000000JelG/a/2R000000UhZD/Yfe8ltRCbeEofCnGdwWHsSQ4wVh6EiNa_CXb3N.DixI).

I can get most things to work via USB, but nothing seems to work with SPI.

Using USB (./chip\_id -u -d /dev/ttyACM0), I get this:

```auto
        Opening USB communication interface
        INFO: Configuring TTY
        INFO: Flushing TTY
        INFO: Setting TTY in blocking mode
        INFO: Connect to MCU
        INFO: Concentrator MCU version is V01.00.00
        INFO: MCU status: sys_time:10826747 temperature:25.3oC
        Note: chip version is 0x10 (v1.0)
        INFO: using legacy timestamp
        ARB: dual demodulation disabled for all SF
        
        INFO: concentrator EUI: 0x00xxxxxxxxxxxxxxx
        
        Closing USB communication interface

```

Using SPI(./chip\_id -d /dev/spidev0.0), I get this:

```auto
        CoreCell reset through GPIO4...
        SX1261 reset through GPIO3...
        CoreCell power enable through GPIO1...
        CoreCell ADC reset through GPIO24...
        Opening SPI communication interface
        Note: chip version is 0x00 (v0.0)
        ERROR: Failed to set SX1250_0 in STANDBY_RC mode
        ERROR: failed to setup radio 0
        ERROR: failed to start the gateway

```

---

<div class="post-metadata">

**Author:** ![nr092921](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/nr092921/32/35697_2.png) [@nr092921](https://www.thethingsnetwork.org/forum/u/nr092921)\
**Post date:** [October 27, 2022, 12:40pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/9 "2022-10-27T12:40:46Z")

</div>

Hi @mpittman ,  
the Spectral Scan dev kit from Semtech has only USB support as they did not load the resistors for the SPI - PCI interface connection.

---

<div class="post-metadata">

**Author:** ![mpittman](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/mpittman/32/35697_2.png) [@mpittman](https://www.thethingsnetwork.org/forum/u/mpittman)\
**Post date:** [October 27, 2022, 12:55pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/10 "2022-10-27T12:55:37Z")

</div>

Yes thanks. I finally figured that out after lots of head scratching. 😀

---

<div class="post-metadata">

**Author:** ![mr\_dean](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mr\_dean](https://www.thethingsnetwork.org/forum/u/mr_dean)\
**Post date:** [April 15, 2023, 6:56pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/11 "2023-04-15T18:56:46Z")

</div>

@mpittman What did you do to get it working ? I’m currently facing t  
he same issue.

---

<div class="post-metadata">

**Author:** ![jreiss](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jreiss/32/46529_2.png) [@jreiss](https://www.thethingsnetwork.org/forum/u/jreiss)\
**Post date:** [April 16, 2023, 1:46am UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/12 "2023-04-16T01:46:15Z")

</div>

You have the same problem that the USB card only works over USB and the SPI card only over SPI?

---

<div class="post-metadata">

**Author:** ![mr\_dean](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mr\_dean](https://www.thethingsnetwork.org/forum/u/mr_dean)\
**Post date:** [April 16, 2023, 6:54pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/13 "2023-04-16T18:54:28Z")

</div>

@jreiss Below are the error logs I was talking about. What possibly could be the cause ? and how do I resolve it ?

```auto
CoreCell reset through GPIO23...
SX1261 reset through GPIO23...
CoreCell power enable through GPIO18...
CoreCell ADC reset through GPIO13...
Opening SPI communication interface
Note: chip version is 0x00 (v0.0)
ERROR: Failed to set SX1250_0 in STANDBY_RC mode
ERROR: failed to setup radio 0
ERROR: failed to start the gateway

```

---

<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 16, 2023, 7:05pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/14 "2023-04-16T19:05:10Z")

</div>

> [@mr\_dean](#):
>
> and how do I resolve it ?

Answer the question asked of you?

> [@jreiss](#):
>
> **You have the same problem that the USB card only works over USB and the SPI card only over SPI?**

Or to put it another way, which model do you have?

---

<div class="post-metadata">

**Author:** ![mr\_dean](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mr\_dean](https://www.thethingsnetwork.org/forum/u/mr_dean)\
**Post date:** [April 16, 2023, 7:11pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/15 "2023-04-16T19:11:15Z")

</div>

It’s sx1302-hat-waveshare ([https://www.waveshare.com/wiki/SX1302\_LoRaWAN\_Gateway\_HAT](https://www.waveshare.com/wiki/SX1302_LoRaWAN_Gateway_HAT)). I have enabled both spi and i2c. I hope this answers your question.

---

<div class="post-metadata">

**Author:** ![jreiss](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jreiss/32/46529_2.png) [@jreiss](https://www.thethingsnetwork.org/forum/u/jreiss)\
**Post date:** [April 16, 2023, 8:34pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/16 "2023-04-16T20:34:58Z")

</div>

D18 and D23 look to be correct and default in reset\_gw.sh. But D18 is not labeled in the pinout diagram. D22 isn’t shown either bit is for CN version.

Have you reached out to waveshare support?  
[https://support.waveshare.com/hc/en-us/requests/new](https://support.waveshare.com/hc/en-us/requests/new)

---

<div class="post-metadata">

**Author:** ![mpittman](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/mpittman/32/35697_2.png) [@mpittman](https://www.thethingsnetwork.org/forum/u/mpittman)\
**Post date:** [April 17, 2023, 1:23pm UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/17 "2023-04-17T13:23:21Z")

</div>

In my case, the SPI bus is not physically connected on the dev board. So even though I was enabling it and configuring it correctly, the SPI pins were not connected (resistors not installed on board).

Your board is different but I would check the schematic if there is one.

---

<div class="post-metadata">

**Author:** ![vilbergs](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/vilbergs/32/44616_2.png) [@vilbergs](https://www.thethingsnetwork.org/forum/u/vilbergs)\
**Post date:** [July 24, 2023, 6:09am UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/18 "2023-07-24T06:09:57Z")

</div>

I struggled with this for hours on end. Turns out I had to really push the concentrator really hard into the PCI slot on the HAT board, and then finally the scripts worked.

I found this in the Waveshare FAQ which lead me to try this (as well as being out of options)

> “Considering the gold finger contact is poorly caused, please press down the tail and then access the test, so that the module and module good fit.”  
> [https://www.waveshare.com/wiki/SX1302\_LoRaWAN\_Gateway\_HAT#FAQ](https://www.waveshare.com/wiki/SX1302_LoRaWAN_Gateway_HAT#FAQ)

---

<div class="post-metadata">

**Author:** ![vilbergs](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/vilbergs/32/44616_2.png) [@vilbergs](https://www.thethingsnetwork.org/forum/u/vilbergs)\
**Post date:** [July 24, 2023, 6:11am UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/19 "2023-07-24T06:11:30Z")

</div>

PS: I take no responsibility for anyone’s hardware, please be careful.

---

<div class="post-metadata">

**Author:** ![lynxan](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/l/7ea924/32.png) [@lynxan](https://www.thethingsnetwork.org/forum/u/lynxan)\
**Post date:** [August 17, 2023, 7:52am UTC](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082/20 "2023-08-17T07:52:59Z")

</div>

I have the same problem, did you manage to solve it?

[Next page](https://www.thethingsnetwork.org/forum/t/how-to-install-a-waveshare-sx1302-hat-on-a-raspi-as-gateway/55082.md?page=2)
