Code Monkey home page Code Monkey logo

sx126x's Introduction

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

sx126x's People

Contributors

tinytronix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sx126x's Issues

More bugs

Using pow() in a define just to calc a static value seems a little ott.
I notice the original also does it, but calibrating the frequency fails for me unless I set the freq first.

Couple of code errors

SX126x.cpp
Line 70, ldro is not initialized.
Line 728, timeoutInMs * 0,015625 - should be "0.015625"

Arduino IDE: COM port is not available.

Hi,

I am using your library in my custom board which has SX1262 chip and SAMD51 MCU on it and compiled the LoRA_TX example code. But i got the error COM port isnt available.

Any clue why is like that by using this library?

Thanks,
Akshay

'SX126x' does not name a type

Hi,

I am trying to use this library and while compiling, I am getting this error <'SX126x' does not name a type>? Library is included in the .ino file. Does anyone have any clue why is it coming like that?

Thanks,
Akshay

RadioLib license

Hello,

First of all, I want to say that your home automation LoRa gateways (as well as all the other home autmation devices) look really cool!

That being said, in your SX126X library, you have obviously used large portions of RadioLib code, which is developed by me. I don't intend to discourage people from doing that - quite the contrary, adapting code written by other people is one of the core ideas of open source development.

However, RadioLib MIT License explicitly states that:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

This is usually understood as including the original copyright holder's name in the appropriate section of the software. Would it be possible to add this copyright notice, as to comply with RadioLib license?

Thank you very much.

incompatible with SX1262

library initializes but does not attempt to transmit or receive data on sx1262 chip in DRF1262TL (busy pin and DIO1 show no activity after boot). spent over a week trying to diagnose but gave up and used a different creators library, the new library is four times the size and memory requirements but works fine.

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.