Skip to main content

LoRaWAN® Gateway Module WM1302

pir

pir

LoRaWAN® is a mark used under license from the LoRa Alliance®. The LoRa® Mark is a trademark of Semtech Corporation or its subsidiaries.

note

We has recently released the Wio-E5 Series based on Wio-E5 module.

Click here to meet new members of the LoRa-E5 family from the Wio-E5 Module Grove module, mini Dev boards to Development Kit.

To learn more on creating a LoRaWAN® End Node with STM32Cube MCU Package for STM32WL series(SDK), to join and to send data to LoRaWAN® Network, read more on wiki pages for mini Dev boards and Development Kit.

WM1302 module is a new generation of LoRaWAN® gateway module with mini-PCIe form-factor. Based on the Semtech® SX1302 baseband LoRaWAN® chip, WM1302 unlocks the greater potential capacity of long-range wireless transmission for gateway products. It features higher sensitivity, less power consumption, and lower operating temperature than the previous SX1301 and SX1308 LoRa® chip.

WM1302 LoRaWAN® gateway module has SPI and USB versions on both US915 and EU868 frequency bands, enable you to have a wide-range of LoRaWAN® frequency plans options to choose including EU868, US915, AS923, AS920, AU915, KR920, and IN865.

WM1302 module is CE, FCC and Telec certified, which helps simplify the development and certification process of the LoRaWAN® gateway devices.

WM1302 is designed for M2M and IoT applications and can be widely applied in LPWAN gateway supported scenarios. It would be a perfect choice for you to significantly reduce the technical difficulties and time-consumption when developing the LoRa® gateway devices, including LoRaWAN® gateway, hotspots, etc.

Features

  • Powered by Semtech® SX1302 baseband LoRa® chip, extremely low power consumption and high performance.
  • Mini-PCIe form factor with the standard 52-pin golden finger, easy to integrate with various gateway devices.
  • Ultra-low operating temperature, no additional heat dissipation needed, reducing the size of LoRaWAN® gateway.
  • High sensitivity down to -139 dBm @SF12 with SX1250 TX/RX front-end; TX power up to 26 dBm @3.3V.
  • Certified with CE, FCC, and TELEC. Simplify the final product certification process.

Harware Overview

Diagram

pir

Pinout

pir

pir


Raspberry Pi Pinout Mapping

40 Pin No.(BOARD#)Raspberry Pi GPIO(BCM#)WM1302 Pi HAT Pinout
13.3VNC
25V5V
3GPIO 2I2C_SDA
45V5V
5GPIO 3I2C_SCL
6GNDGND
7GPIO 4NC
8GPIO 14GPS_RXD
9GNDGND
10GPIO 15GPS_TXD
11GPIO 17SX1302_RESET
SPI version: Active HIGH
USB version: Active LOW
12GPIO 18SX1262_BUSY
13GPIO 27NC
14GNDGND
15GPIO 22NC
16GPIO 23SX1262_DIO1
173.3VNC
18GPIO 24SX1262_DIO2
19GPIO 10SPI_MOSI
20GNDGND
21GPIO 9SPI_MISO
22GPIO 25GPS_RST
23GPIO 11SPI_SCK
24GPIO 8SX1302_CS
25GNDGND
26GPIO 7NC
27GPIO 0I2C_SDA(EEPROM)
28GPIO 1I2C_SCL(EEPROM)
29GPIO 5SX1262_RST
30GNDGND
31GPIO 6SX1262_CS
32GPIO 12GPS_WAKE_UP
33GPIO 13NC
34GNDGND
35GPIO 19NC
36GPIO 16NC
37GPIO 26NC
38GPIO 20NC
39GNDGND
40GPIO 21NC

Specification

RegionEU868US915
Frequency863-870MHz902-928MHz
Sensitivity-125dBm @125K/SF7
-139dBm @125K/SF12
-125dBm @125K/SF7
-139dBm @125K/SF12
TX Power26 dBm (with 3.3V power supply)25 dBm (with 3.3V power supply)
LEDsPower: Green Config: Red TX: Green RX: Blue
Form FactorMini PCIe, 52pin Golden Finger
Power Consumption (SPI version)Standby: 7.5 mA
TX maximum power: 415 mA
RX: 40 mA
Power Consumption (USB version)Standby: 20 mA
TX maximum power: 425 mA
RX: 53 mA
LBT(Listen Before Talk)Support
Antenna ConnectorU.FL
Operating Temperature-40°C to 85°C
Dimensions30 mm (width) × 50.95 mm (length)
CertificationCE

Application

  • LPWAN Gateway devices development

  • Any long-distance wireless communication application development

  • LoRa® and LoRaWAN® application learn and research

Dimension

pir

Getting Started

Difference between SPI version and USB version

For WM1302 LoRaWAN® Gateway Module SPI version, the Semtech SX1302 and SX126x chip are conntected to Raspberry Pi via the same SPI bus with different chip select(CS) pin.

For WM1302 LoRaWAN® Gateway Module USB version, the Semtech SX1302 and SX126x chip are conntected to a STM32L4 MCU, and this factory programmed MCU will work as a USB device, becoming a bridge between Raspberry Pi and SX1302/SX126x.

Quick Start with WM1302

Hardware Required

  • WM1302 LoRaWAN® Gateway Module

  • Raspberry Pi boards with 40-pin GPIO header(e.g. Raspberry Pi 4B or Raspberry 3B+)

  • WM1302 Pi Hat for Raspberry Pi

  • Power Adapter for Raspberry Pi

  • A LoRa® antenna

  • A 8G or larger SD card and a card reader

  • A Type C USB cable if using WM1302 LoRaWAN® Gateway Module USB version

Software Required


Step1. Mounting WM1302 Raspberry Pi Hat and install WM1302 module

Power off Raspberry Pi first, insert WM1302 module to the Pi Hat as the following picture and screw it down.

pir

Step2. Enable the Raspbian I2C and SPI interface

WM1302 module communicates with Raspberry Pi via SPI and I2C interfaces. But these two interfaces are not enabled by default in Raspbian, so developer need to enable them before using WM1302. Here, we introduce a command line way to enable SPI and I2C interface.

First, login in Raspberry Pi via SSH or using a monitor(don't use serial console as the GPS module on the Pi Hat takes over the Pi's hardware UART pins), then type sudo raspi-config in command line to open Rasberry Pi Software Configuration Tool:

sudo raspi-config

pir

  1. Select Interface Options

  2. Select SPI, then select Yes to enable it

  3. Select I2C, then select Yes to enable it

  4. Select Serial Port, then select No for "Would you like a login shell..." and select Yes for "Would you like the serial port hardware..."

  5. After this, please reboot Raspberry Pi to make sure these settings work.

Step3. Get and compile SX1302 source code

Now let's install git and download sx1302_hal(library and programs for SX1302 LoRa Gateway) from github:

sudo apt update
sudo apt install -y git
cd ~
git clone https://github.com/Lora-net/sx1302_hal

Move to sx1302_hal folder and compile everything:

cd ~/sx1302_hal
make

Step4. Run Semtech SX1302 packet forwarder

Copy reset_lgw.sh to packet_forwarder folder, and modify the reset pin for SX1302 and SX1261 in reset_lgw.sh script with text editor nano:

cp tools/reset_lgw.sh packet_forwarder/
cd packet_forwarder
nano tools/reset_lgw.sh

You will see the default reset pin as following:

# GPIO mapping has to be adapted with HW
#

SX1302_RESET_PIN=23 # SX1302 reset
SX1302_POWER_EN_PIN=18 # SX1302 power enable
SX1261_RESET_PIN=22 # SX1261 reset (LBT / Spectral Scan)
AD5338R_RESET_PIN=13 # AD5338R reset (full-duplex CN490 reference design)

Modify the SX1302_RESET_PIN, SX1302_POWER_EN_PIN and SX1261_RESET_PIN as following:

# GPIO mapping has to be adapted with HW
#

SX1302_RESET_PIN=588 # SX1302 reset
SX1302_POWER_EN_PIN=589 # SX1302 power enable
SX1261_RESET_PIN=576 # SX1261 reset (LBT / Spectral Scan)
AD5338R_RESET_PIN=13 # AD5338R reset (full-duplex CN490 reference design)

Save these changes by pressing CTRL + x, followed by y and Enter to close the text editor.


You may also refer to the complete script below:

reset_lgw.sh
#!/bin/sh

# This script is intended to be used on SX1302 CoreCell platform, it performs
# the following actions:
# - export/unpexort GPIO23 and GPIO18 used to reset the SX1302 chip and to enable the LDOs
# - export/unexport GPIO22 used to reset the optional SX1261 radio used for LBT/Spectral Scan
#
# Usage examples:
# ./reset_lgw.sh stop
# ./reset_lgw.sh start

# GPIO mapping has to be adapted with HW
#

SX1302_RESET_PIN=588 # SX1302 reset
SX1302_POWER_EN_PIN=589 # SX1302 power enable
SX1261_RESET_PIN=576 # SX1261 reset (LBT / Spectral Scan)
AD5338R_RESET_PIN=13 # AD5338R reset (full-duplex CN490 reference design)

WAIT_GPIO() {
sleep 0.1
}

init() {
# setup GPIOs
echo "$SX1302_RESET_PIN" > /sys/class/gpio/export; WAIT_GPIO
echo "$SX1261_RESET_PIN" > /sys/class/gpio/export; WAIT_GPIO
echo "$SX1302_POWER_EN_PIN" > /sys/class/gpio/export; WAIT_GPIO
echo "$AD5338R_RESET_PIN" > /sys/class/gpio/export; WAIT_GPIO

# set GPIOs as output
echo "out" > /sys/class/gpio/gpio$SX1302_RESET_PIN/direction; WAIT_GPIO
echo "out" > /sys/class/gpio/gpio$SX1261_RESET_PIN/direction; WAIT_GPIO
echo "out" > /sys/class/gpio/gpio$SX1302_POWER_EN_PIN/direction; WAIT_GPIO
echo "out" > /sys/class/gpio/gpio$AD5338R_RESET_PIN/direction; WAIT_GPIO
}

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
echo "1" > /sys/class/gpio/gpio$SX1302_POWER_EN_PIN/value; WAIT_GPIO

echo "1" > /sys/class/gpio/gpio$SX1302_RESET_PIN/value; WAIT_GPIO
echo "0" > /sys/class/gpio/gpio$SX1302_RESET_PIN/value; WAIT_GPIO

echo "0" > /sys/class/gpio/gpio$SX1261_RESET_PIN/value; WAIT_GPIO
echo "1" > /sys/class/gpio/gpio$SX1261_RESET_PIN/value; WAIT_GPIO

echo "0" > /sys/class/gpio/gpio$AD5338R_RESET_PIN/value; WAIT_GPIO
echo "1" > /sys/class/gpio/gpio$AD5338R_RESET_PIN/value; WAIT_GPIO
}

term() {
# cleanup all GPIOs
if [ -d /sys/class/gpio/gpio$SX1302_RESET_PIN ]
then
echo "$SX1302_RESET_PIN" > /sys/class/gpio/unexport; WAIT_GPIO
fi
if [ -d /sys/class/gpio/gpio$SX1261_RESET_PIN ]
then
echo "$SX1261_RESET_PIN" > /sys/class/gpio/unexport; WAIT_GPIO
fi
if [ -d /sys/class/gpio/gpio$SX1302_POWER_EN_PIN ]
then
echo "$SX1302_POWER_EN_PIN" > /sys/class/gpio/unexport; WAIT_GPIO
fi
if [ -d /sys/class/gpio/gpio$AD5338R_RESET_PIN ]
then
echo "$AD5338R_RESET_PIN" > /sys/class/gpio/unexport; WAIT_GPIO
fi
}

case "$1" in
start)
term # just in case
init
reset
;;
stop)
reset
term
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac

exit 0


Choose your prefered LoRaWAN Network Server server_address and the gateway EUI gateway_ID in the corresponding global_conf.json.sx1250.xxxxx based on the module you are using, and modify the up/down port to 1700. Then run the following code to start the concentrator:

cd ~/sx1302_hal/packet_forwarder

# Please select one of the following comands based on your module
# for WM1302 LoRaWAN Gateway Module (SPI) - EU868
./lora_pkt_fwd -c global_conf.json.sx1250.EU868

# for WM1302 LoRaWAN Gateway Module (SPI) - US915
./lora_pkt_fwd -c global_conf.json.sx1250.US915

Now, packet forwarder are able to run correctly. To successfully forward data to our LoRaWAN Network Server(e.g. TTN or ChripStack), we still need to make some configurations on the server side.

To do that, we need to register the Raspberry Pi Gateway we just build to our LoRa Network Server first. Take TTN as an example, login TTN console, click Gateways button on the left-hand side panel and click Register gateway. Fill the Gateway EUI, Gateway Server address and Frequency plan, leave other options with the default settings.

  • Gateway EUI: A 64 bit unique identifier for your gateway.

  • Gateway Server address: The URL of the cluster on which the network server deployed(eu1.cloud.thethings.network for example).

  • Frequency plan: Configure the corresponding frequency plan based on your region. Europe 863-870 MHz (SF9 for RX2-recommended) for Europe, United States 902-928 MHz, FSB 2 for US.

pir


After successfully registering the gateway, press CTRL + c to stop lora_pkt_fwd, then edit and check the global_conf.json.sx1250.xxxx config file to make sure that the "gateway_ID" and "server_address" entries exactly match the settings in LNS.

    ...
"gateway_conf": {
"gateway_ID": "AA555A0000000000",
/* change with default server address/ports */
"server_address": "eu1.cloud.thethings.network",
"serv_port_up": 1700,
"serv_port_down": 1700,
...

Restart lora_pkt_fwd by using the command ./lora_pkt_fwd -c global_conf.json.sx1250.xxxxx, and you should be able to find your Raspberry Pi Gateway are conntected to TTN.

FAQ

Why my devices can not join the network server even if all the settings are correct?

We have observed that certain modules(WM1302-US915 USB version) may fail to transmit downlink data packets properly due to difference of the hardware. To fix this issue, please modify the value of the macro TX_JIT_DELAY (you can find this macro in /sx1302_hal/packet_forwarder/src/jitqueue.c) from 40000 to 120000 and remake the sx1302_hal.

Sources

Certificates

Tech Support & Product Discussion

Please submit any technical issue into our forum.

Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.

Loading Comments...