SX1276 LoRa module

Posted on
  • Hi,

    Modtronix gave me 2 of their inAIR9 LoRa modules to have a go with a few months ago, and I finally got around to trying them.

    They have a pretty heavy driver for mbed, and a datasheet that feels pretty hard to parse, so it's taken a really long time to get anything going.

    Still, we now have a page and driver for the SX1276 LoRa module. It's pretty beta, but I have managed to send data from one module to another with it.

    At this point, it'd be great if someone else could take a look at tidying it up - but it could be really good for super-long range comms.

  • Awesome stuff! I started working on an espruino driver/module for the LoRaWAN Microchip RN2483 as well (using @DrAzzy 's breakout board). I haven't had time to wrap that up, but I'll try to finish it soon-ish!

  • That'd be great! I've got @DrAzzy's adaptor boards now but no module - and unfortunately I don't think I'm even in range of a base station here :(

  • Hi there,
    I am a very new to javascript still learning but I had a question and I apologize if it's a simple one. What would I like is to practice passing let's say temperate reading or just simple data via UART using the LoRa module as USB modem. Using the wireless temperature sensor tutorial, for example. Instead of using NRF24L01+ module. Would I start by opening a serial connection (http://www.espruino.com/USART)?

  • So you want to forward Serial data over the LoRa radio?

    If so, you'd set up the USART, and then use the SX1272 code from here: http://www.espruino.com/SX127x

    A bit like:

    // LoRa -----------------
    SPI1.setup({ sck:B3, miso:B4, mosi:B5 });
    var sx = require("SX127x").connect({spi: SPI1, cs: B6, rst : B7 });
    var config = {
      rxContinuous : true
    };
    // Until DIO0 line irqs are implemented we need this:
    setInterval(function() { sx.onIRQ(); }, 100);
    
    
    // Serial ---------------------
    Serial1.setup(9600);
    // send data when we receive it
    Serial1.on('data', function(d) {
      sx.setTxConfig(config);
      sx.send(d, function() {
        console.log("TX done");
      });
    });
    

    But the code above is just an example - to do this properly you want to make sure you didn't call sx.send again until its callback had got called.

    Also, I should warn you, the SX127x module hasn't been used a great deal - it's possible that you might hit problems when using it.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

SX1276 LoRa module

Posted by Avatar for Gordon @Gordon

Actions