Git Product home page Git Product logo

craigpeacock / rn2903-demo Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 0.0 529 KB

This example shows how to run your own code on the RN2903 LoRaWAN Module, eliminating the requirement for a 2nd microcontroller

Home Page: https://www.beyondlogic.org/rn2903-using-the-lorawan-library-plug-in-for-mplab-code-configurator-and-customising-for-the-au915-frequency-plan/

Makefile 0.60% C 99.40%
lorawan rn2903 au915 helium ttn-device thethingsnetwork pic18f

rn2903-demo's Introduction

RN2903-Demo

Source code for the Microchip RN2903 Module.

Microchip RN2903 LoRa Breakout Board

This example shows how to run your own code on the RN2903 LoRaWAN Module, eliminating the requirement for a 2nd microcontroller. This code interrogates a Sensirion SHTC3 Temperature and Humidity Sensor every 10 minutes and sends the data to a LoRaWAN Network - tested with The Things Network & Helium.

The RN2903 Module includes a:

This is a demo project using the Microchip LoRaWAN Library Stack on the RN2903A Module. For more information, please visit:

Frequency Band

This code is set-up for the AU915 Frequency Plan.

Channels 8 to 15 (Sub Band 2) are enabled for use with The Things Network or Helium.

March 2022 Update

While Microchip has never updated the LoRaWAN Library in MPLAB Code Configurator (MCC), recently they released the source code for the 'UART Modules' and this uses the same stack. We have copied/updated to the mature stack that is running on the RN2903 SA AU915 v1.0.3 modules.

Please note the project requires the XC8 V1.45 Cross Compiler. Using V2.x of the compiler appears to result in timing issues, i.e. the Receive Window 1 and 2 can be either increased four fold, or fails to operate at all.

The Things Network

Below is Javascript for the Payload Formatter for use on The Things Network

function decodeUplink(input) {
	var data = {};
	var temp_raw = (input.bytes[1] << 8) + input.bytes[0];
	var humd_raw = (input.bytes[3] << 8) + input.bytes[2];
	data.temp = -45 + 175 * (temp_raw / 65536);
	data.RH = 100 * (humd_raw / 65536);
  	return {
      	data: data,
  	};
}

Helium Network

Example session operating on the Helium Network:

RN2903 Test Program
Beyondlogic.org
Channel 08 Enabled: 916800000Hz
Channel 09 Enabled: 917000000Hz
Channel 10 Enabled: 917200000Hz
Channel 11 Enabled: 917400000Hz
Channel 12 Enabled: 917600000Hz
Channel 13 Enabled: 917800000Hz
Channel 14 Enabled: 918000000Hz
Channel 15 Enabled: 918200000Hz
Channel 65 Enabled: 917500000Hz
Join Response Successful
Sent message
Packet Received, 0 bytes, status = 1
Sent message
Packet Received, 0 bytes, status = 1
Sent message
Packet Received, 0 bytes, status = 1
Sent message
Packet Received, 0 bytes, status = 1

Helium Console:

Helium Device Console

rn2903-demo's People

Contributors

craigpeacock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

rn2903-demo's Issues

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.