Description
LoRa868 is integrated with the LoRa Module Ra-01H which is designed and produced by Ai-Thinker.The board has some extra space left over, so we give you a prototyping area great for adding on your own customized circuit working with the LoRa868 Module.
LoRa enables long-range transmissions (more than 10 km in some areas) with low power consumption.The technology is presented in two parts: LoRa, the physical layer and LoRaWAN (Long Range Wide Area Network), the communication layers simillar to the OSI model.
LoRa and LoRaWAN permit long-range connectivity for Internet of Things (IoT) devices in various industrial applications.
Product Features
LoRa Module: Ra-01H (by Ai-Thinker)
Communication Protocol: SPI
Universal Perfboard
Working Frequency: 803~930 MHz
Supports FSK, GFSK, MSK, GMSK, LoRa ™ and OOK modulation modes
Receive sensitivity: lowest to -141 dBm
Programmable bit rate up to 300Kbps
Built-in FPC Antenna
External IPX Antenna connector
Program platform: Arduino
Product Size:54.2mm x 54.2mm x 12.8mm
Product weight:14.5g
Kit includes
1x M5Stack LoRa Module
Applications
Automatic meter reading
Home building automation
Remote irrigation system
Example
Arduino IDE
These are the point-to-point communication examples between two LORA modules. The LoRa nodes send and receive messages.
Blue string indicates send succeed.
Yellow string display the received messages.
Red string indicates initialization failed.
To get complete code, please click here
#include <M5Stack.h>
#include <M5LoRa.h>
//declaration
String outgoing; // outgoing message
byte msgCount = 0; // count of outgoing messages
byte localAddress = 0xBB; // address of this device
byte destination = 0xFF; // destination to send to
//initialization
M5.begin();
LoRa.setPins(); // set CS, reset, IRQ pin
LoRa.begin(868E6); // initialize ratio at 868 MHz
//send message
void sendMessage(String outgoing) {
LoRa.beginPacket(); // start packet
LoRa.write(destination); // add destination address
LoRa.write(localAddress); // add sender address
LoRa.write(msgCount); // add message ID
LoRa.write(outgoing.length()); // add payload length
LoRa.print(outgoing); // add payload
LoRa.endPacket(); // finish packet and send it
msgCount++; // increment message ID
}
//receive message
void onReceive(int packetSize) {
if (packetSize == 0) return; // if there's no packet, return
int recipient = LoRa.read(); // recipient address
byte sender = LoRa.read(); // sender address
byte incomingMsgId = LoRa.read(); // incoming msg ID
byte incomingLength = LoRa.read(); // incoming msg length
String incoming = "";
while (LoRa.available()) {
incoming += (char)LoRa.read();
}
}
onReceive(LoRa.parsePacket());
Usefull Link:
LoRa Info (LoRa)
UIFlow, MicroPython, Arduino
LoRaWAN Regional Parameters