Set Antenna Gain in the LoRaWAN stack

Hi

How can I set the antenna gain in the LoRaWAN stack without editing the libraries directly?

I have a project where I use a 868 MHz patch antenna with -3 dBi gain. I want to be able to send with the max allowed EIRP. The TX power in the LoRaWAN stack is calculated from the max allowed EIRP and the antenna gain. Since the max EIRP is 16 dBm, the respective max tx power should be 19 dBm because of the negative antenna gain. But the antenna gain inside the stack is set to the default calue of 2.15 dBi. I want to change that value without changing defaults inside libraries.

Thanks for your help!
Simon

Hello,

I played with an Lora example long time ago so sorry if I am wrong.
Maybe set_tx_config(…) second parameter - power in dbm.

BR, Jan

Hi Johnny,

No, thats not it. The actual power needs to be calculated by the LoRaWAN handler. Also it’s depending on the datarate. All this is done by the very very big LoRaWAN stack.

I just want so edit the default Constants in order that the stack calculates the power correctly.

Best regards,
Simon