Closed fixajteknik closed 2 years ago
ı think library need modifications. I have added free() command and fixed. at line 891/892 https://github.com/xreef/EByte_LoRa_E22_Series_Library/blob/master/LoRa_E22.cpp#L894
memcpy(fixedStransmission->message,(unsigned char*)message,size);
ResponseStatus status;
status.code = this->sendStruct((uint8_t *)fixedStransmission, size+3);
free(fixedStransmission); // Burayı ekledim, I have added this line
if (status.code!=SUCCESS) return status;
//free(fixedStransmission);
and at the receiver side I have to add .close() command in example. I didnt see close command in examples like E32 examples
if (e22ttl.available() > 1) {
ResponseStructContainer rsc = e22ttl.receiveMessageRSSI(sizeof(Message));
Serial.println(rsc.status.getResponseDescription());
struct Message message = *(Message*) rsc.data;
Serial.println(message.type);
Serial.println(message.message);
Serial.println(*(int*)(message.temperature));
Serial.print("RSSI: "); Serial.println(rsc.rssi, DEC);
rsc.close(); // Bu satırıda gelen mesajları okuduktan sonra eklemek gerekiyor yoksa arduino donuyor. This line added
}
it works fine almost 2 days
Thanks, I start check all the examples for the e220 version. Bye Renzo
Your welcome, I have told at this video how to use your library in YouTube? https://youtu.be/LqlZJ986tJI Thanks to much Mehmet.
Hi, It's beautiful. I'll try to share it. Thanks Renzo
this works until i = 72 after that struct is loosing itselfs
Output: