LoRaWAN allow to adapt antenna gain #15471
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
Allow to override default antenna gain for LoRaWAN, by default it is setup to 2.15 for all region except US (0.0) this means that whatever antenna you have TX power is always set to 13dBm you have no way to reduce or increase TX power.
Impact of changes
No change by default, allow to adapt TX power depending on antenna gain only by adding a new define
Documentation
To set TX power just add a new macro called
LORAPHY_ANTENNA_GAIN
with gain (float).Example if you want to set TX power EU868 to 14dBm just add following in
mbed_app.conf
Or add following in
custom_targets.json
PS : I would love adding this parameter in
mbed_lib.json
of LoRaWAN but since antenna gain is not by default the same for each region, introducing default value of2.15f
would have introduce a breaking change for US915.Pull request type
Test results
Reviewers
@jeromecoutant @0xc0170