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

I2C?..or SPI?

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

4 Likes

I been having the same issue on SX1302CSS915GW1 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.

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:

        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:

        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

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.

1 Like

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

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

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

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

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

Answer the question asked of you?

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

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

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

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.

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

1 Like

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

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

i enable spi and it fixed my issue immediately.

Hello,

I am trying to configure sx1302 lorahat on a Rpi as gateway. Currently I am facing the following issue.

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: [main] failed to start the concentrator

I have followed the following web links

https://community.element14.com/technologies/internet-of-things/b/blog/posts/set-up-elecrow-ttn-lorawan-gateway-on-raspberry-pi

My spi is enable
I have also tried changing the reset pin in reset_lgw.sh

Even tried pressing the connector, nothing has worked.

Not sure how to fix it. Any help is appreciated, thanks.

I see though you have a Waveshare Conc bd you are also linking to Elecrow instaltion guide(s)…be aware that though there are many mPCIe f/f boards out in the market many have slightly different configurations and minor changes to the connector pin-out (Elecrow, Waveshare, RAK, Seeed, etc…). Some have an additional SX12xx transceiver on board (to support LBT etc.) others dont and reset pins may vary, so be absolutely sure which version and pin out you have and use matching s/w config… Havent yet looked at specific differences for this pair myself (future project) but worth you checking…and perhaps report back here what you find.

Thanks for the response! will check the pin configuration and revert back. Thanks again!

So i also have G-nicerf lorawan 1302 module with pi 3 b+ and im using the sx1302_hal github repo to find the uid and ./test_loragw_com and ./test_loragw_sx1250 but unable to get the output and getting same errors like :-
Opening SPI communication interface
Note: chip version is 0x05 (v0.5)
ERROR: Failed to set SX1250_0 in STANDBY_RC mode
ERROR: failed to setup radio 0
ERROR: [main] failed to start the concentrator

Im working over raspberry os, Guidance will be appreciated alot

P.s :- I have also tried to change reset_lgw.sh pin from 23 to 17 and also tried to open both i2c and spi but no response im getting.