Coder Social home page Coder Social logo

lorauart's Introduction

LoRaUART

Arduino library for communication to LoRa module via UART

General convention used in commands of LoRa network

  • Every command and response through UART should be in String format.
  • Every command string should end with ('\r\n').
  • Every numerical value in command string should be Hexadecimal number in form of single Byte.
  • Every terms in command string are separated by ','. If any data consist of more than single byte then use ',' as separator.
Request API Format:
START, Read/Write, AT Command, Value <CR-LF>
"$CMD" 1 Byte
(00 read and 01 write)
1 Byte 1 or more Byte separated by ',' "\r\n"

Response API Format:

START, AT Command, Status, Value <CR-LF>
"$RES" 1 Byte 1 Byte
00 –success
01-invalid parameter
02-AT command error
[Optional] "\r\n"

List of Request Api:

API COMMAND DESCRIPTION PARAMETER DEFAULTS
$CMD,00,00<CR-LF> Restore defaults _ _
$CMD,00,01<CR-LF> Initialize LoraWan _ _
$CMD,00,02<CR-LF> Deactivate LoRAWan _ _
$CMD,00,03<CR-LF> Activate LoraWan _ _
$CMD,00,04<CR-LF> (to read)
$CMD,01,04,<val><CR-LF> (to change)
Baud Rate 00-04 01
00(4800), 01(9600), 02(19200), 03(57600), 04(115200)
$CMD,00,05<CR-LF> (to read)
$CMD,01,05,<val><CR-LF> (to change)
Device EUI 8 Bytes 01,02,03,04,05,06,07,08
$CMD,00,06<CR-LF> (to read)
$CMD,01,06,<val><CR-LF> (to change)
Application EUI 8 Bytes 0F,0E,0D,0C,0B,0A,09,08
$CMD,00,07<CR-LF> Application KEY 16 Bytes 01,11,21,31,41,51,61,71,81,91,A1,B1,C1,D1,E1,F1
$CMD,00,08<CR-LF> Network Key 16 Bytes 00,10,20,30,40,50,60,70,80,90,A0,B0,C0,D0,E0,F0
$CMD,00,09<CR-LF> Device Address 4 Bytes 01,02,03,04
$CMD,00,0A<CR-LF> Network Connection Type 00-ABP,
01-OTAA
00
$CMD,00,0B<CR-LF> Network Id 4 Bytes 00,00,00,01
$CMD,00,0C<CR-LF> ADR ON/OFF 00 ON
01 OFF
01
$CMD,00,0D<CR-LF> Uplink Ack ON/OFF
00 ON
01 OFF
00
$CMD,00,0E<CR-LF> Data Confirmation Retries 1 Byte 05
$CMD,00,0F<CR-LF> Default Datarate 00 to 05 00
$CMD,00,10<CR-LF> Power Saving Mode 00 ON
01 OFF
01
$CMD,00,11<CR-LF> Class Selection A/C 00 C
01 A
00
$CMD,00,12<CR-LF> Save all configurations to EEPROM _ _
$CMD,00,13<CR-LF> Retrieve all configurations from EEPROM _ _
$CMD,00,FF<CR-LF> Module test command _ _

Uplink API Format:

Start, Port Number, Data Length, Data, <CR-LF>
For Uplink "$UP" 1 Byte 1 Byte 1 or More Bytes separated by ',' "\r\n"
Response from Device "$UP" 00 00-success
01-failure
If ack is enable then it will send "$UP,01,00\r\n" whenever it receives an acknowledgement from lora server.

Downlink API Format:

Start, Port Number, Data Length, Data, <CR-LF>
"$DOWN" 1 Byte 1 Byte 1 or More Bytes separated by ',' "\r\n"

lorauart's People

Contributors

utkarsh2211 avatar

Watchers

Kamran Alam avatar

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.