Skip to content

Commit 9ca0775

Browse files
committed
Update README.md to contain instructions for Waveshare Pico-LoRa-SX1262-868M
1 parent 6f12772 commit 9ca0775

File tree

1 file changed

+62
-1
lines changed

1 file changed

+62
-1
lines changed

README.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# pico-lorawan
2-
Enable LoRaWAN communications on your [Raspberry Pi Pico](https://www.raspberrypi.org/products/raspberry-pi-pico/) or any RP2040 based board using a [Semtech SX1276 radio module](https://www.semtech.com/apps/product.php?pn=SX1276).
2+
Enable LoRaWAN communications on your [Raspberry Pi Pico](https://www.raspberrypi.org/products/raspberry-pi-pico/) or any RP2040 based board using a [Semtech SX1276 radio module](https://www.semtech.com/apps/product.php?pn=SX1276) or [Waveshare's SX1262-based LoRaWAN module](https://www.waveshare.com/wiki/Pico-LoRa-SX1262-868M).
33

44
Based on the Semtech's [LoRaWAN end-device stack implementation and example projects](https://github.com/Lora-net/LoRaMac-node).
55

@@ -11,9 +11,13 @@ Based on the Semtech's [LoRaWAN end-device stack implementation and example proj
1111
* Semtech SX1276 board
1212
* [Adafruit RFM95W LoRa Radio Transceiver Breakout - 868 or 915 MHz - RadioFruit](https://www.adafruit.com/product/3072)
1313
* [Adafruit LoRa Radio FeatherWing - RFM95W 900 MHz - RadioFruit](https://www.adafruit.com/product/3231)
14+
* Semtech SX1262 board
15+
* [Waveshare Pico-LoRa-SX1262-868M](https://www.waveshare.com/wiki/Pico-LoRa-SX1262-868M) | [Shop](https://www.waveshare.com/pico-lora-sx1262-868m.htm)
1416

1517
### Default Pinout
1618

19+
Default Pinout for Semtech SX1276:
20+
1721
| Raspberry Pi Pico / RP2040 | Semtech SX1276 |
1822
| ----------------- | -------------- |
1923
| 3.3V | VCC |
@@ -26,8 +30,63 @@ Based on the Semtech's [LoRaWAN end-device stack implementation and example proj
2630
| GPIO 9 | RESET |
2731
| GPIO 10 | DIO1 / G1 |
2832

33+
Default Pinout for Semtech SX1262 on Waveshare Pico-LoRa-SX1262-868M:
34+
35+
| Raspberry Pi Pico / RP2040 | Waveshare Pico-LoRa-SX1262-868M |
36+
| ----------------- | -------------- |
37+
| 3.3V | VCC |
38+
| GND | GND |
39+
| GPIO 10 | SCK |
40+
| GPIO 11 | MOSI |
41+
| GPIO 12 | MISO |
42+
| GPIO 3 | NSS / CS |
43+
| GPIO 15 | RESET |
44+
| GPIO 20 | DIO1 |
45+
| GPIO 2 | BUSY |
46+
2947
GPIO pins are configurable in examples or API.
3048

49+
## Enabling support for Waveshare Pico-LoRa-SX1262-868M
50+
51+
By default this library only supports the Semtech SX1276 boards mentioned in the first section. Support for Waveshare's SX1262-based Raspberry Pi Pico Hat is available, but needs to be enabled actively.
52+
53+
Take the following steps to switch from SX1276 to Waveshare SX1262 support:
54+
55+
Uncomment
56+
57+
```
58+
set(WITH_WAVESHARE_SX126X ON)
59+
```
60+
61+
in `CMakeLists.txt`.
62+
63+
In your example application, e.g. otaa_temperature_led/ set the region to EU868 in `config.h`:
64+
65+
```
66+
#define LORAWAN_REGION LORAMAC_REGION_EU868
67+
```
68+
69+
_(and also provide your Device EUI, App EUI and App Key here!)_
70+
71+
In the example application's `main.c` make sure that you're using the proper `sx12xx_settings` for your SX1262 Waveshare module:
72+
73+
```
74+
const struct lorawan_sx12xx_settings sx12xx_settings = {
75+
.spi = {
76+
.inst = spi1,
77+
.mosi = 11,
78+
.miso = 12,
79+
.sck = 10,
80+
.nss = 3
81+
},
82+
.reset = 15,
83+
.busy = 2,
84+
.dio1 = 20
85+
};
86+
```
87+
88+
_**There is no guarantee that other SX1262-based boards will work. Tests have only been run using Waveshare's board.**_
89+
3190
## Examples
3291

3392
See [examples](examples/) folder.
@@ -60,5 +119,7 @@ make
60119

61120
A big thanks to [Alasdair Allan](https://github.com/aallan) for his initial testing of EU868 support!
62121

122+
Thanks to Waveshare and [siuwahzhong](https://github.com/siuwahzhong) for providing their modified version of this library. Parts of their work have been merged back into this library by [Thomas Leister](https://github.com/ThomasLeister). Original source: [ZIP](https://www.waveshare.com/w/upload/0/08/Pico-LoRa-SX1262-868M_Code.zip) | [GitHub](https://github.com/siuwahzhong/lorawan-library-for-pico)
123+
63124
This project was created on behalf of the [Arm Software Developers](https://developer.arm.com/) team, follow them on Twitter: [@ArmSoftwareDev](https://twitter.com/armsoftwaredev) and YouTube: [Arm Software Developers](https://www.youtube.com/channel/UCHUAckhCfRom2EHDGxwhfOg) for more resources!
64125

0 commit comments

Comments
 (0)