Giter Club home page Giter Club logo

sx127x-netcore's Introduction

SX127X.NetCore

A C# library for LoRaLoRaAlliance connectivity for Semtech SX127X equipped shields on .Net Core 5 powered devices. The initial versions of the code will developed on a Raspberry PI but I will also look at other supported Single Board Computers(SBCs).

The repo has the source code for the series of blog posts written as I built this library

  1. dotNET Core 5 Raspberry PI SPI
  2. TransferFullDuplex vs. ReadWrite
  3. Register Reading and Writing
  4. Transmit Basic
  5. Receive Basic
  6. Receive and Transmit with Interrupts
  7. Enumerations, Constants and Masks
  8. Arduino-LoRa LoRaSetSyncWord example
  9. Arduino-LoRa LoRaSetSpread example

The library is built using the dotnet/iot library which enables access to General Purpose Input/Output(GPIO), Serial Peripheral Interface(SPI), Inter-Integrated Circuit(I2C) and Universal asynchronous receiver-transmitter(UART) pins.

SX127XLoRaDevice - the library source code

SX127XLoRaDeviceClient- Illustrates how to use the library and the conditional compile options for supported pHats

There are also a parallel development projects which are documented seperately

nanoFramework

TinyCLROSV2

Wilderness Labs Meadow

Windows 10 IoT Core

My main use case for the Library is a telemetery protocol translation field gateway(working on identity translation) uploading data from a number of remote devices.

Shield from Dragino

LoRa GPS HAT for Raspberry Pi

Shield from Elecrow

Lora RFM95 IOT Board for RPI

Shield from M2M

1 Channel LoRaWan Gateway Shield for Raspberry Pi

RPIZero Shield from Uputronics

Raspberry PiZero LoRa(TM) Expansion Board

RPIPlus Shield from Uputronics

Raspberry Pi+ LoRa(TM) Expansion Board

LoRa Radio Bonnet from Adafruit

Adafruit LoRa(TM)Radio Bonnet with OLED

sx127x-netcore's People

Contributors

kiwibryn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

sx127x-netcore's Issues

Contact

Thanks again for your help the other day, I was wondering if you have small amount of time to discuss some issues via Email or Skype.

Just to frame what is possible with this library you have created.

Interaction with Lora-Soil Moisture Sensor

Thanks again for the great work on this library.

I have a device that transmits with the following settings :
https://github.com/Makerfabs/Lora-Soil-Moisture-Sensor/tree/master/V3/firmware/Moisture_LowPower_RadioLib_v2.1

#define FREQUENCY 915.0
#define BANDWIDTH 125.0
#define SPREADING_FACTOR 9
#define CODING_RATE 7
#define OUTPUT_POWER 10
#define PREAMBLE_LEN 8
#define GAIN 0

I'm trying to receive these message in my Pi LoRa Hat that seems to work for the other LoRa device I have.

I'm using

        sX127XDevice.Initialise(SX127XDevice.RegOpModeMode.ReceiveContinuous, 
            frequency: Frequency,
            bandwidth: SX127XDevice.RegModemConfigBandwidth._125KHz,
            codingRate: SX127XDevice.RegModemConfigCodingRate._4of7,
            spreadingFactor: SX127XDevice.RegModemConfig2SpreadingFactor._128ChipsPerSymbol,
            lnaGain: 0,
            preambleLength: 8,
            syncWord: 0x12,
            powerAmplifier: SX127XDevice.PowerAmplifier.PABoost, 
            rxPayloadCrcOn: true, 
            rxDoneignoreIfCrcMissing: false
            );

Can seem to see whats wrong.

Cannot receive anything, Transmission seems ok.

Hi,

I have successuly used your amazingly cool library to transmit some Lora messages to a test receiver. I used yoor demo SX127X Client example.

I cannot however get anything to recieve. Even the demo app could not recieve its own messages. I tried to separate out the code and came up with the following :

class Program
{

    private readonly static SX127XDevice sX127XDevice = new SX127XDevice(SX127XDevice.ChipSelectLine.CS1, interuptLogicalPinNumber: 4, chipSelectLogicalPinNumber: 25, resetLogicalPinNumber: 17);

    static void Main()
    {
        sX127XDevice.Initialise(SX127XDevice.RegOpModeMode.ReceiveContinuous,  915000000.0, powerAmplifier: SX127XDevice.PowerAmplifier.PABoost);

        // Put device into LoRa + Sleep mode
        sX127XDevice.WriteByte(0x01, 0b10000000); // RegOpMode 

        Thread.Sleep(5000);

        sX127XDevice.OnReceive += SX127XDevice_OnReceive;
                  

			while (true)
			{
                Console.WriteLine("Listening...");

        		sX127XDevice.Receive(); 

                Thread.Sleep(10000);
            }
    }

    private static void SX127XDevice_OnReceive(object sender, SX127XDevice.OnDataReceivedEventArgs e)
    {
			Console.WriteLine("!!Receive!!");
			Console.WriteLine(e.Data);
    }

However I cannot receieve anything from my demo Trasmitter, an Arduino Uno.

Cheers

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.