In the examples, a fixed string is created to send the message "Hello LoRa"
but when the message to be transmitted is processed, the contents of the data array passed to senData are destroyed during the encryption process.
I've addressed this by creating a local copy of the Data (tmpData) in each lora.sendData() call to preserve the contents of the original data sent to the sendData() function. The new, encrypted data (tmpData) is used to build the radio package, instead of Data.
I've addressed this by creating a local copy of the Data (tmpData) in each
lora.sendData()
call to preserve the contents of the original data sent to thesendData()
function. The new, encrypted data (tmpData
) is used to build the radio package, instead of Data.