Waveshare SX1302 LoRaWAN Gateway Pi HAT + Module Issues

Hi,

Ive just purchased a SX1303 915M LoRaWAN Gateway Module+HAT for Raspberry Pi and trying to get it up and running. Im having an issue with either Pin configuration, or a faulty product and would appreciate some assistance. Im following the guide here: SX1302 LoRaWAN Gateway HAT - Waveshare Wiki as well as every other piece of information that sounds even vaguely related.

When i run the ./chip_id which in turn kicks off reset_lgw.sh - i get the following:

CoreCell reset through GPIO23…
SX1261 reset through GPIO17…
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

Two things stand out here, the chip version, and the GPIO Pin configuration. Most posts ive seen with a similar error indicate the reset script is initialise the wrong pins. Your page and Waveshares have slightly different diagrams, so im really not sure.

Any help on this would be appreciated.

Hi Chris,

I’ve had a look through the pinouts on our site and the documentation on Waveshare’s wiki and I think I might have a lead on what those discrepancies are caused by.

Waveshare make both an SX1302 and SX1303 version of this device, both in a module and HAT form factor. Since there are something like 8 versions of the device all up with slightly different firmware they all refer back to the same product wiki for documentation.

I think the installation instructions may have been provided for the SX1302 version of the product, without the explicit instructions to install a different library to suit the different pinout of the SX1303 version of the hardware.
Looking at the github it does say this Hardware Abstraction Layer library does suit both the SX1302 and SX1303 chipsets, but since our physical hardware is using different pinouts between different module versions I’d say something in the pin mapping has gone wrong.

EDIT: Before we go too deep down the rabbit hole here can you please shoot us a photo of your setup and confirm for me how you went with the sign up to TTN and login step just before the ./chip_id step which has generated the error message you’re getting?

1 Like

Thanks Trent,

I tend to agree. Would you like pics of the physical setup? If so thats easy but simply the Raspberry Pi 4 4GB (CE06426) and the Waveshare HAT/Module.

The TTN part isnt influencing any of the setup that’s failing, as i cannot even get the EUI for the LNS configuration. However, I wont be using TTN i’ll be using AWS IoT Core for LoRaWAN.

You can see a lot of folks run into similar issues using the RAK setup, and their fixes are around the Pin configuration in the reset script. Ive adjusted that script to a couple of potential variations, but not had any positive outcome as yet. The wiki on Waveshare that your product page links to is missing something as it doesnt have RESET for the SX126x

Hi Trent,

Any word on the Pinout config to get this hardware working with the SX1303?

Hi Chris,

A quick photo of your setup I think it worth the time, just so we can have a second set of fresh eyes look over it.
Ideally we can catch a small simple issue or rule those out before we explore some more complex fault possibilities.

Hi,
I’ve also just bought the SX1303 915M LoRaWAN Gateway Module+HAT for Raspberry Pi and am having exactly the same problem. The physical set up is just the whole kit connected to a RPi4 with ethernet and power. Not sure where to go with this now.

1 Like

Hi Jon,

Could you send some screenshots of your terminal so we can get a feel for what you are doing and where the errors are? As well as some info as to the setup steps you followed?

If nobody is able to assist on this one I’ll have some time on Thursday to sit down and replicate your setup to see how far I can get.

Good Morning,

Thanks for agreeing to help me out with this project, very keen to get the LoRa Gateway working for other project and other users.

Set up is the above kit put on a Raspberry Pi 4 (8G) with an ethernet connection. see picture


I followed the link on your web site to https://www.waveshare.com/wiki/SX1302_LoRaWAN_Gateway_HAT and ran the following commands;


sudo apt update
sudo apt install git
cd ~/Documents/
git clone https://github.com/Lora-net/sx1302_hal.git
cd sx1302_hal
make clean all
make all
cp tools/reset_lgw.sh util_chip_id/
cp tools/reset_lgw.sh packet_forwarder/

all worked OK

then ran the following to get the sx1302 EUI to register it as a gateway;


# get sx1302 EUI
cd ~/Documents/sx1302_hal/util_chip_id/
./chip_id 

and got this output -

jon@raspberrypi:~/Documents/sx1302_hal/util_chip_id $ ./chip_id
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

I notice this is the same out as someone else got in the forum but not quite sure what the solution was. Any help much appreciated.

Kind Regards,

Jon Potter

Hi @Jon208648 - just as a sanity check: do you have the SPI peripheral enabled for the RPi?
Access this through the Raspberry Pi Configuration menu from the desktop or;

If you are using a terminal, you will need to:

  1. Run sudo raspi-config.
  2. Use the down arrow to select 5 Interfacing Options
  3. Arrow down to P4 SPI.
  4. Select yes when it asks you to enable SPI,
  5. Also select yes if it asks about automatically loading the kernel module.
  6. Use the right arrow to select the <Finish> button.
  7. Select yes when it asks to reboot.

image

1 Like

Hi Michael,

Yes, SPI interface enabled - same result unfortunately.

Regards,

Jon

1 Like

@Jon208648 after a little research I found this thread where the same problem resolved just by applying a little pressure to the connector / reseating the module in the connector.

I belive this is what the user is referring to when they say “PCI Concentrator” (PCI Connector?)

1 Like

Hey Thanks - that worked would you believe ! (you have to press quite hard…)
Difficult to diagnose as there are actually lights on the unit so you would think it connected OK.

So I now have my EUI, I’ll continue through getting the gateway registered and on-line
I found AU915FSB1.zip which I’ll need to use.

Kind Regards,

Jon

3 Likes

UNREAL! :smiley:
That must have been a frustrating problem to have for so long - but I’m glad it’s open and closed on the same day and you are back on track working on your project. Keep us updated :smiley:

2 Likes