Does LoRa communication require keys?

LoRa does not use keys for communication. LoRa technology covers the physical layer, while other technologies and protocols such as LoRaWAN cover the upper layers. Keys (DevEUI, AppEUI and AppKEY) are necessary in LoRaWAN. You can find more information about LoRaWAN keys on this link.

You need to match the RadioParameters on the transmitter and receiver to transmit the data successfuly. For example, you need to have the receiver on the same frequency, scaling factor, bandwidth, etc. as the transmitter in order to receive the message.

On Onethinx module, the structure that handles these parameters is called RadioParams_t and it is given to LoRa_TX and LoRa_RX functions when they are called.

Example:

/* The LoRa Radio parameters are defined below. Change the frequency according your region */
RadioParams_t RadioParams =
{
	.Frequency = 8690000,		// Frequency in 100Hz steps
	.TXpower = PWR_MAX,
	.PacketType = PACKET_TYPE_LORA,
	.LoRa.Modulation.SF = LORA_SF12,
	.LoRa.Modulation.BW = LORA_BW_250,
	.LoRa.Modulation.CR = LORA_CR_4_5,
	.LoRa.Modulation.LowDataRateOptimize = LORA_LOWDATARATEOPTIMIZE_OFF,
	.LoRa.Packet.PreambleLength = 8,
	.LoRa.Packet.HeaderType = LORA_PACKET_VARIABLE_LENGTH,
	.LoRa.Packet.PayloadSize = PAYLOADSIZE,
	.LoRa.Packet.CRCmode = LORA_CRC_ON,
	.LoRa.Packet.IQmode = LORA_IQ_NORMAL,
	.LoRa.Packet.SyncWord = LORA_MAC_PUBLIC_SYNCWORD
};

CoreStatus = LoRa_TX(&RadioParams, &RadioStatus, (uint8_t *) &LoRaTXbuffer, sizeof(LoRaTXbuffer), 3000, M4_WaitDeepSleep);

CoreStatus = LoRa_RX(&RadioParams, &RadioStatus, (uint8_t *) &LoRaRXbuffer, sizeof(LoRaRXbuffer), 30000, M4_WaitActive);