Giter Site home page Giter Site logo

mauricio-alencar / esp-idf-sx127x Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nopnop2002/esp-idf-sx127x

0.0 0.0 0.0 40 KB

SX1276/77/78/79 Low Power Long Range Transceiver driver for esp-idf

License: MIT License

C++ 9.26% C 85.81% Makefile 1.54% CMake 3.38%

esp-idf-sx127x's Introduction

esp-idf-sx127x

SX1276/77/78/79 Low Power Long Range Transceiver driver for esp-idf.

I based on this.

Changes from the original

  • Added support for ESP32S2, ESP32S3 and ESP32C3.
  • I left the control of CS to the driver.
  • Added a sample of ping-pong.
  • Added some API functions.

Software requirements

esp-idf v4.4/v5.0.

Installation

git clone https://github.com/nopnop2002/esp-idf-sx127x
cd esp-idf-sx127x/basic/
idf.py set-target {esp32/esp32s2/esp32s3/esp32c3}
idf.py menuconfig
idf.py flash

Note for ESP32C3
For some reason, there are development boards that cannot use GPIO06, GPIO08, GPIO09, GPIO19 for SPI clock pins.
According to the ESP32C3 specifications, these pins can also be used as SPI clocks.
I used a raw ESP-C3-13 to verify that these pins could be used as SPI clocks.

Configuration for Transceiver

config-lora-1 config-lora-2

SPI BUS selection

config-lora-3

The ESP32 series has three SPI BUSs.
SPI1_HOST is used for communication with Flash memory.
You can use SPI2_HOST and SPI3_HOST freely.
When you use SDSPI(SD Card via SPI), SDSPI uses SPI2_HOST BUS.
When using this module at the same time as SDSPI or other SPI device using SPI2_HOST, it needs to be changed to SPI3_HOST.
When you don't use SDSPI, both SPI2_HOST and SPI3_HOST will work.
Previously it was called HSPI_HOST / VSPI_HOST, but now it is called SPI2_HOST / SPI3_HOST.

Wirering

SX127X ESP32 ESP32-S2/S3 ESP32-C3
RST -- GPIO16 GPIO38 GPIO8
MISO -- GPIO19 GPIO37 GPIO4
SCK -- GPIO18 GPIO36 GPIO5
MOSI -- GPIO23 GPIO35 GPIO6
NSS -- GPIO15 GPIO34 GPIO7
GND -- GND GND GND
VCC -- 3.3V 3.3V 3.3V

You can change it to any pin using menuconfig.

Communication with SX126X

LoRa's packet format is strictly specified.
Therefore, if the following three parameters are the same, they can communicate with each other.

  • Signal Bandwidth (= BW)
  • Error Cording Rate (= CR)
  • Spreading Factor (= SF)

Reference

https://github.com/nopnop2002/esp-idf-sx126x

esp-idf-sx127x's People

Contributors

nopnop2002 avatar netmonk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.