Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing SF in EndDevice #182

Closed
JuanUrena opened this issue Nov 10, 2024 · 2 comments
Closed

Changing SF in EndDevice #182

JuanUrena opened this issue Nov 10, 2024 · 2 comments

Comments

@JuanUrena
Copy link

Expected Behavior

According with the ADR component (around line 215)
// If, on the other hand, the number of steps is negative (margin_SNR is
// negative, so its decimal value is low) increase the transmission power
//(note that the spreading factor is not incremented as this particular algorithm
// expects the node itself to raise its spreading factor whenever necessary).

Actual Behavior

I have been playing around, and even if the node is not able to comunicate with the GW, he never increase the SF. So it is a little bit unclear to me the expected behaviour here. Is the ED just changing the SF to avoid collisions? Or is something not working. Under mz understanding, the ASR should be able to also select the SF, no?

Steps to Reproduce the Problem

  1. I adjust the ADR to comunicate the node to use SF = 5 and Tx = 2, and then I blocked any new update from the ADR. So basically the ED is not able to achive the GW as the SNR is not enough.

Specifications

  • ns-3 version: 43
  • lorawan module version: 0.3.1
  • Platform: Ubuntu 24.04
  • Compiler: gcc version 13.2.0
@non-det-alle
Copy link
Collaborator

Hi, there is an attribute of the EndDeviceLorawanMac class called EnableEDDataRateAdaptation that must be set to true to enable SF adaptation on the device's side. See the examples on how to chage ns-3 attributes globally. Mind that the current implementation is old (LoRaWAN specs v1.0.2, see #171) and we are planning to bring it up to date in the near future. Let me know if that fixed it for you.

@JuanUrena
Copy link
Author

Hi, yes, thanks. You gave me the right place to look at. Now it works as I was expecting.

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants