xreef / EByte_LoRa_E22_Series_Library

Arduino LoRa EBYTE E22 device library complete and tested with Arduino, esp8266, esp32, STM32 and Raspberry Pi Pico (rp2040 boards).. sx1262/sx1268
Other
104 stars 22 forks source link

Wrong interpretation of returned string on WRITE_CFG_PWR_DWN_LOSE #12

Closed MatteoGalet closed 1 year ago

MatteoGalet commented 1 year ago

When saving configuration on E22 UART module, C2 is the command that saves settings only temporary (not on persistent memory). Unfortunately, code does not understand that the response command is still C1 as per eByte datasheet, but expects it to be the same as the command sent (C2).

Configuration saves fine anyways.

https://github.com/xreef/EByte_LoRa_E22_Series_Library/blob/510e04e617948b65bda5bda8dd50986fa4cbd231/LoRa_E22.cpp#L640

xreef commented 1 year ago

Hi Matteo, yes It's a bug, I'm going to fix it as soon as possible. Bye Renzo

xreef commented 1 year ago

Hi @MatteoGalet, I verified, and seems It's all ok; before launch the message to the module, I set the specified save type

https://github.com/xreef/EByte_LoRa_E22_Series_Library/blob/510e04e617948b65bda5bda8dd50986fa4cbd231/LoRa_E22.cpp#L617

but after I receive the response from the ebyte and the command is overwritten from the command response,

https://github.com/xreef/EByte_LoRa_E22_Series_Library/blob/510e04e617948b65bda5bda8dd50986fa4cbd231/LoRa_E22.cpp#L627

then I do a compare with RETURNED_COMMAND that is C1 every time.

https://github.com/xreef/EByte_LoRa_E22_Series_Library/blob/510e04e617948b65bda5bda8dd50986fa4cbd231/LoRa_E22.cpp#L640

Bye Renzo