Skip to content

An Arduino Library for LoRa Communication using DRF1268T or DRF1262T (based upon Semtech SX1268 or SX1262)

License

Notifications You must be signed in to change notification settings

tinytronix/SX126x

Repository files navigation

SX126x

This is an Arduino library for LoRa Communication using the radio transceiver chips SX1268 and SX1262. I developed it because I want to extend my bunch of homeautomation devices. to be able to speak LoRa.

Most of the hardware driver software is taken from RadioLib a universal wireless communication library for Arduino (great project!) and slightly adapted.

Installing

Download this repo as zip. Then in the Arduino IDE go to Sketch->Add library->add .zip library. Or please refer to the offical Arduino howto.

First Steps

The first place to start may be the examples folder. There is a simple rx tx example which sends data (TX) and echos them back (rx).

Hardware compatibility

This library was tested with LoRa module DRF1268T and works with the provided schematic. It is as well usable for DRF1262T. Please see the schematic for wiring. The library should be able to handle other LoRa modules as long as they use the SX1262 or SX1268. In this case take a look at the DRF1268T datasheet and check if DIO1, DIO2 and DIO3 are wired to different IO-Pins. You can easily change the used IO-Pins when calling the constructor.

FAQ

Q: Why is the SW pin not supported by this library?
A: Currently (in my hardware setup) the SW Pin is connected to 3,3V permanently, so RF is always on. In one of the next versions it might be a good idea to add a 5th parameter to the constructor (bool true/false) in order to let the SX126x DIO2 output control the RF switch. 5th Param TRUE: DIO2 switches RF, 5th Param FALSE: RF controlled externally. See SX126x datasheet, section "SetDio2AsRfSwitchCtrl" for details.

Q: Does the lib support interrupts?
A: No. Sending and receiving data will be handled in the arduino main loop.

Q: Does the lib support LoRaWAN?
A: It is a bare metal driver library for SX126x chipset and implements clean LoRa data send and receive functons according to the OSI reference model. Therefore any LoRaWAN library may use this hardware driver library.

Q: Is FSK Mode available.
A: The SX126x chip implements FSK but it is not supported by this driver library.

Hardware

Here is my homeautomation gateway running with this Adruino driver library and my peer-to-peer LoRa communication protocol: lt

About

An Arduino Library for LoRa Communication using DRF1268T or DRF1262T (based upon Semtech SX1268 or SX1262)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages