esp-idf driver for SX1276
Find a file
2020-02-22 08:34:26 -08:00
include include DIO0 mode for CAD 2020-02-22 08:33:50 -08:00
main change SPI read/write log message to VERBOSE 2020-02-22 08:34:26 -08:00
test large changeset 2020-02-20 22:05:24 -08:00
.gitlab-ci.yml might help some native module issues 2018-08-05 18:09:07 -07:00
component.mk initial commit.... after 6 months 2018-07-28 11:33:15 -07:00
Kconfig default lora to enabled 2018-07-28 13:43:05 -07:00
Makefile initial commit.... after 6 months 2018-07-28 11:33:15 -07:00
package.json move to esptool-wrapper for flashing esp devices 2018-08-10 10:10:27 -07:00
README.md remove stale code, parse_packet wasn't used (or useful?) 2020-02-20 22:25:58 -08:00

ESP32 LoRa (SX127*)

Provides SPI driver for SX1276/SX1278 LoRa radio

Install

Designed to be used as esp-idf component. Suggested using as git submodule

git submodule add https://gitlab.com/morganrallen/esp32-lora.git components/esp32-lora/
git submodule init
git submodule update

Configure

Uses built in KConfig. Run make menuconfig and find config under Component config -> LORA32. Defaults targeted to TTGO LoRa OLED boards.

Use

This is the most basic usage. Setting up the LoRa instance, setting it's receive handler, running init then sending a message.

  lora32_cfg_t lora;
  lora = lora32_create();
  lora.receive = &handle_lora_receive;

  lora32_init(&lora);

  lora32_send(&lora, "Hello, LoRa", 11);

API

lora32_cfg_t static lora32_create()

Creates a new LoRa instance

uint8_t lora32_init(lora32_cfg_t *config)

Initialized LoRa instance. This configures GPIOs, SPI, LoRa radio and receive handlers

Returns 1 on success.

uint8_t lora32_data_available(lora32_cfg_t *lora)

Indicates if data is presently available.

void lora32_send(lora32_cfg_t *config, uint8_t *data, uint8_t len)

Transmits data over the LoRa radio.

void lora32_set_spreadfactor(lora32_cfg_t *lora, uint8_t factor)

Sets LoRa Spread Factor.

Accepts 6-12.

void lora32_dump_regs(lora32_cfg_t *lora)

Dumps all registers from SX1276