Giter Site home page Giter Site logo

Comments (9)

SMotlaq avatar SMotlaq commented on June 18, 2024 1

Thanks for bringing this issue to my attention. I apologize for the confusion caused by the missing Low Data Optimization (LDO) setting in my LoRa library. I understand that this feature is important for reliable data transmission when using a Spreading Factor (SF) of 12.

I've now added the necessary code to set the LDO in the LoRa library. You can find the updated code in the following commit:

0bf5cb7

The changes include the addition of two new functions: LoRa_setLowDaraRateOptimization and LoRa_setAutoLDO. These functions allow you to enable/disable LDO and set the LDO flag for your specific use case.

Unfortunately I couldn't test the updated library with SF12. Please check these new functions and tell me the result.

Thanks again for bringing this to my attention, and I apologize for any inconvenience caused. If you have any further questions or concerns, please don't hesitate to reach out 🌹

from lora.

SMotlaq avatar SMotlaq commented on June 18, 2024 1

Hi again,

Thanks for your suggestion to fix the issue. I agree that changing the line to use long and > operator would fix the issue.

Would you be willing to make this change in your forked repository and send a pull request? This way, we can keep the changes in your repository and I can merge them into the main repository.

If you're not comfortable making the changes yourself, I can certainly do it myself. However, I'd like to give you the opportunity to make the changes and get credit for your contribution.

Let me know either way, and we can move forward with the fix.

Thanks again!

from lora.

IoTThinks avatar IoTThinks commented on June 18, 2024 1

Ok, let me create a pull request tomorrow.

from lora.

IoTThinks avatar IoTThinks commented on June 18, 2024 1

I created a Pull Request.
To close this issue.
Thanks a lot for your effort.

from lora.

IoTThinks avatar IoTThinks commented on June 18, 2024

I have attempted to creat a fix. But not successful yet.

Let me test your patch tomorrow morning.

from lora.

IoTThinks avatar IoTThinks commented on June 18, 2024

I tested just now.
The fix works for SF7-10 and SF12.
SF11 seems not working yet. Still show wrong data for SF11.

image

from lora.

SMotlaq avatar SMotlaq commented on June 18, 2024

Thanks. Would you mind sending your code please?

from lora.

IoTThinks avatar IoTThinks commented on June 18, 2024

My code is not working yet.

Let me debug and try to fix for sf11 based on your fix yesterday.

Hope to complete by this Friday.

Will update you and creat pull request if success.

from lora.

IoTThinks avatar IoTThinks commented on June 18, 2024

I think there is still missing code here and there comparing to RadioLib and ArduinoLoRa.
However, this is a dirty trick.
SF7-11 should not have LDO on. SF12 should have LDO on.
((1 << _LoRa->spredingFactor) / ((double)BW[_LoRa->bandWidth] will return 16.3... so it will larger than 16.

So Arduino-LoRa uses "long" so after debugging, I guess it would trim down to 16.
image

So my suggested fix is to change this line

LoRa_setLowDaraRateOptimization(_LoRa, ((1 << _LoRa->spredingFactor) / ((double)BW[_LoRa->bandWidth])) >= 16.0);

To the below.
Note the (long) and =

LoRa_setLowDaraRateOptimization(_LoRa, (long)((1 << _LoRa->spredingFactor) / ((double)BW[_LoRa->bandWidth])) > 16.0);

My STM32L0 with this fix is able to receive SF7-12 packets from Arduino-LoRa now.
image

from lora.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.