The NSL01 library contains the software stack to control the NSL01 LoRaWAN shield from mCloud System GmbH. The NSL01 is a professional plug & play LoRaWAN shield for a wide range of STM32 Nucleo-64 boards with Arduino Uno Rev 3 connectivity. For more information about the NSL01 LoRaWAN shield have a look at: http://www.mcloud-systems.com/nsl01-lorawan-nucleo-arduino-shield
Method to start the join network procedure of NSL01 in Over-the-Air Activation (OTTA) mode with previously defined parameters in 'set_join_parameter' method.
int
send_Udata (UINT8 port, UINT8 *srcData, int srcLength)
Method to transmit data in an unreliable way to the network server <=> no acknowledgement will be sent from the network server and no retransmission method is available on the end-device (NSL01) side.
int
send_Cdata (UINT8 port, UINT8 *srcData, int srcLength)
Method to transmit data in a reliable way to the network server <=> confirmed data transmission.
Two serial device objects have to be specified in main:
Serial comm_pc(SERIAL_TX, SERIAL_RX)
Serial comm_LoRa(PB_6,PA_10) => TX and RX pins depending on STM32 Nucleo-64 board! => Please check datasheet of NSL01!
The dependencies directory contains several C-driver functions which have to be included in the project! The NSL01 class is based on these drivers!
Author:
mCloud Systems Team
Version:
V1.0
Date:
20-June-2018
Copyright (c) 2018 mCloud Systems GmbH, MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Example:
#include "mbed.h" #include "./NSL01/NSL01.h"//--UART interface for onboard LoRaWAN radio module//--(Tx and Rx pin depending on STM32 Nucleo-64 board)
PinName Pin_UART_Tx = PB_6;
PinName Pin_UART_Rx = PA_10;
Serial comm_LoRa(Pin_UART_Tx, Pin_UART_Rx);
//--Standard serial interface (PC) for (internal) debugging
Serial comm_pc(SERIAL_TX, SERIAL_RX);
int main()
{
//--Create NSL01 object and initialize deviceNSL01 LoRa;
//--Apply methods, e.g. ping NSL01 device
LoRa.ping();
//--Insert your specific code here
}
Method to start the join network procedure of NSL01 in Over-the-Air Activation (OTTA) mode with previously defined parameters in 'set_join_parameter' method.
Note:
Once the 'join_network' method is triggered an internal event method is invoked periodically to indicate the joining procedure.
An internal join network indication event method is invoked after successful reception of a server join response packet or after the expiration of a complete join process without success (the join request will be retransmitted changing the spreading factor from SF7 till SF12, reusing each spreading factor twice).
Method to transmit data in a reliable way to the network server <=> confirmed data transmission.
Note:
An internal 'reliable data transmit indication' event method is invoked after the radio packet has been sent, containing information about the data transfer.
Parameters:
port
: LoRaWAN Port number (> 0)
*srcData
: Application Payload (data which have to be transmitted)
Method to transmit data in an unreliable way to the network server <=> no acknowledgement will be sent from the network server and no retransmission method is available on the end-device (NSL01) side.
Note:
An internal 'unreliable data transmit indication' event method is invoked after the radio packet has been sent, containing information about the data transfer.
Parameters:
port
: LoRaWAN Port number (> 0)
*srcData
: Application Payload (data which have to be transmitted)
This site uses cookies to store information on your computer.
By continuing to use our site, you consent to our cookies.
If you are not happy with the use of these cookies, please review our
Cookie Policy
to learn how they can be disabled.
By disabling cookies, some features of the site will not work.
Access Warning
You do not have the correct permissions to perform this operation.